3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU )
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
8 # Free Software Foundation, Inc.
10 # This file is part of GNU Libtool:
11 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # This program is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/bin/sed -e 1s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
42 # The names of the tagged configurations supported by this script.
43 available_tags
=" CXX F77"
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host Felix-Maschine:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs
=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc
=yes
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes
=yes
64 # Whether or not to optimize for fast installation.
73 build_alias
=i686-pc-cygwin
77 # An echo program that does not interpret backslashes.
87 # LTCC compiler flags.
90 # A language-specific compiler.
93 # Is the compiler the GNU C compiler?
99 # The linker used to build libraries.
100 LD
="/i686-pc-msys/bin/ld.exe"
102 # Whether we need hard or soft links.
105 # A BSD-compatible nm program.
108 # A symbol stripping program
111 # Used to examine libraries when file_magic_cmd begins "file"
114 # Used on cygwin: DLL creation program.
117 # Used on cygwin: object dumper.
120 # Used on cygwin: assembler.
123 # The name of the directory that contains temporary libtool files.
126 # How to create reloadable object files.
128 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
130 # How to pass a linker flag through the compiler.
133 # Object file suffix (normally "o").
136 # Old archive suffix (normally "a").
139 # Shared library suffix (normally ".so").
142 # Executable file suffix (normally "").
145 # Additional compiler flags for building library objects.
146 pic_flag
=" -DDLL_EXPORT -DPIC"
149 # What is the maximum length of a command?
152 # Does compiler simultaneously support -c and -o options?
155 # Must we lock files when doing compilation?
158 # Do we need the lib prefix for modules?
161 # Do we need a version for libraries?
164 # Whether dlopen is supported.
165 dlopen_support
=unknown
167 # Whether dlopen of programs is supported.
170 # Whether dlopen of statically linked programs is supported.
171 dlopen_self_static
=unknown
173 # Compiler flag to prevent dynamic linking.
176 # Compiler flag to turn off builtin functions.
177 no_builtin_flag
=" -fno-builtin -fno-rtti -fno-exceptions"
179 # Compiler flag to allow reflexive dlopens.
180 export_dynamic_flag_spec
="\${wl}--export-dynamic"
182 # Compiler flag to generate shared objects directly from archives.
183 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
185 # Compiler flag to generate thread-safe objects.
186 thread_safe_flag_spec
=""
188 # Library versioning type.
191 # Format of library name prefix.
192 libname_spec
="lib\$name"
194 # List of archive names. First name is the real one, the rest are links.
195 # The last name is the one that the linker finds with -lNAME.
196 library_names_spec
="\$libname.dll.a"
198 # The coded name of the library, if different from the real name.
199 soname_spec
="\`echo \${libname} | sed -e s/^lib/cyg/\`\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
201 # Commands used to build and install an old-style archive.
203 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
204 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
205 old_postuninstall_cmds
=""
207 # Create an old-style archive from a shared archive.
208 old_archive_from_new_cmds
=""
210 # Create a temporary old-style archive to link instead of a shared archive.
211 old_archive_from_expsyms_cmds
=""
213 # Commands used to build and install a shared archive.
214 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
215 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
216 cp \$export_symbols \$output_objdir/\$soname.def;
218 echo EXPORTS > \$output_objdir/\$soname.def;
219 cat \$export_symbols >> \$output_objdir/\$soname.def;
221 \$CC -shared \$output_objdir/\$soname.def \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
222 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
223 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
224 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
225 test -d \\\$dldir || mkdir -p \\\$dldir~
226 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname~
227 chmod a+x \\\$dldir/\$dlname"
228 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
229 dlpath=\$dir/\\\$dldll~
232 # Commands used to build a loadable module (assumed same as above if empty)
234 module_expsym_cmds
=""
236 # Commands to strip libraries.
237 old_striplib
="strip --strip-debug"
238 striplib
="strip --strip-unneeded"
240 # Dependencies to place before the objects being linked to create a
244 # Dependencies to place after the objects being linked to create a
248 # Dependencies to place before the objects being linked to create a
252 # Dependencies to place after the objects being linked to create a
256 # The directories searched by this compiler when creating a shared
258 compiler_lib_search_dirs
=""
260 # The library search path used internally by the compiler when linking
262 compiler_lib_search_path
=""
264 # Method to check whether dependent libraries are shared objects.
265 deplibs_check_method
=pass_all
267 # Command to use when deplibs_check_method == file_magic.
268 file_magic_cmd
="\$OBJDUMP -f"
270 # Flag that allows shared libraries with undefined symbols to be built.
271 allow_undefined_flag
="unsupported"
273 # Flag that forces no undefined symbols.
276 # Commands used to finish a libtool library installation in a directory.
279 # Same as above, but a single script fragment to be evaled but not shown.
282 # Take the output of nm and produce a listing of raw symbols and C names.
283 global_symbol_pipe
=""
285 # Transform the output of nm in a proper C declaration
286 global_symbol_to_cdecl
=""
288 # Transform the output of nm in a C name address pair
289 global_symbol_to_c_name_address
=""
291 # This is the shared library runtime path variable.
292 runpath_var
=LD_RUN_PATH
294 # This is the shared library path variable.
297 # Is shlibpath searched before the hard-coded library search path?
298 shlibpath_overrides_runpath
=yes
300 # How to hardcode a shared library path into an executable.
301 hardcode_action
=immediate
303 # Whether we should hardcode library paths into libraries.
304 hardcode_into_libs
=no
306 # Flag to hardcode $libdir into a binary during linking.
307 # This must work even if $libdir does not exist.
308 hardcode_libdir_flag_spec
="-L\$libdir"
310 # If ld is used when linking, flag to hardcode $libdir into
311 # a binary during linking. This must work even if $libdir does
313 hardcode_libdir_flag_spec_ld
=""
315 # Whether we need a single -rpath flag with a separated argument.
316 hardcode_libdir_separator
=""
318 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
322 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
326 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
327 # the resulting binary.
328 hardcode_shlibpath_var
=unsupported
330 # Set to yes if building a shared library automatically hardcodes DIR into the library
331 # and all subsequent libraries and executables linked against it.
332 hardcode_automatic
=no
334 # Variables whose values should be saved in libtool wrapper scripts and
335 # restored at relink time.
336 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
338 # Whether libtool must link a program against all its dependency libraries.
339 link_all_deplibs
=unknown
341 # Compile-time system search path for libraries
342 sys_lib_search_path_spec
="/usr/lib /lib/w32api /lib /usr/local/lib"
344 # Run-time system search path for libraries
345 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
347 # Fix the shell variable $srcfile for the compiler.
350 # Set to yes if exported symbols are required.
351 always_export_symbols
=no
353 # The commands to list exported symbols.
354 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGRS][ ]/s/.*[ ]\\\\([^ ]*\\\\)/\\\\1 DATA/' -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > \$export_symbols"
356 # The commands to extract the exported symbol list from a shared archive.
357 extract_expsyms_cmds
=""
359 # Symbols that should not be listed in the preloaded symbols.
360 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
362 # Symbols that must always be exported.
365 # ### END LIBTOOL CONFIG
367 # ltmain.sh - Provide generalized library-building support services.
368 # NOTE: Changing this file will not affect anything until you rerun configure.
370 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
371 # 2007, 2008 Free Software Foundation, Inc.
372 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
374 # This program is free software; you can redistribute it and/or modify
375 # it under the terms of the GNU General Public License as published by
376 # the Free Software Foundation; either version 2 of the License, or
377 # (at your option) any later version.
379 # This program is distributed in the hope that it will be useful, but
380 # WITHOUT ANY WARRANTY; without even the implied warranty of
381 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
382 # General Public License for more details.
384 # You should have received a copy of the GNU General Public License
385 # along with this program; if not, write to the Free Software
386 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
388 # As a special exception to the GNU General Public License, if you
389 # distribute this file as part of a program that contains a
390 # configuration script generated by Autoconf, you may include it under
391 # the same distribution terms that you use for the rest of that program.
395 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
396 # is ksh but when the shell is invoked as "sh" and the current value of
397 # the _XPG environment variable is not equal to 1 (one), the special
398 # positional parameter $0, within a function call, is the name of the
402 # The name of this program:
403 progname
=`echo "$progpath" | $SED $basename`
413 TIMESTAMP
=" (1.1220.2.493 2008/02/01 16:58:18)"
415 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
416 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then
419 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
420 # is contrary to our usage. Disable this feature.
421 alias -g '${1+"$@"}'='"$@"'
424 case `(set -o) 2>/dev/null` in *posix
*) set -o posix
;; esac
426 BIN_SH
=xpg4
; export BIN_SH
# for Tru64
427 DUALCASE
=1; export DUALCASE
# for MKS sh
429 # Check that we have a working $echo.
430 if test "X$1" = X--no-reexec
; then
431 # Discard the --no-reexec flag, and continue.
433 elif test "X$1" = X--fallback-echo
; then
434 # Avoid inline document here, it may be left over
436 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
437 # Yippee, $echo works!
440 # Restart under the correct shell, and then maybe $echo will work.
441 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
444 if test "X$1" = X--fallback-echo
; then
445 # used as fallback echo
454 help="Try \`$progname --help' for more information."
455 magic
="%%%MAGIC variable%%%"
460 # Sed substitution that helps us do robust quoting. It backslashifies
461 # metacharacters that are still active within double-quoted strings.
462 Xsed
="${SED}"' -e 1s/^X//'
463 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
464 # test EBCDIC or ASCII
465 case `echo X|tr X '\101'` in
466 A
) # ASCII based system
467 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
469 NL2SP
='tr \015\012 \040\040'
471 *) # EBCDIC based system
473 NL2SP
='tr \r\n \100\100'
478 # Only set LANG and LC_ALL to C if already set.
479 # These must not be set unconditionally because not all systems understand
480 # e.g. LANG=C (notably SCO).
481 # We save the old values to restore during execute mode.
483 for lt_var
in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
485 eval "if test \"\${$lt_var+set}\" = set; then
486 save_$lt_var=\$$lt_var
487 lt_env=\"$lt_var=\$$lt_var \$lt_env\"
493 if test -n "$lt_env"; then
497 # Make sure IFS has a sensible default
502 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
503 $echo "$modename: not configured to build any kind of library" 1>&2
504 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
519 lo2o
="s/\\.lo\$/.${objext}/"
520 o2lo
="s/\\.${objext}\$/.lo/"
524 #####################################
525 # Shell function definitions:
526 # This seems to be the best place for them
528 # func_mktempdir [string]
529 # Make a temporary directory that won't clash with other running
530 # libtool processes, and avoids race conditions if possible. If
531 # given, STRING is the basename for that directory.
534 my_template
="${TMPDIR-/tmp}/${1-$progname}"
536 if test "$run" = ":"; then
537 # Return a directory name, but don't create it in dry-run mode
538 my_tmpdir
="${my_template}-$$"
541 # If mktemp works, use that first and foremost
542 my_tmpdir
=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
544 if test ! -d "$my_tmpdir"; then
545 # Failing that, at least try and use $RANDOM to avoid a race
546 my_tmpdir
="${my_template}-${RANDOM-0}$$"
548 save_mktempdir_umask
=`umask`
551 umask $save_mktempdir_umask
554 # If we're not in dry-run mode, bomb out on failure
555 test -d "$my_tmpdir" ||
{
556 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
561 $echo "X$my_tmpdir" |
$Xsed
565 # func_win32_libid arg
566 # return the library type of file 'arg'
568 # Need a lot of goo to handle *both* DLLs and import libs
569 # Has to be a shell function in order to 'eat' the argument
570 # that is supplied when $file_magic_command is called.
573 win32_libid_type
="unknown"
574 win32_fileres
=`file -L $1 2>/dev/null`
575 case $win32_fileres in
576 *ar\ archive\ import\ library
*) # definitely import
577 win32_libid_type
="x86 archive import"
579 *ar\ archive
*) # could be an import, or static
580 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
581 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
582 win32_nmres
=`eval $NM -f posix -A $1 | \
591 import
*) win32_libid_type
="x86 archive import";;
592 *) win32_libid_type
="x86 archive static";;
597 win32_libid_type
="x86 DLL"
599 *executable
*) # but shell scripts are "executable" too...
600 case $win32_fileres in
601 *MS\ Windows\ PE\ Intel
*)
602 win32_libid_type
="x86 DLL"
607 $echo $win32_libid_type
612 # Infer tagged configuration to use if any are available and
613 # if one wasn't chosen via the "--tag" command line option.
614 # Only attempt this if the compiler in the base compile
615 # command doesn't match the default compiler.
616 # arg is usually of the form 'gcc ...'
619 if test -n "$available_tags" && test -z "$tagname"; then
623 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
627 CC_quoted
="$CC_quoted $arg"
630 # Blanks in the command may have been stripped by the calling shell,
631 # but not from the CC environment variable when configure was run.
632 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
633 # Blanks at the start of $base_compile will cause this to fail
634 # if we don't check for them as well.
636 for z
in $available_tags; do
637 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
638 # Evaluate the configuration.
639 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
642 # Double-quote args containing other shell metacharacters.
644 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
648 CC_quoted
="$CC_quoted $arg"
651 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
652 # The compiler in the base compile command matches
653 # the one in the tagged configuration.
654 # Assume this is the tagged configuration we want.
661 # If $tagname still isn't set, then no tagged configuration
662 # was found and let the user know that the "--tag" command
663 # line option must be used.
664 if test -z "$tagname"; then
665 $echo "$modename: unable to infer tagged configuration"
666 $echo "$modename: specify a tag with \`--tag'" 1>&2
669 # $echo "$modename: using $tagname tagged configuration"
677 # func_extract_an_archive dir oldlib
678 func_extract_an_archive
()
680 f_ex_an_ar_dir
="$1"; shift
681 f_ex_an_ar_oldlib
="$1"
683 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
684 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" ||
exit $?
685 if ($AR t
"$f_ex_an_ar_oldlib" |
sort |
sort -uc >/dev
/null
2>&1); then
688 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
693 # func_extract_archives gentop oldlib ...
694 func_extract_archives
()
696 my_gentop
="$1"; shift
704 $show "${rm}r $my_gentop"
705 $run ${rm}r
"$my_gentop"
706 $show "$mkdir $my_gentop"
707 $run $mkdir "$my_gentop"
709 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
713 for my_xlib
in $my_oldlibs; do
714 # Extract the objects.
716 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
717 *) my_xabs
=`pwd`"/$my_xlib" ;;
719 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
722 case " $extracted_archives " in
724 extracted_serial
=`expr $extracted_serial + 1`
725 my_xlib_u
=lt
$extracted_serial-$my_xlib ;;
729 extracted_archives
="$extracted_archives $my_xlib_u"
730 my_xdir
="$my_gentop/$my_xlib_u"
732 $show "${rm}r $my_xdir"
733 $run ${rm}r
"$my_xdir"
734 $show "$mkdir $my_xdir"
735 $run $mkdir "$my_xdir"
737 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
742 $show "Extracting $my_xabs"
743 # Do not bother doing anything if just a dry run
744 if test -z "$run"; then
745 darwin_orig_dir
=`pwd`
746 cd $my_xdir ||
exit $?
747 darwin_archive
=$my_xabs
749 darwin_base_archive
=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
750 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
751 if test -n "$darwin_arches"; then
752 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
754 $show "$darwin_base_archive has multiple architectures $darwin_arches"
755 for darwin_arch
in $darwin_arches ; do
756 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
757 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
758 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
759 func_extract_an_archive
"`pwd`" "${darwin_base_archive}"
761 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
762 done # $darwin_arches
763 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
764 darwin_filelist
=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
767 for darwin_file
in $darwin_filelist; do
768 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
769 lipo
-create -output "$darwin_file" $darwin_files
770 done # $darwin_filelist
772 cd "$darwin_orig_dir"
774 cd "$darwin_orig_dir"
775 func_extract_an_archive
"$my_xdir" "$my_xabs"
780 func_extract_an_archive
"$my_xdir" "$my_xabs"
783 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
785 func_extract_archives_result
="$my_oldobjs"
787 # End of Shell function definitions
788 #####################################
791 eval std_shrext
=\"$shrext_cmds\"
795 # Parse our command line options once, thoroughly.
796 while test "$#" -gt 0
802 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
806 # If the previous option needs an argument, assign it.
807 if test -n "$prev"; then
810 execute_dlfiles
="$execute_dlfiles $arg"
814 preserve_args
="${preserve_args}=$arg"
816 # Check whether tagname contains only valid characters
819 $echo "$progname: invalid tag name: $tagname" 1>&2
826 # Don't test for the "default" C tag, as we know, it's there, but
827 # not specially marked.
830 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
831 taglist
="$taglist $tagname"
832 # Evaluate the configuration.
833 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
835 $echo "$progname: ignoring unknown tag $tagname" 1>&2
850 # Have we seen a non-optional argument yet?
858 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
860 Copyright (C) 2008 Free Software Foundation, Inc.
861 This is free software; see the source for copying conditions. There is NO
862 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
867 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
868 # Now print the configurations for the tags.
869 for tagname
in $taglist; do
870 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
876 $echo "$progname: enabling shell trace mode"
878 preserve_args
="$preserve_args $arg"
887 if test "$build_libtool_libs" = yes; then
888 $echo "enable shared libraries"
890 $echo "disable shared libraries"
892 if test "$build_old_libs" = yes; then
893 $echo "enable static libraries"
895 $echo "disable static libraries"
900 --finish) mode
="finish" ;;
902 --mode) prevopt
="--mode" prev
=mode
;;
903 --mode=*) mode
="$optarg" ;;
905 --preserve-dup-deps) duplicate_deps
="yes" ;;
909 preserve_args
="$preserve_args $arg"
915 preserve_args
="$preserve_args --tag"
918 set tag
"$optarg" ${1+"$@"}
921 preserve_args
="$preserve_args --tag"
930 $echo "$modename: unrecognized option \`$arg'" 1>&2
942 if test -n "$prevopt"; then
943 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
948 case $disable_libs in
952 build_libtool_libs
=no
956 build_old_libs
=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
960 # If this variable is set in any of the actions, the command in it
961 # will be execed at the end. This prevents here-documents from being
962 # left over by shells.
965 if test -z "$show_help"; then
967 # Infer the operation mode.
968 if test -z "$mode"; then
969 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
970 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
972 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
984 *db |
*dbx |
*strace |
*truss
)
994 # If we have no mode, but dlfiles were specified, then do execute mode.
995 test -n "$execute_dlfiles" && mode
=execute
997 # Just use the default operation mode.
998 if test -z "$mode"; then
999 if test -n "$nonopt"; then
1000 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
1002 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
1009 # Only execute mode is allowed to have -dlopen flags.
1010 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
1011 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
1016 # Change the help message to a mode-specific one.
1017 generic_help
="$help"
1018 help="Try \`$modename --help --mode=$mode' for more information."
1020 # These modes are in order of execution frequency so that they run quickly.
1022 # libtool compile mode
1024 modename
="$modename: compile"
1025 # Get the compilation command and the source file.
1027 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
1038 # do not "continue". Instead, add this to base_compile
1050 # Accept any command-line options.
1053 if test -n "$libobj" ; then
1054 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
1061 -static |
-prefer-pic |
-prefer-non-pic)
1072 arg_mode
=arg
# the next one goes into the "base_compile" arg list
1073 continue # The current "srcfile" will either be retained or
1074 ;; # replaced later. I would guess that would be a bug.
1077 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1079 save_ifs
="$IFS"; IFS
=','
1080 for arg
in $args; do
1083 # Double-quote args containing other shell metacharacters.
1084 # Many Bourne shells cannot handle close brackets correctly
1085 # in scan sets, so we specify it separately.
1087 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1091 lastarg
="$lastarg $arg"
1094 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1096 # Add the arguments to base_compile.
1097 base_compile
="$base_compile $lastarg"
1102 # Accept the current argument as the source file.
1103 # The previous "srcfile" becomes the current argument.
1110 esac # case $arg_mode
1112 # Aesthetically quote the previous argument.
1113 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1116 # Double-quote args containing other shell metacharacters.
1117 # Many Bourne shells cannot handle close brackets correctly
1118 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1119 # in scan sets (worked around with variable expansion),
1120 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1121 # at all, so we specify them separately.
1122 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1123 lastarg
="\"$lastarg\""
1127 base_compile
="$base_compile $lastarg"
1132 $echo "$modename: you must specify an argument for -Xcompile"
1136 $echo "$modename: you must specify a target with \`-o'" 1>&2
1140 # Get the name of the library object.
1141 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1145 # Recognize several different file suffixes.
1146 # If the user specifies -o file.o, it is replaced with file.lo
1156 *.class
) xform
=class
;;
1159 *.
[fF
][09]?
) xform
=[fF
][09].
;;
1161 *.java
) xform
=java
;;
1166 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1169 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1171 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1176 func_infer_tag
$base_compile
1178 for arg
in $later; do
1197 qlibobj
=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1199 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1200 qlibobj
="\"$qlibobj\"" ;;
1202 test "X$libobj" != "X$qlibobj" \
1203 && $echo "X$libobj" |
grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1204 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1205 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1206 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1207 if test "X$xdir" = "X$obj"; then
1212 lobj
=${xdir}$objdir/$objname
1214 if test -z "$base_compile"; then
1215 $echo "$modename: you must specify a compilation command" 1>&2
1220 # Delete any leftover library objects.
1221 if test "$build_old_libs" = yes; then
1222 removelist
="$obj $lobj $libobj ${libobj}T"
1224 removelist
="$lobj $libobj ${libobj}T"
1227 $run $rm $removelist
1228 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1230 # On Cygwin there's no "real" PIC flag so we must build both object types
1232 cygwin
* | mingw
* | pw32
* | os2
*)
1236 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1237 # non-PIC code in shared libraries is not supported
1241 # Calculate the filename of the output object if compiler does
1242 # not support -o with -c
1243 if test "$compiler_c_o" = no
; then
1244 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1245 lockfile
="$output_obj.lock"
1246 removelist
="$removelist $output_obj $lockfile"
1247 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1254 # Lock this critical section if it is needed
1255 # We use this script file to make the link, it avoids creating a new file
1256 if test "$need_locks" = yes; then
1257 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1258 $show "Waiting for $lockfile to be removed"
1261 elif test "$need_locks" = warn
; then
1262 if test -f "$lockfile"; then
1264 *** ERROR, $lockfile exists and contains:
1265 `cat $lockfile 2>/dev/null`
1267 This indicates that another process is trying to use the same
1268 temporary object file, and libtool could not work around it because
1269 your compiler does not support \`-c' and \`-o' together. If you
1270 repeat this compilation, it may succeed, by chance, but you had better
1271 avoid parallel builds (make -j) in this platform, or get a better
1274 $run $rm $removelist
1277 $echo "$srcfile" > "$lockfile"
1280 if test -n "$fix_srcfile_path"; then
1281 eval srcfile
=\"$fix_srcfile_path\"
1283 qsrcfile
=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1285 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1286 qsrcfile
="\"$qsrcfile\"" ;;
1289 $run $rm "$libobj" "${libobj}T"
1291 # Create a libtool object file (analogous to a ".la" file),
1292 # but don't create it if we're doing a dry run.
1293 test -z "$run" && cat > ${libobj}T
<<EOF
1294 # $libobj - a libtool object file
1295 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1297 # Please DO NOT delete this file!
1298 # It is necessary for linking the library.
1300 # Name of the PIC object.
1303 # Only build a PIC object if we are building libtool libraries.
1304 if test "$build_libtool_libs" = yes; then
1305 # Without this assignment, base_compile gets emptied.
1306 fbsd_hideous_sh_bug
=$base_compile
1308 if test "$pic_mode" != no
; then
1309 command="$base_compile $qsrcfile $pic_flag"
1311 # Don't build PIC code
1312 command="$base_compile $qsrcfile"
1315 if test ! -d "${xdir}$objdir"; then
1316 $show "$mkdir ${xdir}$objdir"
1317 $run $mkdir ${xdir}$objdir
1319 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1324 if test -z "$output_obj"; then
1325 # Place PIC objects in $objdir
1326 command="$command -o $lobj"
1329 $run $rm "$lobj" "$output_obj"
1332 if $run eval $lt_env "$command"; then :
1334 test -n "$output_obj" && $run $rm $removelist
1338 if test "$need_locks" = warn
&&
1339 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1341 *** ERROR, $lockfile contains:
1342 `cat $lockfile 2>/dev/null`
1344 but it should contain:
1347 This indicates that another process is trying to use the same
1348 temporary object file, and libtool could not work around it because
1349 your compiler does not support \`-c' and \`-o' together. If you
1350 repeat this compilation, it may succeed, by chance, but you had better
1351 avoid parallel builds (make -j) in this platform, or get a better
1354 $run $rm $removelist
1358 # Just move the object if needed, then go on to compile the next one
1359 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1360 $show "$mv $output_obj $lobj"
1361 if $run $mv $output_obj $lobj; then :
1364 $run $rm $removelist
1369 # Append the name of the PIC object to the libtool object file.
1370 test -z "$run" && cat >> ${libobj}T
<<EOF
1371 pic_object='$objdir/$objname'
1375 # Allow error messages only from the first compilation.
1376 if test "$suppress_opt" = yes; then
1377 suppress_output
=' >/dev/null 2>&1'
1380 # No PIC object so indicate it doesn't exist in the libtool
1382 test -z "$run" && cat >> ${libobj}T
<<EOF
1388 # Only build a position-dependent object if we build old libraries.
1389 if test "$build_old_libs" = yes; then
1390 if test "$pic_mode" != yes; then
1391 # Don't build PIC code
1392 command="$base_compile $qsrcfile"
1394 command="$base_compile $qsrcfile $pic_flag"
1396 if test "$compiler_c_o" = yes; then
1397 command="$command -o $obj"
1400 # Suppress compiler output if we already did a PIC compilation.
1401 command="$command$suppress_output"
1402 $run $rm "$obj" "$output_obj"
1404 if $run eval $lt_env "$command"; then :
1406 $run $rm $removelist
1410 if test "$need_locks" = warn
&&
1411 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1413 *** ERROR, $lockfile contains:
1414 `cat $lockfile 2>/dev/null`
1416 but it should contain:
1419 This indicates that another process is trying to use the same
1420 temporary object file, and libtool could not work around it because
1421 your compiler does not support \`-c' and \`-o' together. If you
1422 repeat this compilation, it may succeed, by chance, but you had better
1423 avoid parallel builds (make -j) in this platform, or get a better
1426 $run $rm $removelist
1430 # Just move the object if needed
1431 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1432 $show "$mv $output_obj $obj"
1433 if $run $mv $output_obj $obj; then :
1436 $run $rm $removelist
1441 # Append the name of the non-PIC object the libtool object file.
1442 # Only append if the libtool object file exists.
1443 test -z "$run" && cat >> ${libobj}T
<<EOF
1444 # Name of the non-PIC object.
1445 non_pic_object='$objname'
1449 # Append the name of the non-PIC object the libtool object file.
1450 # Only append if the libtool object file exists.
1451 test -z "$run" && cat >> ${libobj}T
<<EOF
1452 # Name of the non-PIC object.
1458 $run $mv "${libobj}T" "${libobj}"
1460 # Unlock the critical section if it was locked
1461 if test "$need_locks" != no
; then
1462 $run $rm "$lockfile"
1470 modename
="$modename: link"
1472 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1473 # It is impossible to link a dll without this setting, and
1474 # we shouldn't force the makefile maintainer to figure out
1475 # which system we are compiling for in order to pass an extra
1476 # flag for every libtool invocation.
1477 # allow_undefined=no
1479 # FIXME: Unfortunately, there are problems with the above when trying
1480 # to make a dll which has undefined symbols, in which case not
1481 # even a static library is built. For now, we need to specify
1482 # -no-undefined on the libtool link line when we can be certain
1483 # that all symbols are satisfied, otherwise we get a static library.
1490 libtool_args
="$nonopt"
1491 base_compile
="$nonopt $@"
1492 compile_command
="$nonopt"
1493 finalize_command
="$nonopt"
1506 lib_search_path
=`pwd`
1515 export_symbols_regex
=
1523 notinst_path
= # paths that contain not-installed libtool libraries
1524 precious_files_regex
=
1525 prefer_static_libs
=no
1537 single_module
="${wl}-single_module"
1539 func_infer_tag
$base_compile
1541 # We need to know -static, to get the right output filenames.
1545 -all-static |
-static |
-static-libtool-libs)
1548 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1549 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1551 if test -n "$link_static_flag"; then
1552 dlopen_self
=$dlopen_self_static
1554 prefer_static_libs
=yes
1557 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1558 dlopen_self
=$dlopen_self_static
1560 prefer_static_libs
=built
1562 -static-libtool-libs)
1563 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1564 dlopen_self
=$dlopen_self_static
1566 prefer_static_libs
=yes
1569 build_libtool_libs
=no
1576 # See if our shared archives depend on static archives.
1577 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1579 # Go through the arguments, transforming them on the way.
1580 while test "$#" -gt 0; do
1584 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1585 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1589 libtool_args
="$libtool_args $qarg"
1591 # If the previous option needs an argument, assign it.
1592 if test -n "$prev"; then
1595 compile_command
="$compile_command @OUTPUT@"
1596 finalize_command
="$finalize_command @OUTPUT@"
1602 if test "$preload" = no
; then
1603 # Add the symbol object into the linking commands.
1604 compile_command
="$compile_command @SYMFILE@"
1605 finalize_command
="$finalize_command @SYMFILE@"
1609 *.la |
*.lo
) ;; # We handle these cases below.
1611 if test "$dlself" = no
; then
1619 if test "$prev" = dlprefiles
; then
1621 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1631 if test "$prev" = dlfiles
; then
1632 dlfiles
="$dlfiles $arg"
1634 dlprefiles
="$dlprefiles $arg"
1642 export_symbols
="$arg"
1643 if test ! -f "$arg"; then
1644 $echo "$modename: symbol file \`$arg' does not exist"
1651 export_symbols_regex
="$arg"
1656 inst_prefix_dir
="$arg"
1661 precious_files_regex
="$arg"
1671 if test -f "$arg"; then
1674 for fil
in `cat $save_arg`
1676 # moreargs="$moreargs $fil"
1678 # A libtool-controlled object.
1680 # Check to see that this really is a libtool object.
1681 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1686 # If there is no directory component, then add one.
1688 */* |
*\\*) .
$arg ;;
1692 if test -z "$pic_object" || \
1693 test -z "$non_pic_object" ||
1694 test "$pic_object" = none
&& \
1695 test "$non_pic_object" = none
; then
1696 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1700 # Extract subdirectory from the argument.
1701 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1702 if test "X$xdir" = "X$arg"; then
1708 if test "$pic_object" != none
; then
1709 # Prepend the subdirectory the object is found in.
1710 pic_object
="$xdir$pic_object"
1712 if test "$prev" = dlfiles
; then
1713 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1714 dlfiles
="$dlfiles $pic_object"
1718 # If libtool objects are unsupported, then we need to preload.
1723 # CHECK ME: I think I busted this. -Ossama
1724 if test "$prev" = dlprefiles
; then
1725 # Preload the old-style object.
1726 dlprefiles
="$dlprefiles $pic_object"
1731 libobjs
="$libobjs $pic_object"
1736 if test "$non_pic_object" != none
; then
1737 # Prepend the subdirectory the object is found in.
1738 non_pic_object
="$xdir$non_pic_object"
1740 # A standard non-PIC object
1741 non_pic_objects
="$non_pic_objects $non_pic_object"
1742 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1743 arg
="$non_pic_object"
1746 # If the PIC object exists, use it instead.
1747 # $xdir was prepended to $pic_object above.
1748 non_pic_object
="$pic_object"
1749 non_pic_objects
="$non_pic_objects $non_pic_object"
1752 # Only an error if not doing a dry-run.
1753 if test -z "$run"; then
1754 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1759 # Extract subdirectory from the argument.
1760 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1761 if test "X$xdir" = "X$arg"; then
1767 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1768 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1769 libobjs
="$libobjs $pic_object"
1770 non_pic_objects
="$non_pic_objects $non_pic_object"
1775 $echo "$modename: link input file \`$save_arg' does not exist"
1783 # We need an absolute path.
1785 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1787 $echo "$modename: only absolute run-paths are allowed" 1>&2
1791 if test "$prev" = rpath
; then
1794 *) rpath
="$rpath $arg" ;;
1799 *) xrpath
="$xrpath $arg" ;;
1806 compiler_flags
="$compiler_flags $qarg"
1808 compile_command
="$compile_command $qarg"
1809 finalize_command
="$finalize_command $qarg"
1813 linker_flags
="$linker_flags $qarg"
1814 compiler_flags
="$compiler_flags $wl$qarg"
1816 compile_command
="$compile_command $wl$qarg"
1817 finalize_command
="$finalize_command $wl$qarg"
1821 linker_flags
="$linker_flags $qarg"
1822 compiler_flags
="$compiler_flags $qarg"
1824 compile_command
="$compile_command $qarg"
1825 finalize_command
="$finalize_command $qarg"
1833 darwin_framework|darwin_framework_skip
)
1834 test "$prev" = "darwin_framework" && compiler_flags
="$compiler_flags $arg"
1835 compile_command
="$compile_command $arg"
1836 finalize_command
="$finalize_command $arg"
1841 eval "$prev=\"\$arg\""
1846 fi # test -n "$prev"
1852 if test -n "$link_static_flag"; then
1853 compile_command
="$compile_command $link_static_flag"
1854 finalize_command
="$finalize_command $link_static_flag"
1860 # FIXME: remove this flag sometime in the future.
1861 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1885 -export-symbols |
-export-symbols-regex)
1886 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1887 $echo "$modename: more than one -exported-symbols argument is not allowed"
1890 if test "X$arg" = "X-export-symbols"; then
1898 -framework|
-arch|
-isysroot)
1900 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1901 prev
=darwin_framework_skip
;;
1902 *) compiler_flags
="$compiler_flags $arg"
1903 prev
=darwin_framework
;;
1905 compile_command
="$compile_command $arg"
1906 finalize_command
="$finalize_command $arg"
1915 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1916 # so, if we see these flags be careful not to treat them like -L
1918 case $with_gcc/$host in
1919 no
/*-*-irix* |
/*-*-irix*)
1920 compile_command
="$compile_command $arg"
1921 finalize_command
="$finalize_command $arg"
1928 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1929 # We need an absolute path.
1931 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1933 absdir
=`cd "$dir" && pwd`
1934 if test -z "$absdir"; then
1935 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1937 notinst_path
="$notinst_path $dir"
1945 deplibs
="$deplibs -L$dir"
1946 lib_search_path
="$lib_search_path $dir"
1950 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1951 testbindir
=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1952 case :$dllsearchpath: in
1954 *) dllsearchpath
="$dllsearchpath:$dir";;
1956 case :$dllsearchpath: in
1957 *":$testbindir:"*) ;;
1958 *) dllsearchpath
="$dllsearchpath:$testbindir";;
1966 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1968 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-beos*)
1969 # These systems don't actually have a C or math library (as such)
1973 # These systems don't actually have a C library (as such)
1974 test "X$arg" = "X-lc" && continue
1976 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1977 # Do not include libc due to us having libc/libc_r.
1978 test "X$arg" = "X-lc" && continue
1980 *-*-rhapsody* |
*-*-darwin1.
[012])
1981 # Rhapsody C and math libraries are in the System framework
1982 deplibs
="$deplibs -framework System"
1985 *-*-sco3.2v5
* |
*-*-sco5v6*)
1986 # Causes problems with __ctype
1987 test "X$arg" = "X-lc" && continue
1989 *-*-sysv4.2uw2
* |
*-*-sysv5* |
*-*-unixware* |
*-*-OpenUNIX*)
1990 # Compiler inserts libc in the correct place for threads to work
1991 test "X$arg" = "X-lc" && continue
1994 elif test "X$arg" = "X-lc_r"; then
1996 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1997 # Do not include libc_r directly, use -pthread flag.
2002 deplibs
="$deplibs $arg"
2006 # Tru64 UNIX uses -model [arg] to determine the layout of C++
2007 # classes, name mangling, and exception handling.
2009 compile_command
="$compile_command $arg"
2010 compiler_flags
="$compiler_flags $arg"
2011 finalize_command
="$finalize_command $arg"
2016 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe|
-threads)
2017 compiler_flags
="$compiler_flags $arg"
2018 compile_command
="$compile_command $arg"
2019 finalize_command
="$finalize_command $arg"
2024 single_module
="${wl}-multi_module"
2033 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2034 # -r[0-9][0-9]* specifies the processor on the SGI compiler
2035 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2036 # +DA*, +DD* enable 64-bit mode on the HP compiler
2037 # -q* pass through compiler args for the IBM compiler
2038 # -m* pass through architecture-specific compiler args for GCC
2039 # -m*, -t[45]*, -txscale* pass through architecture-specific
2040 # compiler args for GCC
2041 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
2042 # -F/path gives path to uninstalled frameworks, gcc on darwin
2043 # @file GCC response files
2044 -64|
-mips[0-9]|
-r[0-9][0-9]*|
-xarch=*|
-xtarget=*|
+DA
*|
+DD
*|
-q*|
-m*| \
2045 -t[45]*|
-txscale*|
-p|
-pg|
--coverage|
-fprofile-*|
-F*|@
*)
2047 # Unknown arguments in both finalize_command and compile_command need
2048 # to be aesthetically quoted because they are evaled later.
2049 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2051 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2055 compile_command
="$compile_command $arg"
2056 finalize_command
="$finalize_command $arg"
2057 compiler_flags
="$compiler_flags $arg"
2073 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-darwin*)
2074 # The PATH hackery in wrapper scripts is required on Windows
2075 # and Darwin in order for the loader to find any dlls it needs.
2076 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2077 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2080 *) no_install
=yes ;;
2097 -precious-files-regex)
2118 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2119 # We need an absolute path.
2121 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
2123 $echo "$modename: only absolute run-paths are allowed" 1>&2
2129 *) xrpath
="$xrpath $dir" ;;
2134 -static |
-static-libtool-libs)
2135 # The effects of -static are defined in a previous loop.
2136 # We used to do the same as -all-static on platforms that
2137 # didn't have a PIC flag, but the assumption that the effects
2138 # would be equivalent was wrong. It would break on at least
2139 # Digital Unix and AIX.
2159 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2161 save_ifs
="$IFS"; IFS
=','
2162 for flag
in $args; do
2165 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2170 compiler_flags
="$compiler_flags $flag"
2173 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2177 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2179 save_ifs
="$IFS"; IFS
=','
2180 for flag
in $args; do
2183 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2188 compiler_flags
="$compiler_flags $wl$flag"
2189 linker_flags
="$linker_flags $flag"
2192 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2210 # Some other compiler flag.
2212 # Unknown arguments in both finalize_command and compile_command need
2213 # to be aesthetically quoted because they are evaled later.
2214 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2216 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2223 # A standard object.
2228 # A libtool-controlled object.
2230 # Check to see that this really is a libtool object.
2231 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2236 # If there is no directory component, then add one.
2238 */* |
*\\*) .
$arg ;;
2242 if test -z "$pic_object" || \
2243 test -z "$non_pic_object" ||
2244 test "$pic_object" = none
&& \
2245 test "$non_pic_object" = none
; then
2246 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2250 # Extract subdirectory from the argument.
2251 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2252 if test "X$xdir" = "X$arg"; then
2258 if test "$pic_object" != none
; then
2259 # Prepend the subdirectory the object is found in.
2260 pic_object
="$xdir$pic_object"
2262 if test "$prev" = dlfiles
; then
2263 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2264 dlfiles
="$dlfiles $pic_object"
2268 # If libtool objects are unsupported, then we need to preload.
2273 # CHECK ME: I think I busted this. -Ossama
2274 if test "$prev" = dlprefiles
; then
2275 # Preload the old-style object.
2276 dlprefiles
="$dlprefiles $pic_object"
2281 libobjs
="$libobjs $pic_object"
2286 if test "$non_pic_object" != none
; then
2287 # Prepend the subdirectory the object is found in.
2288 non_pic_object
="$xdir$non_pic_object"
2290 # A standard non-PIC object
2291 non_pic_objects
="$non_pic_objects $non_pic_object"
2292 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2293 arg
="$non_pic_object"
2296 # If the PIC object exists, use it instead.
2297 # $xdir was prepended to $pic_object above.
2298 non_pic_object
="$pic_object"
2299 non_pic_objects
="$non_pic_objects $non_pic_object"
2302 # Only an error if not doing a dry-run.
2303 if test -z "$run"; then
2304 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2309 # Extract subdirectory from the argument.
2310 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2311 if test "X$xdir" = "X$arg"; then
2317 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2318 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2319 libobjs
="$libobjs $pic_object"
2320 non_pic_objects
="$non_pic_objects $non_pic_object"
2327 deplibs
="$deplibs $arg"
2328 old_deplibs
="$old_deplibs $arg"
2333 # A libtool-controlled library.
2335 if test "$prev" = dlfiles
; then
2336 # This library was specified with -dlopen.
2337 dlfiles
="$dlfiles $arg"
2339 elif test "$prev" = dlprefiles
; then
2340 # The library was specified with -dlpreopen.
2341 dlprefiles
="$dlprefiles $arg"
2344 deplibs
="$deplibs $arg"
2349 # Some other compiler argument.
2351 # Unknown arguments in both finalize_command and compile_command need
2352 # to be aesthetically quoted because they are evaled later.
2353 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2355 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2362 # Now actually substitute the argument into the commands.
2363 if test -n "$arg"; then
2364 compile_command
="$compile_command $arg"
2365 finalize_command
="$finalize_command $arg"
2367 done # argument parsing loop
2369 if test -n "$prev"; then
2370 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2375 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2376 eval arg
=\"$export_dynamic_flag_spec\"
2377 compile_command
="$compile_command $arg"
2378 finalize_command
="$finalize_command $arg"
2382 # calculate the name of the file, without its directory
2383 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2384 libobjs_save
="$libobjs"
2386 if test -n "$shlibpath_var"; then
2387 # get the directories listed in $shlibpath_var
2388 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2392 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2393 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2395 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2396 if test "X$output_objdir" = "X$output"; then
2397 output_objdir
="$objdir"
2399 output_objdir
="$output_objdir/$objdir"
2401 # Create the object directory.
2402 if test ! -d "$output_objdir"; then
2403 $show "$mkdir $output_objdir"
2404 $run $mkdir $output_objdir
2406 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2411 # Determine the type of output
2414 $echo "$modename: you must specify an output file" 1>&2
2418 *.
$libext) linkmode
=oldlib
;;
2419 *.lo |
*.
$objext) linkmode
=obj
;;
2420 *.la
) linkmode
=lib
;;
2421 *) linkmode
=prog
;; # Anything else should be a program.
2425 *cygwin
* |
*mingw
* |
*pw32
*)
2426 # don't eliminate duplications in $postdeps and $predeps
2427 duplicate_compiler_generated_deps
=yes
2430 duplicate_compiler_generated_deps
=$duplicate_deps
2436 # Find all interdependent deplibs by searching for libraries
2437 # that are linked more than once (e.g. -la -lb -la)
2438 for deplib
in $deplibs; do
2439 if test "X$duplicate_deps" = "Xyes" ; then
2441 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2444 libs
="$libs $deplib"
2447 if test "$linkmode" = lib
; then
2448 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2450 # Compute libraries that are listed more than once in $predeps
2451 # $postdeps and mark them as special (i.e., whose duplicates are
2452 # not to be eliminated).
2454 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2455 for pre_post_dep
in $predeps $postdeps; do
2456 case "$pre_post_deps " in
2457 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2459 pre_post_deps
="$pre_post_deps $pre_post_dep"
2468 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2469 notinst_deplibs
= # not-installed libtool libraries
2473 for file in $dlfiles $dlprefiles; do
2477 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2489 passes
="conv scan dlopen dlpreopen link"
2494 for pass
in $passes; do
2495 if test "$linkmode,$pass" = "lib,link" ||
2496 test "$linkmode,$pass" = "prog,scan"; then
2500 if test "$linkmode" = prog
; then
2502 dlopen
) libs
="$dlfiles" ;;
2503 dlpreopen
) libs
="$dlprefiles" ;;
2504 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2507 if test "$pass" = dlopen
; then
2508 # Collect dlpreopened libraries
2509 save_deplibs
="$deplibs"
2512 for deplib
in $libs; do
2516 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe|
-threads)
2517 if test "$linkmode,$pass" = "prog,link"; then
2518 compile_deplibs
="$deplib $compile_deplibs"
2519 finalize_deplibs
="$deplib $finalize_deplibs"
2521 compiler_flags
="$compiler_flags $deplib"
2526 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2527 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2530 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2531 if test "$linkmode" = lib
; then
2532 searchdirs
="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
2534 searchdirs
="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
2536 for searchdir
in $searchdirs; do
2537 for search_ext
in .la
$std_shrext .so .a
; do
2538 # Search the libtool library
2539 lib
="$searchdir/lib${name}${search_ext}"
2540 if test -f "$lib"; then
2541 if test "$search_ext" = ".la"; then
2550 if test "$found" != yes; then
2551 # deplib doesn't seem to be a libtool library
2552 if test "$linkmode,$pass" = "prog,link"; then
2553 compile_deplibs
="$deplib $compile_deplibs"
2554 finalize_deplibs
="$deplib $finalize_deplibs"
2556 deplibs
="$deplib $deplibs"
2557 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2560 else # deplib is a libtool library
2561 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2562 # We need to do some special things here, and not later.
2563 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2564 case " $predeps $postdeps " in
2566 if (${SED} -e '2q' $lib |
2567 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2571 */* |
*\\*) .
$lib ;;
2574 for l
in $old_library $library_names; do
2577 if test "X$ll" = "X$old_library" ; then # only static version available
2579 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2580 test "X$ladir" = "X$lib" && ladir
="."
2581 lib
=$ladir/$old_library
2582 if test "$linkmode,$pass" = "prog,link"; then
2583 compile_deplibs
="$deplib $compile_deplibs"
2584 finalize_deplibs
="$deplib $finalize_deplibs"
2586 deplibs
="$deplib $deplibs"
2587 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2601 deplibs
="$deplib $deplibs"
2602 test "$pass" = conv
&& continue
2603 newdependency_libs
="$deplib $newdependency_libs"
2604 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2607 if test "$pass" = conv
; then
2608 deplibs
="$deplib $deplibs"
2611 if test "$pass" = scan
; then
2612 deplibs
="$deplib $deplibs"
2614 compile_deplibs
="$deplib $compile_deplibs"
2615 finalize_deplibs
="$deplib $finalize_deplibs"
2617 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2620 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2626 if test "$pass" = link
; then
2627 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2628 # Make sure the xrpath contains only unique directories.
2631 *) xrpath
="$xrpath $dir" ;;
2634 deplibs
="$deplib $deplibs"
2637 *.la
) lib
="$deplib" ;;
2639 if test "$pass" = conv
; then
2640 deplibs
="$deplib $deplibs"
2646 case $deplibs_check_method in
2648 set dummy
$deplibs_check_method
2649 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2650 if eval $echo \"$deplib\" 2>/dev
/null \
2652 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2660 if test "$valid_a_lib" != yes; then
2662 $echo "*** Warning: Trying to link with static lib archive $deplib."
2663 $echo "*** I have the capability to make that library automatically link in when"
2664 $echo "*** you link to this library. But I can only do this if you have a"
2665 $echo "*** shared version of the library, which you do not appear to have"
2666 $echo "*** because the file extensions .$libext of this argument makes me believe"
2667 $echo "*** that it is just a static archive that I should not used here."
2670 $echo "*** Warning: Linking the shared library $output against the"
2671 $echo "*** static library $deplib is not portable!"
2672 deplibs
="$deplib $deplibs"
2677 if test "$pass" != link
; then
2678 deplibs
="$deplib $deplibs"
2680 compile_deplibs
="$deplib $compile_deplibs"
2681 finalize_deplibs
="$deplib $finalize_deplibs"
2688 if test "$pass" = conv
; then
2689 deplibs
="$deplib $deplibs"
2690 elif test "$linkmode" = prog
; then
2691 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2692 # If there is no dlopen support or we're linking statically,
2693 # we need to preload.
2694 newdlprefiles
="$newdlprefiles $deplib"
2695 compile_deplibs
="$deplib $compile_deplibs"
2696 finalize_deplibs
="$deplib $finalize_deplibs"
2698 newdlfiles
="$newdlfiles $deplib"
2708 if test "$found" = yes ||
test -f "$lib"; then :
2710 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2714 # Check to see that this really is a libtool archive.
2715 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2717 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2721 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2722 test "X$ladir" = "X$lib" && ladir
="."
2730 # If the library was installed with an old release of libtool,
2731 # it will not redefine variables installed, or shouldnotlink
2739 */* |
*\\*) .
$lib ;;
2743 if test "$linkmode,$pass" = "lib,link" ||
2744 test "$linkmode,$pass" = "prog,scan" ||
2745 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2746 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2747 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2750 if test "$pass" = conv
; then
2751 # Only check for convenience libraries
2752 deplibs
="$lib $deplibs"
2753 if test -z "$libdir"; then
2754 if test -z "$old_library"; then
2755 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2758 # It is a libtool convenience library, so add in its objects.
2759 convenience
="$convenience $ladir/$objdir/$old_library"
2760 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2762 for deplib
in $dependency_libs; do
2763 deplibs
="$deplib $deplibs"
2764 if test "X$duplicate_deps" = "Xyes" ; then
2765 case "$tmp_libs " in
2766 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2769 tmp_libs
="$tmp_libs $deplib"
2771 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2772 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2779 # Get the name of the library we link against.
2781 for l
in $old_library $library_names; do
2784 if test -z "$linklib"; then
2785 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2789 # This library was specified with -dlopen.
2790 if test "$pass" = dlopen
; then
2791 if test -z "$libdir"; then
2792 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2795 if test -z "$dlname" ||
2796 test "$dlopen_support" != yes ||
2797 test "$build_libtool_libs" = no
; then
2798 # If there is no dlname, no dlopen support or we're linking
2799 # statically, we need to preload. We also need to preload any
2800 # dependent libraries so libltdl's deplib preloader doesn't
2801 # bomb out in the load deplibs phase.
2802 dlprefiles
="$dlprefiles $lib $dependency_libs"
2804 newdlfiles
="$newdlfiles $lib"
2809 # We need an absolute path.
2811 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2813 abs_ladir
=`cd "$ladir" && pwd`
2814 if test -z "$abs_ladir"; then
2815 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2816 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2821 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2823 # Find the relevant object directory and library name.
2824 if test "X$installed" = Xyes
; then
2825 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2826 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2834 test "X$hardcode_automatic" = Xyes
&& avoidtemprpath
=yes
2836 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2839 # Remove this search path later
2840 notinst_path
="$notinst_path $abs_ladir"
2842 dir
="$ladir/$objdir"
2843 absdir
="$abs_ladir/$objdir"
2844 # Remove this search path later
2845 notinst_path
="$notinst_path $abs_ladir"
2847 fi # $installed = yes
2848 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2850 # This library was specified with -dlpreopen.
2851 if test "$pass" = dlpreopen
; then
2852 if test -z "$libdir"; then
2853 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2856 # Prefer using a static library (so that no silly _DYNAMIC symbols
2857 # are required to link).
2858 if test -n "$old_library"; then
2859 newdlprefiles
="$newdlprefiles $dir/$old_library"
2860 # Otherwise, use the dlname, so that lt_dlopen finds it.
2861 elif test -n "$dlname"; then
2862 newdlprefiles
="$newdlprefiles $dir/$dlname"
2864 newdlprefiles
="$newdlprefiles $dir/$linklib"
2866 fi # $pass = dlpreopen
2868 if test -z "$libdir"; then
2869 # Link the convenience library
2870 if test "$linkmode" = lib
; then
2871 deplibs
="$dir/$old_library $deplibs"
2872 elif test "$linkmode,$pass" = "prog,link"; then
2873 compile_deplibs
="$dir/$old_library $compile_deplibs"
2874 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2876 deplibs
="$lib $deplibs" # used for prog,scan pass
2882 if test "$linkmode" = prog
&& test "$pass" != link
; then
2883 newlib_search_path
="$newlib_search_path $ladir"
2884 deplibs
="$lib $deplibs"
2887 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2888 test "$build_libtool_libs" = no
; then
2893 for deplib
in $dependency_libs; do
2895 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2897 # Need to link against all dependency_libs?
2898 if test "$linkalldeplibs" = yes; then
2899 deplibs
="$deplib $deplibs"
2901 # Need to hardcode shared library paths
2902 # or/and link against static libraries
2903 newdependency_libs
="$deplib $newdependency_libs"
2905 if test "X$duplicate_deps" = "Xyes" ; then
2906 case "$tmp_libs " in
2907 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2910 tmp_libs
="$tmp_libs $deplib"
2913 fi # $linkmode = prog...
2915 if test "$linkmode,$pass" = "prog,link"; then
2916 if test -n "$library_names" &&
2917 { { test "$prefer_static_libs" = no ||
2918 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2919 test -z "$old_library"; }; then
2920 # We need to hardcode the library path
2921 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2922 # Make sure the rpath contains only unique directories.
2923 case "$temp_rpath " in
2926 *) temp_rpath
="$temp_rpath $absdir" ;;
2930 # Hardcode the library path.
2931 # Skip directories that are in the system default run-time
2933 case " $sys_lib_dlsearch_path " in
2936 case "$compile_rpath " in
2938 *) compile_rpath
="$compile_rpath $absdir"
2942 case " $sys_lib_dlsearch_path " in
2945 case "$finalize_rpath " in
2947 *) finalize_rpath
="$finalize_rpath $libdir"
2951 fi # $linkmode,$pass = prog,link...
2953 if test "$alldeplibs" = yes &&
2954 { test "$deplibs_check_method" = pass_all ||
2955 { test "$build_libtool_libs" = yes &&
2956 test -n "$library_names"; }; }; then
2957 # We only need to search for static libraries
2962 link_static
=no
# Whether the deplib will be linked statically
2963 use_static_libs
=$prefer_static_libs
2964 if test "$use_static_libs" = built
&& test "$installed" = yes ; then
2967 if test -n "$library_names" &&
2968 { test "$use_static_libs" = no ||
test -z "$old_library"; }; then
2969 if test "$installed" = no
; then
2970 notinst_deplibs
="$notinst_deplibs $lib"
2973 # This is a shared library
2975 # Warn about portability, can't link against -module's on
2976 # some systems (darwin)
2977 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2979 if test "$linkmode" = prog
; then
2980 $echo "*** Warning: Linking the executable $output against the loadable module"
2982 $echo "*** Warning: Linking the shared library $output against the loadable module"
2984 $echo "*** $linklib is not portable!"
2986 if test "$linkmode" = lib
&&
2987 test "$hardcode_into_libs" = yes; then
2988 # Hardcode the library path.
2989 # Skip directories that are in the system default run-time
2991 case " $sys_lib_dlsearch_path " in
2994 case "$compile_rpath " in
2996 *) compile_rpath
="$compile_rpath $absdir"
3000 case " $sys_lib_dlsearch_path " in
3003 case "$finalize_rpath " in
3005 *) finalize_rpath
="$finalize_rpath $libdir"
3011 if test -n "$old_archive_from_expsyms_cmds"; then
3012 # figure out the soname
3013 set dummy
$library_names
3016 libname
=`eval \\$echo \"$libname_spec\"`
3017 # use dlname if we got it. it's perfectly good, no?
3018 if test -n "$dlname"; then
3020 elif test -n "$soname_spec"; then
3024 major
=`expr $current - $age`
3028 eval soname
=\"$soname_spec\"
3033 # Make a new name for the extract_expsyms_cmds to use
3035 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
3036 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
3038 # If the library has no export list, then create one now
3039 if test -f "$output_objdir/$soname-def"; then :
3041 $show "extracting exported symbol list from \`$soname'"
3042 save_ifs
="$IFS"; IFS
='~'
3043 cmds
=$extract_expsyms_cmds
3044 for cmd
in $cmds; do
3048 $run eval "$cmd" ||
exit $?
3054 if test -f "$output_objdir/$newlib"; then :; else
3055 $show "generating import library for \`$soname'"
3056 save_ifs
="$IFS"; IFS
='~'
3057 cmds
=$old_archive_from_expsyms_cmds
3058 for cmd
in $cmds; do
3062 $run eval "$cmd" ||
exit $?
3066 # make sure the library variables are pointing to the new library
3069 fi # test -n "$old_archive_from_expsyms_cmds"
3071 if test "$linkmode" = prog ||
test "$mode" != relink
; then
3076 case $hardcode_action in
3077 immediate | unsupported
)
3078 if test "$hardcode_direct" = no
; then
3081 *-*-sco3.2v5.0.
[024]*) add_dir
="-L$dir" ;;
3082 *-*-sysv4*uw2
*) add_dir
="-L$dir" ;;
3083 *-*-sysv5OpenUNIX* |
*-*-sysv5UnixWare7.
[01].
[10]* | \
3084 *-*-unixware7*) add_dir
="-L$dir" ;;
3086 # if the lib is a module then we can not link against
3087 # it, someone is ignoring the new warnings I added
3088 if /usr
/bin
/file -L $add 2> /dev
/null |
3089 $EGREP ": [^:]* bundle" >/dev
/null
; then
3090 $echo "** Warning, lib $linklib is a module, not a shared library"
3091 if test -z "$old_library" ; then
3093 $echo "** And there doesn't seem to be a static archive available"
3094 $echo "** The link will probably fail, sorry"
3096 add
="$dir/$old_library"
3100 elif test "$hardcode_minus_L" = no
; then
3102 *-*-sunos*) add_shlibpath
="$dir" ;;
3106 elif test "$hardcode_shlibpath_var" = no
; then
3107 add_shlibpath
="$dir"
3114 if test "$hardcode_direct" = yes; then
3116 elif test "$hardcode_minus_L" = yes; then
3118 # Try looking first in the location we're being installed to.
3119 if test -n "$inst_prefix_dir"; then
3122 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3127 elif test "$hardcode_shlibpath_var" = yes; then
3128 add_shlibpath
="$dir"
3137 if test "$lib_linked" != yes; then
3138 $echo "$modename: configuration error: unsupported hardcode properties"
3142 if test -n "$add_shlibpath"; then
3143 case :$compile_shlibpath: in
3144 *":$add_shlibpath:"*) ;;
3145 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
3148 if test "$linkmode" = prog
; then
3149 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
3150 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
3152 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3153 test -n "$add" && deplibs
="$add $deplibs"
3154 if test "$hardcode_direct" != yes && \
3155 test "$hardcode_minus_L" != yes && \
3156 test "$hardcode_shlibpath_var" = yes; then
3157 case :$finalize_shlibpath: in
3159 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3165 if test "$linkmode" = prog ||
test "$mode" = relink
; then
3169 # Finalize command for both is simple: just hardcode it.
3170 if test "$hardcode_direct" = yes; then
3171 add
="$libdir/$linklib"
3172 elif test "$hardcode_minus_L" = yes; then
3175 elif test "$hardcode_shlibpath_var" = yes; then
3176 case :$finalize_shlibpath: in
3178 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3181 elif test "$hardcode_automatic" = yes; then
3182 if test -n "$inst_prefix_dir" &&
3183 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3184 add
="$inst_prefix_dir$libdir/$linklib"
3186 add
="$libdir/$linklib"
3189 # We cannot seem to hardcode it, guess we'll fake it.
3191 # Try looking first in the location we're being installed to.
3192 if test -n "$inst_prefix_dir"; then
3195 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3202 if test "$linkmode" = prog
; then
3203 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
3204 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
3206 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3207 test -n "$add" && deplibs
="$add $deplibs"
3210 elif test "$linkmode" = prog
; then
3211 # Here we assume that one of hardcode_direct or hardcode_minus_L
3212 # is not unsupported. This is valid on all known static and
3214 if test "$hardcode_direct" != unsupported
; then
3215 test -n "$old_library" && linklib
="$old_library"
3216 compile_deplibs
="$dir/$linklib $compile_deplibs"
3217 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3219 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3220 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3222 elif test "$build_libtool_libs" = yes; then
3223 # Not a shared library
3224 if test "$deplibs_check_method" != pass_all
; then
3225 # We're trying link a shared library against a static one
3226 # but the system doesn't support it.
3228 # Just print a warning and add the library to dependency_libs so
3229 # that the program can be linked against the static library.
3231 $echo "*** Warning: This system can not link to static lib archive $lib."
3232 $echo "*** I have the capability to make that library automatically link in when"
3233 $echo "*** you link to this library. But I can only do this if you have a"
3234 $echo "*** shared version of the library, which you do not appear to have."
3235 if test "$module" = yes; then
3236 $echo "*** But as you try to build a module library, libtool will still create "
3237 $echo "*** a static module, that should work as long as the dlopening application"
3238 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3239 if test -z "$global_symbol_pipe"; then
3241 $echo "*** However, this would only work if libtool was able to extract symbol"
3242 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3243 $echo "*** not find such a program. So, this module is probably useless."
3244 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3246 if test "$build_old_libs" = no
; then
3247 build_libtool_libs
=module
3250 build_libtool_libs
=no
3254 deplibs
="$dir/$old_library $deplibs"
3257 fi # link shared/static library?
3259 if test "$linkmode" = lib
; then
3260 if test -n "$dependency_libs" &&
3261 { test "$hardcode_into_libs" != yes ||
3262 test "$build_old_libs" = yes ||
3263 test "$link_static" = yes; }; then
3264 # Extract -R from dependency_libs
3266 for libdir
in $dependency_libs; do
3268 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3270 *" $temp_xrpath "*) ;;
3271 *) xrpath
="$xrpath $temp_xrpath";;
3273 *) temp_deplibs
="$temp_deplibs $libdir";;
3276 dependency_libs
="$temp_deplibs"
3279 newlib_search_path
="$newlib_search_path $absdir"
3280 # Link against this library
3281 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3282 # ... and its dependency_libs
3284 for deplib
in $dependency_libs; do
3285 newdependency_libs
="$deplib $newdependency_libs"
3286 if test "X$duplicate_deps" = "Xyes" ; then
3287 case "$tmp_libs " in
3288 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3291 tmp_libs
="$tmp_libs $deplib"
3294 if test "$link_all_deplibs" != no
; then
3295 # Add the search paths of all dependency libraries
3296 for deplib
in $dependency_libs; do
3298 -L*) path
="$deplib" ;;
3300 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3301 test "X$dir" = "X$deplib" && dir
="."
3302 # We need an absolute path.
3304 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3306 absdir
=`cd "$dir" && pwd`
3307 if test -z "$absdir"; then
3308 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3313 if grep "^installed=no" $deplib > /dev
/null
; then
3314 path
="$absdir/$objdir"
3316 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3317 if test -z "$libdir"; then
3318 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3321 if test "$absdir" != "$libdir"; then
3322 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3329 # we do not want to link against static libs,
3330 # but need to link against shared
3331 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3332 eval deplibdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3333 if test -n "$deplibrary_names" ; then
3334 for tmp
in $deplibrary_names ; do
3337 if test -f "$deplibdir/$depdepl" ; then
3338 depdepl
="$deplibdir/$depdepl"
3339 elif test -f "$path/$depdepl" ; then
3340 depdepl
="$path/$depdepl"
3342 # Can't find it, oh well...
3345 # do not add paths which are already there
3346 case " $newlib_search_path " in
3348 *) newlib_search_path
="$newlib_search_path $path";;
3361 # Again, we only want to link against shared libraries
3362 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3363 for tmp
in $newlib_search_path ; do
3364 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3365 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3376 case " $deplibs " in
3378 *) deplibs
="$path $deplibs" ;;
3380 case " $deplibs " in
3382 *) deplibs
="$depdepl $deplibs" ;;
3385 fi # link_all_deplibs != no
3387 done # for deplib in $libs
3388 dependency_libs
="$newdependency_libs"
3389 if test "$pass" = dlpreopen
; then
3390 # Link the dlpreopened libraries before other libraries
3391 for deplib
in $save_deplibs; do
3392 deplibs
="$deplib $deplibs"
3395 if test "$pass" != dlopen
; then
3396 if test "$pass" != conv
; then
3397 # Make sure lib_search_path contains only unique directories.
3399 for dir
in $newlib_search_path; do
3400 case "$lib_search_path " in
3402 *) lib_search_path
="$lib_search_path $dir" ;;
3408 if test "$linkmode,$pass" != "prog,link"; then
3411 vars
="compile_deplibs finalize_deplibs"
3413 for var
in $vars dependency_libs
; do
3414 # Add libraries to $var in reverse order
3415 eval tmp_libs
=\"\$
$var\"
3417 for deplib
in $tmp_libs; do
3418 # FIXME: Pedantically, this is the right thing to do, so
3419 # that some nasty dependency loop isn't accidentally
3421 #new_libs="$deplib $new_libs"
3422 # Pragmatically, this seems to cause very few problems in
3425 -L*) new_libs
="$deplib $new_libs" ;;
3428 # And here is the reason: when a library appears more
3429 # than once as an explicit dependence of a library, or
3430 # is implicitly linked in more than once by the
3431 # compiler, it is considered special, and multiple
3432 # occurrences thereof are not removed. Compare this
3433 # with having the same library being listed as a
3434 # dependency of multiple other libraries: in this case,
3435 # we know (pedantically, we assume) the library does not
3436 # need to be listed more than once, so we keep only the
3437 # last copy. This is not always right, but it is rare
3438 # enough that we require users that really mean to play
3439 # such unportable linking tricks to link the library
3440 # using -Wl,-lname, so that libtool does not consider it
3441 # for duplicate removal.
3442 case " $specialdeplibs " in
3443 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3445 case " $new_libs " in
3447 *) new_libs
="$deplib $new_libs" ;;
3455 for deplib
in $new_libs; do
3458 case " $tmp_libs " in
3460 *) tmp_libs
="$tmp_libs $deplib" ;;
3463 *) tmp_libs
="$tmp_libs $deplib" ;;
3466 eval $var=\"$tmp_libs\"
3469 # Last step: remove runtime libs from dependency_libs
3470 # (they stay in deplibs)
3472 for i
in $dependency_libs ; do
3473 case " $predeps $postdeps $compiler_lib_search_path " in
3478 if test -n "$i" ; then
3479 tmp_libs
="$tmp_libs $i"
3482 dependency_libs
=$tmp_libs
3484 if test "$linkmode" = prog
; then
3485 dlfiles
="$newdlfiles"
3486 dlprefiles
="$newdlprefiles"
3493 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
3496 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3497 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3500 if test -n "$rpath"; then
3501 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3504 if test -n "$xrpath"; then
3505 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3508 if test -n "$vinfo"; then
3509 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3512 if test -n "$release"; then
3513 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3516 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3517 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3520 # Now set the variables for building old libraries.
3521 build_libtool_libs
=no
3523 objs
="$objs$old_deplibs"
3527 # Make sure we only generate libraries of the form `libNAME.la'.
3530 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3531 eval shared_ext
=\"$shrext_cmds\"
3532 eval libname
=\"$libname_spec\"
3535 if test "$module" = no
; then
3536 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3540 if test "$need_lib_prefix" != no
; then
3541 # Add the "lib" prefix for modules if required
3542 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3543 eval shared_ext
=\"$shrext_cmds\"
3544 eval libname
=\"$libname_spec\"
3546 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3551 if test -n "$objs"; then
3552 if test "$deplibs_check_method" != pass_all
; then
3553 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3557 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3558 $echo "*** objects $objs is not portable!"
3559 libobjs
="$libobjs $objs"
3563 if test "$dlself" != no
; then
3564 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3568 if test "$#" -gt 2; then
3569 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3574 if test -z "$rpath"; then
3575 if test "$build_libtool_libs" = yes; then
3576 # Building a libtool convenience library.
3577 # Some compilers have problems with a `.al' extension so
3578 # convenience libraries should have the same extension an
3579 # archive normally would.
3580 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3581 build_libtool_libs
=convenience
3585 if test -n "$vinfo"; then
3586 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3589 if test -n "$release"; then
3590 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3594 # Parse the version information argument.
3595 save_ifs
="$IFS"; IFS
=':'
3596 set dummy
$vinfo 0 0 0
3599 if test -n "$8"; then
3600 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3605 # convert absolute version numbers to libtool ages
3606 # this retains compatibility with .la files and attempts
3607 # to make the code below a bit more comprehensible
3609 case $vinfo_number in
3613 number_revision
="$4"
3615 # There are really only two kinds -- those that
3616 # use the current revision as the major version
3617 # and those that subtract age and use age as
3618 # a minor version. But, then there is irix
3619 # which has an extra 1 added just for fun
3621 case $version_type in
3622 darwin|linux|osf|windows|none
)
3623 current
=`expr $number_major + $number_minor`
3625 revision
="$number_revision"
3627 freebsd-aout|freebsd-elf|sunos
)
3628 current
="$number_major"
3629 revision
="$number_minor"
3633 current
=`expr $number_major + $number_minor`
3635 revision
="$number_minor"
3636 lt_irix_increment
=no
3647 # Check that each of the things are valid numbers.
3649 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]) ;;
3651 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3652 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3658 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]) ;;
3660 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3661 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3667 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]) ;;
3669 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3670 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3675 if test "$age" -gt "$current"; then
3676 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3677 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3681 # Calculate the version variables.
3685 case $version_type in
3689 # Like Linux, but with the current version available in
3690 # verstring for coding it into the library header
3691 major
=.
`expr $current - $age`
3692 versuffix
="$major.$age.$revision"
3693 # Darwin ld doesn't like 0 for these options...
3694 minor_current
=`expr $current + 1`
3695 xlcverstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3696 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
3701 versuffix
=".$current.$revision";
3706 versuffix
=".$current";
3710 if test "X$lt_irix_increment" = "Xno"; then
3711 major
=`expr $current - $age`
3713 major
=`expr $current - $age + 1`
3715 case $version_type in
3716 nonstopux
) verstring_prefix
=nonstopux
;;
3717 *) verstring_prefix
=sgi
;;
3719 verstring
="$verstring_prefix$major.$revision"
3721 # Add in all the interfaces that we are compatible with.
3723 while test "$loop" -ne 0; do
3724 iface
=`expr $revision - $loop`
3725 loop
=`expr $loop - 1`
3726 verstring
="$verstring_prefix$major.$iface:$verstring"
3729 # Before this point, $major must not contain `.'.
3731 versuffix
="$major.$revision"
3735 major
=.
`expr $current - $age`
3736 versuffix
="$major.$age.$revision"
3740 major
=.
`expr $current - $age`
3741 versuffix
=".$current.$age.$revision"
3742 verstring
="$current.$age.$revision"
3744 # Add in all the interfaces that we are compatible with.
3746 while test "$loop" -ne 0; do
3747 iface
=`expr $current - $loop`
3748 loop
=`expr $loop - 1`
3749 verstring
="$verstring:${iface}.0"
3752 # Make executables depend on our current version.
3753 verstring
="$verstring:${current}.0"
3758 versuffix
=".$current.$revision"
3762 # Use '-' rather than '.', since we only want one
3763 # extension on DOS 8.3 filesystems.
3764 major
=`expr $current - $age`
3769 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3770 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3775 # Clear the version info if we defaulted, and they specified a release.
3776 if test -z "$vinfo" && test -n "$release"; then
3778 case $version_type in
3780 # we can't check for "0.0" in archive_cmds due to quoting
3781 # problems, so we reset it completely
3788 if test "$need_version" = no
; then
3795 # Remove version info from name if versioning should be avoided
3796 if test "$avoid_version" = yes && test "$need_version" = no
; then
3802 # Check to see if the archive will have undefined symbols.
3803 if test "$allow_undefined" = yes; then
3804 if test "$allow_undefined_flag" = unsupported
; then
3805 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3806 build_libtool_libs
=no
3810 # Don't allow undefined symbols.
3811 allow_undefined_flag
="$no_undefined_flag"
3815 if test "$mode" != relink
; then
3816 # Remove our outputs, but don't remove object files since they
3817 # may have been created when compiling PIC objects.
3819 tempremovelist
=`$echo "$output_objdir/*"`
3820 for p
in $tempremovelist; do
3824 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3825 if test "X$precious_files_regex" != "X"; then
3826 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3831 removelist
="$removelist $p"
3836 if test -n "$removelist"; then
3837 $show "${rm}r $removelist"
3838 $run ${rm}r
$removelist
3842 # Now set the variables for building old libraries.
3843 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3844 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3846 # Transform .lo files to .o files.
3847 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3850 # Eliminate all temporary directories.
3851 #for path in $notinst_path; do
3852 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3853 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3854 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3857 if test -n "$xrpath"; then
3858 # If the user specified any rpath flags, then add them.
3860 for libdir
in $xrpath; do
3861 temp_xrpath
="$temp_xrpath -R$libdir"
3862 case "$finalize_rpath " in
3864 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3867 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3868 dependency_libs
="$temp_xrpath $dependency_libs"
3872 # Make sure dlfiles contains only unique files that won't be dlpreopened
3873 old_dlfiles
="$dlfiles"
3875 for lib
in $old_dlfiles; do
3876 case " $dlprefiles $dlfiles " in
3878 *) dlfiles
="$dlfiles $lib" ;;
3882 # Make sure dlprefiles contains only unique files
3883 old_dlprefiles
="$dlprefiles"
3885 for lib
in $old_dlprefiles; do
3886 case "$dlprefiles " in
3888 *) dlprefiles
="$dlprefiles $lib" ;;
3892 if test "$build_libtool_libs" = yes; then
3893 if test -n "$rpath"; then
3895 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3896 # these systems don't actually have a c library (as such)!
3898 *-*-rhapsody* |
*-*-darwin1.
[012])
3899 # Rhapsody C library is in the System framework
3900 deplibs
="$deplibs -framework System"
3903 # Don't link with libc until the a.out ld.so is fixed.
3905 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
3906 # Do not include libc due to us having libc/libc_r.
3908 *-*-sco3.2v5
* |
*-*-sco5v6*)
3909 # Causes problems with __ctype
3911 *-*-sysv4.2uw2
* |
*-*-sysv5* |
*-*-unixware* |
*-*-OpenUNIX*)
3912 # Compiler inserts libc in the correct place for threads to work
3915 # Add libc to deplibs on all other systems if necessary.
3916 if test "$build_libtool_need_lc" = "yes"; then
3917 deplibs
="$deplibs -lc"
3923 # Transform deplibs into only deplibs that can be linked in shared.
3925 libname_save
=$libname
3926 release_save
=$release
3927 versuffix_save
=$versuffix
3929 # I'm not sure if I'm treating the release correctly. I think
3930 # release should show up in the -l (ie -lgmp5) so we don't want to
3931 # add it in twice. Is that correct?
3937 case $deplibs_check_method in
3939 # Don't check for shared/static. Everything works.
3940 # This might be a little naive. We might want to check
3941 # whether the library exists or not. But this is on
3942 # osf3 & osf4 and I'm not really sure... Just
3943 # implementing what was already the behavior.
3947 # This code stresses the "libraries are programs" paradigm to its
3948 # limits. Maybe even breaks it. We compile a program, linking it
3949 # against the deplibs as a proxy for the library. Then we can check
3950 # whether they linked in statically or dynamically with ldd.
3952 cat > conftest.c
<<EOF
3953 int main() { return 0; }
3956 if $LTCC $LTCFLAGS -o conftest conftest.c
$deplibs; then
3957 ldd_output
=`ldd conftest`
3958 for i
in $deplibs; do
3959 name
=`expr $i : '-l\(.*\)'`
3960 # If $name is empty we are operating on a -L argument.
3961 if test "$name" != "" && test "$name" != "0"; then
3962 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3963 case " $predeps $postdeps " in
3965 newdeplibs
="$newdeplibs $i"
3970 if test -n "$i" ; then
3971 libname
=`eval \\$echo \"$libname_spec\"`
3972 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3973 set dummy
$deplib_matches
3975 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3976 newdeplibs
="$newdeplibs $i"
3980 $echo "*** Warning: dynamic linker does not accept needed library $i."
3981 $echo "*** I have the capability to make that library automatically link in when"
3982 $echo "*** you link to this library. But I can only do this if you have a"
3983 $echo "*** shared version of the library, which I believe you do not have"
3984 $echo "*** because a test_compile did reveal that the linker did not use it for"
3985 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3989 newdeplibs
="$newdeplibs $i"
3993 # Error occurred in the first compile. Let's try to salvage
3994 # the situation: Compile a separate program for each library.
3995 for i
in $deplibs; do
3996 name
=`expr $i : '-l\(.*\)'`
3997 # If $name is empty we are operating on a -L argument.
3998 if test "$name" != "" && test "$name" != "0"; then
4000 if $LTCC $LTCFLAGS -o conftest conftest.c
$i; then
4001 ldd_output
=`ldd conftest`
4002 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4003 case " $predeps $postdeps " in
4005 newdeplibs
="$newdeplibs $i"
4010 if test -n "$i" ; then
4011 libname
=`eval \\$echo \"$libname_spec\"`
4012 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
4013 set dummy
$deplib_matches
4015 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
4016 newdeplibs
="$newdeplibs $i"
4020 $echo "*** Warning: dynamic linker does not accept needed library $i."
4021 $echo "*** I have the capability to make that library automatically link in when"
4022 $echo "*** you link to this library. But I can only do this if you have a"
4023 $echo "*** shared version of the library, which you do not appear to have"
4024 $echo "*** because a test_compile did reveal that the linker did not use this one"
4025 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
4031 $echo "*** Warning! Library $i is needed by this library but I was not able to"
4032 $echo "*** make it link in! You will probably need to install it or some"
4033 $echo "*** library that it depends on before this library will be fully"
4034 $echo "*** functional. Installing it before continuing would be even better."
4037 newdeplibs
="$newdeplibs $i"
4043 set dummy
$deplibs_check_method
4044 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4045 for a_deplib
in $deplibs; do
4046 name
=`expr $a_deplib : '-l\(.*\)'`
4047 # If $name is empty we are operating on a -L argument.
4048 if test "$name" != "" && test "$name" != "0"; then
4049 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4050 case " $predeps $postdeps " in
4052 newdeplibs
="$newdeplibs $a_deplib"
4057 if test -n "$a_deplib" ; then
4058 libname
=`eval \\$echo \"$libname_spec\"`
4059 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4060 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
4061 for potent_lib
in $potential_libs; do
4062 # Follow soft links.
4063 if ls -lLd "$potent_lib" 2>/dev
/null \
4064 |
grep " -> " >/dev
/null
; then
4067 # The statement above tries to avoid entering an
4068 # endless loop below, in case of cyclic links.
4069 # We might still enter an endless loop, since a link
4070 # loop can be closed while we follow links,
4072 potlib
="$potent_lib"
4073 while test -h "$potlib" 2>/dev
/null
; do
4074 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
4076 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
4077 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4080 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
4082 |
$EGREP "$file_magic_regex" > /dev
/null
; then
4083 newdeplibs
="$newdeplibs $a_deplib"
4090 if test -n "$a_deplib" ; then
4093 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4094 $echo "*** I have the capability to make that library automatically link in when"
4095 $echo "*** you link to this library. But I can only do this if you have a"
4096 $echo "*** shared version of the library, which you do not appear to have"
4097 $echo "*** because I did check the linker path looking for a file starting"
4098 if test -z "$potlib" ; then
4099 $echo "*** with $libname but no candidates were found. (...for file magic test)"
4101 $echo "*** with $libname and none of the candidates passed a file format test"
4102 $echo "*** using a file magic. Last file checked: $potlib"
4106 # Add a -L argument.
4107 newdeplibs
="$newdeplibs $a_deplib"
4109 done # Gone through all deplibs.
4112 set dummy
$deplibs_check_method
4113 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4114 for a_deplib
in $deplibs; do
4115 name
=`expr $a_deplib : '-l\(.*\)'`
4116 # If $name is empty we are operating on a -L argument.
4117 if test -n "$name" && test "$name" != "0"; then
4118 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4119 case " $predeps $postdeps " in
4121 newdeplibs
="$newdeplibs $a_deplib"
4126 if test -n "$a_deplib" ; then
4127 libname
=`eval \\$echo \"$libname_spec\"`
4128 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4129 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
4130 for potent_lib
in $potential_libs; do
4131 potlib
="$potent_lib" # see symlink-check above in file_magic test
4132 if eval $echo \"$potent_lib\" 2>/dev
/null \
4134 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
4135 newdeplibs
="$newdeplibs $a_deplib"
4142 if test -n "$a_deplib" ; then
4145 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4146 $echo "*** I have the capability to make that library automatically link in when"
4147 $echo "*** you link to this library. But I can only do this if you have a"
4148 $echo "*** shared version of the library, which you do not appear to have"
4149 $echo "*** because I did check the linker path looking for a file starting"
4150 if test -z "$potlib" ; then
4151 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4153 $echo "*** with $libname and none of the candidates passed a file format test"
4154 $echo "*** using a regex pattern. Last file checked: $potlib"
4158 # Add a -L argument.
4159 newdeplibs
="$newdeplibs $a_deplib"
4161 done # Gone through all deplibs.
4165 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4166 -e 's/ -[LR][^ ]*//g'`
4167 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4168 for i
in $predeps $postdeps ; do
4169 # can't use Xsed below, because $i might contain '/'
4170 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4173 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
4174 |
grep .
>/dev
/null
; then
4176 if test "X$deplibs_check_method" = "Xnone"; then
4177 $echo "*** Warning: inter-library dependencies are not supported in this platform."
4179 $echo "*** Warning: inter-library dependencies are not known to be supported."
4181 $echo "*** All declared inter-library dependencies are being dropped."
4186 versuffix
=$versuffix_save
4188 release
=$release_save
4189 libname
=$libname_save
4193 *-*-rhapsody* |
*-*-darwin1.
[012])
4194 # On Rhapsody replace the C library is the System framework
4195 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4199 if test "$droppeddeps" = yes; then
4200 if test "$module" = yes; then
4202 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4203 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4204 $echo "*** a static module, that should work as long as the dlopening"
4205 $echo "*** application is linked with the -dlopen flag."
4206 if test -z "$global_symbol_pipe"; then
4208 $echo "*** However, this would only work if libtool was able to extract symbol"
4209 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4210 $echo "*** not find such a program. So, this module is probably useless."
4211 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4213 if test "$build_old_libs" = no
; then
4214 oldlibs
="$output_objdir/$libname.$libext"
4215 build_libtool_libs
=module
4218 build_libtool_libs
=no
4221 $echo "*** The inter-library dependencies that have been dropped here will be"
4222 $echo "*** automatically added whenever a program is linked with this library"
4223 $echo "*** or is declared to -dlopen it."
4225 if test "$allow_undefined" = no
; then
4227 $echo "*** Since this library must not contain undefined symbols,"
4228 $echo "*** because either the platform does not support them or"
4229 $echo "*** it was explicitly requested with -no-undefined,"
4230 $echo "*** libtool will only create a static version of it."
4231 if test "$build_old_libs" = no
; then
4232 oldlibs
="$output_objdir/$libname.$libext"
4233 build_libtool_libs
=module
4236 build_libtool_libs
=no
4241 # Done checking deplibs!
4246 # move library search paths that coincide with paths to not yet
4247 # installed libraries to the beginning of the library search list
4249 for path
in $notinst_path; do
4250 case " $new_libs " in
4251 *" -L$path/$objdir "*) ;;
4253 case " $deplibs " in
4254 *" -L$path/$objdir "*)
4255 new_libs
="$new_libs -L$path/$objdir" ;;
4260 for deplib
in $deplibs; do
4263 case " $new_libs " in
4265 *) new_libs
="$new_libs $deplib" ;;
4268 *) new_libs
="$new_libs $deplib" ;;
4274 # All the library-specific variables (install_libdir is set above).
4279 # Test again, we may have decided not to build it any more
4280 if test "$build_libtool_libs" = yes; then
4281 if test "$hardcode_into_libs" = yes; then
4282 # Hardcode the library paths
4285 rpath
="$finalize_rpath"
4286 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4287 for libdir
in $rpath; do
4288 if test -n "$hardcode_libdir_flag_spec"; then
4289 if test -n "$hardcode_libdir_separator"; then
4290 if test -z "$hardcode_libdirs"; then
4291 hardcode_libdirs
="$libdir"
4293 # Just accumulate the unique libdirs.
4294 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4295 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4298 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4303 eval flag
=\"$hardcode_libdir_flag_spec\"
4304 dep_rpath
="$dep_rpath $flag"
4306 elif test -n "$runpath_var"; then
4307 case "$perm_rpath " in
4309 *) perm_rpath
="$perm_rpath $libdir" ;;
4313 # Substitute the hardcoded libdirs into the rpath.
4314 if test -n "$hardcode_libdir_separator" &&
4315 test -n "$hardcode_libdirs"; then
4316 libdir
="$hardcode_libdirs"
4317 if test -n "$hardcode_libdir_flag_spec_ld"; then
4318 case $archive_cmds in
4319 *\
$LD*) eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\" ;;
4320 *) eval dep_rpath
=\"$hardcode_libdir_flag_spec\" ;;
4323 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4326 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4327 # We should set the runpath_var.
4329 for dir
in $perm_rpath; do
4332 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4334 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4337 shlibpath
="$finalize_shlibpath"
4338 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4339 if test -n "$shlibpath"; then
4340 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4343 # Get the real and link names of the library.
4344 eval shared_ext
=\"$shrext_cmds\"
4345 eval library_names
=\"$library_names_spec\"
4346 set dummy
$library_names
4350 if test -n "$soname_spec"; then
4351 eval soname
=\"$soname_spec\"
4355 if test -z "$dlname"; then
4359 lib
="$output_objdir/$realname"
4363 linknames
="$linknames $link"
4366 # Use standard objects if they are pic
4367 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4369 # Prepare the list of exported symbols
4370 if test -z "$export_symbols"; then
4371 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4372 $show "generating symbol list for \`$libname.la'"
4373 export_symbols
="$output_objdir/$libname.exp"
4374 $run $rm $export_symbols
4375 cmds
=$export_symbols_cmds
4376 save_ifs
="$IFS"; IFS
='~'
4377 for cmd
in $cmds; do
4380 if len
=`expr "X$cmd" : ".*"` &&
4381 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4383 $run eval "$cmd" ||
exit $?
4384 skipped_export
=false
4386 # The command line is too long to execute in one step.
4387 $show "using reloadable object file for export list..."
4389 # Break out early, otherwise skipped_export may be
4390 # set to false by a later but shorter cmd.
4395 if test -n "$export_symbols_regex"; then
4396 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4397 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4398 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4399 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4404 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4405 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4409 for test_deplib
in $deplibs; do
4410 case " $convenience " in
4411 *" $test_deplib "*) ;;
4413 tmp_deplibs
="$tmp_deplibs $test_deplib"
4417 deplibs
="$tmp_deplibs"
4419 if test -n "$convenience"; then
4420 if test -n "$whole_archive_flag_spec"; then
4421 save_libobjs
=$libobjs
4422 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4424 gentop
="$output_objdir/${outputname}x"
4425 generated
="$generated $gentop"
4427 func_extract_archives
$gentop $convenience
4428 libobjs
="$libobjs $func_extract_archives_result"
4432 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4433 eval flag
=\"$thread_safe_flag_spec\"
4434 linker_flags
="$linker_flags $flag"
4437 # Make a backup of the uninstalled library when relinking
4438 if test "$mode" = relink
; then
4439 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4442 # Do each of the archive commands.
4443 if test "$module" = yes && test -n "$module_cmds" ; then
4444 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4445 eval test_cmds
=\"$module_expsym_cmds\"
4446 cmds
=$module_expsym_cmds
4448 eval test_cmds
=\"$module_cmds\"
4452 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4453 eval test_cmds
=\"$archive_expsym_cmds\"
4454 cmds
=$archive_expsym_cmds
4456 eval test_cmds
=\"$archive_cmds\"
4461 if test "X$skipped_export" != "X:" &&
4462 len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4463 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4466 # The command line is too long to link in one step, link piecewise.
4467 $echo "creating reloadable object files..."
4469 # Save the value of $output and $libobjs because we want to
4470 # use them later. If we have whole_archive_flag_spec, we
4471 # want to use save_libobjs as it was before
4472 # whole_archive_flag_spec was expanded, because we can't
4473 # assume the linker understands whole_archive_flag_spec.
4474 # This may have to be revisited, in case too many
4475 # convenience libraries get linked in and end up exceeding
4477 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4478 save_libobjs
=$libobjs
4481 output_la
=`$echo "X$output" | $Xsed -e "$basename"`
4483 # Clear the reloadable object creation command queue and
4484 # initialize k to one.
4491 output
=$output_objdir/$output_la-${k}.
$objext
4492 # Loop over the list of objects to be linked.
4493 for obj
in $save_libobjs
4495 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4496 if test "X$objlist" = X ||
4497 { len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4498 test "$len" -le "$max_cmd_len"; }; then
4499 objlist
="$objlist $obj"
4501 # The command $test_cmds is almost too long, add a
4502 # command to the queue.
4503 if test "$k" -eq 1 ; then
4504 # The first file doesn't have a previous command to add.
4505 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4507 # All subsequent reloadable object files will link in
4508 # the last one created.
4509 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4511 last_robj
=$output_objdir/$output_la-${k}.
$objext
4513 output
=$output_objdir/$output_la-${k}.
$objext
4518 # Handle the remaining objects by creating one last
4519 # reloadable object file. All subsequent reloadable object
4520 # files will link in the last one created.
4521 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4522 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4524 if ${skipped_export-false}; then
4525 $show "generating symbol list for \`$libname.la'"
4526 export_symbols
="$output_objdir/$libname.exp"
4527 $run $rm $export_symbols
4529 # Append the command to create the export file.
4530 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4533 # Set up a command to remove the reloadable object files
4534 # after they are used.
4536 while test "$i" -lt "$k"
4539 delfiles
="$delfiles $output_objdir/$output_la-${i}.$objext"
4542 $echo "creating a temporary reloadable object file: $output"
4544 # Loop through the commands generated above and execute them.
4545 save_ifs
="$IFS"; IFS
='~'
4546 for cmd
in $concat_cmds; do
4549 $run eval "$cmd" ||
exit $?
4554 # Restore the value of output.
4557 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4558 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4560 # Expand the library linking commands again to reset the
4561 # value of $libobjs for piecewise linking.
4563 # Do each of the archive commands.
4564 if test "$module" = yes && test -n "$module_cmds" ; then
4565 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4566 cmds
=$module_expsym_cmds
4571 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4572 cmds
=$archive_expsym_cmds
4578 # Append the command to remove the reloadable object files
4579 # to the just-reset $cmds.
4580 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4582 save_ifs
="$IFS"; IFS
='~'
4583 for cmd
in $cmds; do
4587 $run eval "$cmd" ||
{
4590 # Restore the uninstalled library and exit
4591 if test "$mode" = relink
; then
4592 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4600 # Restore the uninstalled library and exit
4601 if test "$mode" = relink
; then
4602 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4604 if test -n "$convenience"; then
4605 if test -z "$whole_archive_flag_spec"; then
4606 $show "${rm}r $gentop"
4607 $run ${rm}r
"$gentop"
4614 # Create links to the real library.
4615 for linkname
in $linknames; do
4616 if test "$realname" != "$linkname"; then
4617 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4618 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4622 # If -module or -export-dynamic was specified, set the dlname.
4623 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4624 # On all known operating systems, these are identical.
4633 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
4636 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4637 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4640 if test -n "$rpath"; then
4641 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4644 if test -n "$xrpath"; then
4645 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4648 if test -n "$vinfo"; then
4649 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4652 if test -n "$release"; then
4653 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4658 if test -n "$objs$old_deplibs"; then
4659 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4663 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4671 # Delete the old objects.
4672 $run $rm $obj $libobj
4674 # Objects from convenience libraries. This assumes
4675 # single-version convenience libraries. Whenever we create
4676 # different ones for PIC/non-PIC, this we'll have to duplicate
4680 # reload_cmds runs $LD directly, so let us get rid of
4681 # -Wl from whole_archive_flag_spec and hope we can get by with
4682 # turning comma into space..
4685 if test -n "$convenience"; then
4686 if test -n "$whole_archive_flag_spec"; then
4687 eval tmp_whole_archive_flags
=\"$whole_archive_flag_spec\"
4688 reload_conv_objs
=$reload_objs\
`$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4690 gentop
="$output_objdir/${obj}x"
4691 generated
="$generated $gentop"
4693 func_extract_archives
$gentop $convenience
4694 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4698 # Create the old-style object.
4699 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
4703 save_ifs
="$IFS"; IFS
='~'
4704 for cmd
in $cmds; do
4708 $run eval "$cmd" ||
exit $?
4712 # Exit if we aren't doing a library object file.
4713 if test -z "$libobj"; then
4714 if test -n "$gentop"; then
4715 $show "${rm}r $gentop"
4722 if test "$build_libtool_libs" != yes; then
4723 if test -n "$gentop"; then
4724 $show "${rm}r $gentop"
4728 # Create an invalid libtool object if no PIC, so that we don't
4729 # accidentally link it into a program.
4730 # $show "echo timestamp > $libobj"
4731 # $run eval "echo timestamp > $libobj" || exit $?
4735 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4736 # Only do commands if we really have different PIC objects.
4737 reload_objs
="$libobjs $reload_conv_objs"
4740 save_ifs
="$IFS"; IFS
='~'
4741 for cmd
in $cmds; do
4745 $run eval "$cmd" ||
exit $?
4750 if test -n "$gentop"; then
4751 $show "${rm}r $gentop"
4760 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4762 if test -n "$vinfo"; then
4763 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4766 if test -n "$release"; then
4767 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4770 if test "$preload" = yes; then
4771 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4772 test "$dlopen_self_static" = unknown
; then
4773 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4778 *-*-rhapsody* |
*-*-darwin1.
[012])
4779 # On Rhapsody replace the C library is the System framework
4780 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4781 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4787 # Don't allow lazy linking, it breaks C++ global constructors
4788 if test "$tagname" = CXX
; then
4789 compile_command
="$compile_command ${wl}-bind_at_load"
4790 finalize_command
="$finalize_command ${wl}-bind_at_load"
4796 # move library search paths that coincide with paths to not yet
4797 # installed libraries to the beginning of the library search list
4799 for path
in $notinst_path; do
4800 case " $new_libs " in
4801 *" -L$path/$objdir "*) ;;
4803 case " $compile_deplibs " in
4804 *" -L$path/$objdir "*)
4805 new_libs
="$new_libs -L$path/$objdir" ;;
4810 for deplib
in $compile_deplibs; do
4813 case " $new_libs " in
4815 *) new_libs
="$new_libs $deplib" ;;
4818 *) new_libs
="$new_libs $deplib" ;;
4821 compile_deplibs
="$new_libs"
4824 compile_command
="$compile_command $compile_deplibs"
4825 finalize_command
="$finalize_command $finalize_deplibs"
4827 if test -n "$rpath$xrpath"; then
4828 # If the user specified any rpath flags, then add them.
4829 for libdir
in $rpath $xrpath; do
4830 # This is the magic to use -rpath.
4831 case "$finalize_rpath " in
4833 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4838 # Now hardcode the library paths
4841 for libdir
in $compile_rpath $finalize_rpath; do
4842 if test -n "$hardcode_libdir_flag_spec"; then
4843 if test -n "$hardcode_libdir_separator"; then
4844 if test -z "$hardcode_libdirs"; then
4845 hardcode_libdirs
="$libdir"
4847 # Just accumulate the unique libdirs.
4848 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4849 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4852 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4857 eval flag
=\"$hardcode_libdir_flag_spec\"
4858 rpath
="$rpath $flag"
4860 elif test -n "$runpath_var"; then
4861 case "$perm_rpath " in
4863 *) perm_rpath
="$perm_rpath $libdir" ;;
4867 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4868 testbindir
=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4869 case :$dllsearchpath: in
4871 *) dllsearchpath
="$dllsearchpath:$libdir";;
4873 case :$dllsearchpath: in
4874 *":$testbindir:"*) ;;
4875 *) dllsearchpath
="$dllsearchpath:$testbindir";;
4880 # Substitute the hardcoded libdirs into the rpath.
4881 if test -n "$hardcode_libdir_separator" &&
4882 test -n "$hardcode_libdirs"; then
4883 libdir
="$hardcode_libdirs"
4884 eval rpath
=\" $hardcode_libdir_flag_spec\"
4886 compile_rpath
="$rpath"
4890 for libdir
in $finalize_rpath; do
4891 if test -n "$hardcode_libdir_flag_spec"; then
4892 if test -n "$hardcode_libdir_separator"; then
4893 if test -z "$hardcode_libdirs"; then
4894 hardcode_libdirs
="$libdir"
4896 # Just accumulate the unique libdirs.
4897 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4898 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4901 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4906 eval flag
=\"$hardcode_libdir_flag_spec\"
4907 rpath
="$rpath $flag"
4909 elif test -n "$runpath_var"; then
4910 case "$finalize_perm_rpath " in
4912 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4916 # Substitute the hardcoded libdirs into the rpath.
4917 if test -n "$hardcode_libdir_separator" &&
4918 test -n "$hardcode_libdirs"; then
4919 libdir
="$hardcode_libdirs"
4920 eval rpath
=\" $hardcode_libdir_flag_spec\"
4922 finalize_rpath
="$rpath"
4924 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4925 # Transform all the library objects into standard objects.
4926 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4927 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4931 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4932 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4933 dlsyms
="${outputname}S.c"
4935 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4939 if test -n "$dlsyms"; then
4943 # Discover the nlist of each of the dlfiles.
4944 nlist
="$output_objdir/${outputname}.nm"
4946 $show "$rm $nlist ${nlist}S ${nlist}T"
4947 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4949 # Parse the name list into a source file.
4950 $show "creating $output_objdir/$dlsyms"
4952 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4953 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4954 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4960 /* Prevent the only kind of declaration conflicts we can make. */
4961 #define lt_preloaded_symbols some_other_symbol
4963 /* External symbol declarations for the compiler. */\
4966 if test "$dlself" = yes; then
4967 $show "generating symbol list for \`$output'"
4969 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4971 # Add our own program objects to the symbol list.
4972 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4973 for arg
in $progfiles; do
4974 $show "extracting global C symbols from \`$arg'"
4975 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4978 if test -n "$exclude_expsyms"; then
4979 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4980 $run eval '$mv "$nlist"T "$nlist"'
4983 if test -n "$export_symbols_regex"; then
4984 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4985 $run eval '$mv "$nlist"T "$nlist"'
4988 # Prepare the list of exported symbols
4989 if test -z "$export_symbols"; then
4990 export_symbols
="$output_objdir/$outputname.exp"
4991 $run $rm $export_symbols
4992 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4994 *cygwin
* |
*mingw
* )
4995 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4996 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
5000 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
5001 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
5002 $run eval 'mv "$nlist"T "$nlist"'
5004 *cygwin
* |
*mingw
* )
5005 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
5006 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
5012 for arg
in $dlprefiles; do
5013 $show "extracting global C symbols from \`$arg'"
5014 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
5015 $run eval '$echo ": $name " >> "$nlist"'
5016 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
5019 if test -z "$run"; then
5020 # Make sure we have at least an empty file.
5021 test -f "$nlist" ||
: > "$nlist"
5023 if test -n "$exclude_expsyms"; then
5024 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
5025 $mv "$nlist"T
"$nlist"
5028 # Try sorting and uniquifying the output.
5029 if grep -v "^: " < "$nlist" |
5030 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
5035 uniq > "$nlist"S
; then
5038 grep -v "^: " < "$nlist" > "$nlist"S
5041 if test -f "$nlist"S
; then
5042 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
5044 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
5047 $echo >> "$output_objdir/$dlsyms" "\
5049 #undef lt_preloaded_symbols
5051 #if defined (__STDC__) && __STDC__
5052 # define lt_ptr void *
5054 # define lt_ptr char *
5058 /* The mapping between symbol names and symbols. */
5062 *cygwin
* |
*mingw
* )
5063 $echo >> "$output_objdir/$dlsyms" "\
5064 /* DATA imports from DLLs on WIN32 can't be const, because
5065 runtime relocations are performed -- see ld's documentation
5071 $echo >> "$output_objdir/$dlsyms" "\
5078 $echo >> "$output_objdir/$dlsyms" "\
5082 lt_preloaded_symbols[] =
5086 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5088 $echo >> "$output_objdir/$dlsyms" "\
5092 /* This works around a problem in FreeBSD linker */
5093 #ifdef FREEBSD_WORKAROUND
5094 static const void *lt_preloaded_setup() {
5095 return lt_preloaded_symbols;
5105 pic_flag_for_symtable
=
5107 # compiling the symbol table file with pic_flag works around
5108 # a FreeBSD bug that causes programs to crash when -lm is
5109 # linked before any other PIC object. But we must not use
5110 # pic_flag when linking with -static. The problem exists in
5111 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5112 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
5113 case "$compile_command " in
5115 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
5118 case "$compile_command " in
5120 *) pic_flag_for_symtable
=" $pic_flag";;
5124 # Now compile the dynamic symbol file.
5125 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5126 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
5128 # Clean up the generated files.
5129 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5130 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5132 # Transform the symbol file into the correct name.
5134 *cygwin
* |
*mingw
* )
5135 if test -f "$output_objdir/${outputname}.def" ; then
5136 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5137 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5139 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5140 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5144 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5145 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5150 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5155 # We keep going just in case the user didn't refer to
5156 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
5157 # really was required.
5159 # Nullify the symbol file.
5160 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5161 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5164 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
5165 # Replace the output file specification.
5166 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5167 link_command
="$compile_command$compile_rpath"
5169 # We have no uninstalled library dependencies, so finalize right now.
5170 $show "$link_command"
5171 $run eval "$link_command"
5174 # Delete the generated files.
5175 if test -n "$dlsyms"; then
5176 $show "$rm $output_objdir/${outputname}S.${objext}"
5177 $run $rm "$output_objdir/${outputname}S.${objext}"
5183 if test -n "$shlibpath_var"; then
5184 # We should set the shlibpath_var
5186 for dir
in $temp_rpath; do
5188 [\\/]* |
[A-Za-z
]:[\\/]*)
5193 # Relative path: add a thisdir entry.
5194 rpath
="$rpath\$thisdir/$dir:"
5201 if test -n "$compile_shlibpath$finalize_shlibpath"; then
5202 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5204 if test -n "$finalize_shlibpath"; then
5205 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5210 if test -n "$runpath_var"; then
5211 if test -n "$perm_rpath"; then
5212 # We should set the runpath_var.
5214 for dir
in $perm_rpath; do
5217 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
5219 if test -n "$finalize_perm_rpath"; then
5220 # We should set the runpath_var.
5222 for dir
in $finalize_perm_rpath; do
5225 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
5229 if test "$no_install" = yes; then
5230 # We don't need to create a wrapper script.
5231 link_command
="$compile_var$compile_command$compile_rpath"
5232 # Replace the output file specification.
5233 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5234 # Delete the old output file.
5236 # Link the executable and exit
5237 $show "$link_command"
5238 $run eval "$link_command" ||
exit $?
5242 if test "$hardcode_action" = relink
; then
5243 # Fast installation is not supported
5244 link_command
="$compile_var$compile_command$compile_rpath"
5245 relink_command
="$finalize_var$finalize_command$finalize_rpath"
5247 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5248 $echo "$modename: \`$output' will be relinked during installation" 1>&2
5250 if test "$fast_install" != no
; then
5251 link_command
="$finalize_var$compile_command$finalize_rpath"
5252 if test "$fast_install" = yes; then
5253 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5255 # fast_install is set to needless
5259 link_command
="$compile_var$compile_command$compile_rpath"
5260 relink_command
="$finalize_var$finalize_command$finalize_rpath"
5264 # Replace the output file specification.
5265 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5267 # Delete the old output files.
5268 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
5270 $show "$link_command"
5271 $run eval "$link_command" ||
exit $?
5273 # Now create the wrapper script.
5274 $show "creating $output"
5276 # Quote the relink command for shipping.
5277 if test -n "$relink_command"; then
5278 # Preserve any variables that may affect compiler behavior
5279 for var
in $variables_saved_for_relink; do
5280 if eval test -z \"\
${$var+set}\"; then
5281 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5282 elif eval var_value
=\$
$var; test -z "$var_value"; then
5283 relink_command
="$var=; export $var; $relink_command"
5285 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5286 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5289 relink_command
="(cd `pwd`; $relink_command)"
5290 relink_command
=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5293 # Quote $echo for shipping.
5294 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5296 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
5297 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
5299 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5301 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5304 # Only actually do things if our run command is non-null.
5305 if test -z "$run"; then
5306 # win32 will think the script is a binary if it has
5307 # a .exe suffix, so we strip it off here.
5309 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
5311 # test for cygwin because mv fails w/o .exe extensions
5315 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5319 *cygwin
* |
*mingw
* )
5320 output_name
=`basename $output`
5321 output_path
=`dirname $output`
5322 cwrappersource
="$output_path/$objdir/lt-$output_name.c"
5323 cwrapper
="$output_path/$output_name.exe"
5324 $rm $cwrappersource $cwrapper
5325 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5327 cat > $cwrappersource <<EOF
5329 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5330 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5332 The $output program cannot be directly executed until all the libtool
5333 libraries that it depends on are installed.
5335 This wrapper executable should never be moved out of the build directory.
5336 If it is, it will not operate correctly.
5338 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5339 but could eventually absorb all of the scripts functionality and
5340 exec $objdir/$outputname directly.
5343 cat >> $cwrappersource<<"EOF"
5352 #include <sys/stat.h>
5354 #if defined(PATH_MAX)
5355 # define LT_PATHMAX PATH_MAX
5356 #elif defined(MAXPATHLEN)
5357 # define LT_PATHMAX MAXPATHLEN
5359 # define LT_PATHMAX 1024
5362 #ifndef DIR_SEPARATOR
5363 # define DIR_SEPARATOR '/'
5364 # define PATH_SEPARATOR ':'
5367 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5369 # define HAVE_DOS_BASED_FILE_SYSTEM
5370 # ifndef DIR_SEPARATOR_2
5371 # define DIR_SEPARATOR_2 '\\'
5373 # ifndef PATH_SEPARATOR_2
5374 # define PATH_SEPARATOR_2 ';'
5378 #ifndef DIR_SEPARATOR_2
5379 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5380 #else /* DIR_SEPARATOR_2 */
5381 # define IS_DIR_SEPARATOR(ch) \
5382 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5383 #endif /* DIR_SEPARATOR_2 */
5385 #ifndef PATH_SEPARATOR_2
5386 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5387 #else /* PATH_SEPARATOR_2 */
5388 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5389 #endif /* PATH_SEPARATOR_2 */
5391 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5392 #define XFREE(stale) do { \
5393 if (stale) { free ((void *) stale); stale = 0; } \
5396 /* -DDEBUG is fairly common in CFLAGS. */
5398 #if defined DEBUGWRAPPER
5399 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5401 # define DEBUG(format, ...)
5404 const char *program_name = NULL;
5406 void * xmalloc (size_t num);
5407 char * xstrdup (const char *string);
5408 const char * base_name (const char *name);
5409 char * find_executable(const char *wrapper);
5410 int check_executable(const char *path);
5411 char * strendzap(char *str, const char *pat);
5412 void lt_fatal (const char *message, ...);
5415 main (int argc, char *argv[])
5420 program_name = (char *) xstrdup (base_name (argv[0]));
5421 DEBUG("(main) argv[0] : %s\n",argv[0]);
5422 DEBUG("(main) program_name : %s\n",program_name);
5423 newargz = XMALLOC(char *, argc+2);
5426 cat >> $cwrappersource <<EOF
5427 newargz[0] = (char *) xstrdup("$SHELL");
5430 cat >> $cwrappersource <<"EOF"
5431 newargz
[1] = find_executable
(argv
[0]);
5432 if (newargz
[1] == NULL
)
5433 lt_fatal
("Couldn't find %s", argv
[0]);
5434 DEBUG
("(main) found exe at : %s\n",newargz
[1]);
5435 /* we know the
script has the same name
, without the .exe
*/
5436 /* so
make sure newargz
[1] doesn
't end in .exe */
5437 strendzap(newargz[1],".exe");
5438 for (i = 1; i < argc; i++)
5439 newargz[i+1] = xstrdup(argv[i]);
5440 newargz[argc+1] = NULL;
5442 for (i=0; i<argc+1; i++)
5444 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5452 cat >> $cwrappersource <<EOF
5453 execv("$SHELL",(char const **)newargz);
5457 cat >> $cwrappersource <<EOF
5458 execv("$SHELL",newargz);
5463 cat >> $cwrappersource <<"EOF"
5468 xmalloc (size_t num)
5470 void * p = (void *) malloc (num);
5472 lt_fatal ("Memory exhausted");
5478 xstrdup (const char *string)
5480 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5485 base_name (const char *name)
5489 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5490 /* Skip over the disk name in MSDOS pathnames. */
5491 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5495 for (base = name; *name; name++)
5496 if (IS_DIR_SEPARATOR (*name))
5502 check_executable(const char * path)
5506 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5507 if ((!path) || (!*path))
5510 if ((stat (path, &st) >= 0) &&
5512 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5513 #if defined (S_IXOTH)
5514 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5516 #if defined (S_IXGRP)
5517 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5519 ((st.st_mode & S_IXUSR) == S_IXUSR))
5526 /* Searches for the full path of the wrapper. Returns
5527 newly allocated full path name if found, NULL otherwise */
5529 find_executable (const char* wrapper)
5534 /* static buffer for getcwd */
5535 char tmp[LT_PATHMAX + 1];
5539 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5541 if ((wrapper == NULL) || (*wrapper == '\
0'))
5544 /* Absolute path? */
5545 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5546 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5548 concat_name = xstrdup (wrapper);
5549 if (check_executable(concat_name))
5556 if (IS_DIR_SEPARATOR (wrapper[0]))
5558 concat_name = xstrdup (wrapper);
5559 if (check_executable(concat_name))
5563 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5567 for (p = wrapper; *p; p++)
5575 /* no slashes; search PATH */
5576 const char* path = getenv ("PATH");
5579 for (p = path; *p; p = p_next)
5583 for (q = p; *q; q++)
5584 if (IS_PATH_SEPARATOR(*q))
5587 p_next = (*q == '\
0' ? q : q + 1);
5590 /* empty path: current directory */
5591 if (getcwd (tmp, LT_PATHMAX) == NULL)
5592 lt_fatal ("getcwd failed");
5593 tmp_len = strlen(tmp);
5594 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5595 memcpy (concat_name, tmp, tmp_len);
5596 concat_name[tmp_len] = '/';
5597 strcpy (concat_name + tmp_len + 1, wrapper);
5601 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5602 memcpy (concat_name, p, p_len);
5603 concat_name[p_len] = '/';
5604 strcpy (concat_name + p_len + 1, wrapper);
5606 if (check_executable(concat_name))
5611 /* not found in PATH; assume curdir */
5613 /* Relative path | not found in path: prepend cwd */
5614 if (getcwd (tmp, LT_PATHMAX) == NULL)
5615 lt_fatal ("getcwd failed");
5616 tmp_len = strlen(tmp);
5617 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5618 memcpy (concat_name, tmp, tmp_len);
5619 concat_name[tmp_len] = '/';
5620 strcpy (concat_name + tmp_len + 1, wrapper);
5622 if (check_executable(concat_name))
5629 strendzap(char *str, const char *pat)
5633 assert(str != NULL);
5634 assert(pat != NULL);
5637 patlen = strlen(pat);
5641 str += len - patlen;
5642 if (strcmp(str, pat) == 0)
5649 lt_error_core (int exit_status, const char * mode,
5650 const char * message, va_list ap)
5652 fprintf (stderr, "%s: %s: ", program_name, mode);
5653 vfprintf (stderr, message, ap);
5654 fprintf (stderr, ".\n");
5656 if (exit_status >= 0)
5661 lt_fatal (const char *message, ...)
5664 va_start (ap, message);
5665 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5669 # we should really use a build-platform specific compiler
5670 # here, but OTOH, the wrappers (shell script and this C one)
5671 # are only useful if you want to execute the "real" binary.
5672 # Since the "real" binary is built for $host, then this
5673 # wrapper might as well be built for $host, too.
5674 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5678 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5683 # $output - temporary wrapper script for $objdir/$outputname
5684 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5686 # The $output program cannot be directly executed until all the libtool
5687 # libraries that it depends on are installed.
5689 # This wrapper script should never be moved out of the build directory.
5690 # If it is, it will not operate correctly.
5692 # Sed substitution that helps us do robust quoting. It backslashifies
5693 # metacharacters that are still active within double-quoted strings.
5694 Xsed='${SED} -e 1s
/^X
//'
5695 sed_quote_subst='$sed_quote_subst'
5697 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5698 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5701 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5702 # is contrary to our usage. Disable this feature.
5703 alias -g '\
${1+\"\$@\"}'='\"\$@
\"'
5704 setopt NO_GLOB_SUBST
5706 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5708 BIN_SH=xpg4; export BIN_SH # for Tru64
5709 DUALCASE=1; export DUALCASE # for MKS sh
5711 # The HP-UX ksh and POSIX shell print the target directory to stdout
5713 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5715 relink_command=\"$relink_command\"
5717 # This environment variable determines our operation mode.
5718 if test \"\$libtool_install_magic\" = \"$magic\"; then
5719 # install mode needs the following variable:
5720 notinst_deplibs='$notinst_deplibs'
5722 # When we are sourced in execute mode, \$file and \$echo are already set.
5723 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5726 # Make sure echo works.
5727 if test \"X\$1\" = X--no-reexec; then
5728 # Discard the --no-reexec flag, and continue.
5730 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X
\t'; then
5731 # Yippee, \$echo works!
5734 # Restart under the correct shell, and then maybe \$echo will work.
5735 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5741 # Find the directory that this script lives in.
5742 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's
%/[^
/]*$
%%'\`
5743 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5745 # Follow symbolic links until we get to the real thisdir.
5746 file=\`ls -ld \"\$file\" | ${SED} -n 's
/.
*-> //p
'\`
5747 while test -n \"\$file\"; do
5748 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's
%/[^
/]*\$
%%'\`
5750 # If there was a directory component, then change thisdir.
5751 if test \"x\$destdir\" != \"x\$file\"; then
5752 case \"\$destdir\" in
5753 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5754 *) thisdir=\"\$thisdir/\$destdir\" ;;
5758 file=\`\$echo \"X\$file\" | \$Xsed -e 's
%^.
*/%%'\`
5759 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's
/.
*-> //p
'\`
5762 # Try to get the absolute directory name.
5763 absdir=\`cd \"\$thisdir\" && pwd\`
5764 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5767 if test "$fast_install" = yes; then
5769 program=lt-'$outputname'$exeext
5770 progdir=\"\$thisdir/$objdir\"
5772 if test ! -f \"\$progdir/\$program\" || \\
5773 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5774 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5776 file=\"\$\$-\$program\"
5778 if test ! -d \"\$progdir\"; then
5779 $mkdir \"\$progdir\"
5781 $rm \"\$progdir/\$file\"
5786 # relink executable if necessary
5787 if test -n \"\$relink_command\"; then
5788 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5790 $echo \"\$relink_command_output\" >&2
5791 $rm \"\$progdir/\$file\"
5796 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5797 { $rm \"\$progdir/\$program\";
5798 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5799 $rm \"\$progdir/\$file\"
5803 program='$outputname'
5804 progdir=\"\$thisdir/$objdir\"
5810 if test -f \"\$progdir/\$program\"; then"
5812 # Export our shlibpath_var if we have one.
5813 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5815 # Add our own library path to $shlibpath_var
5816 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5818 # Some systems cannot cope with colon-terminated $shlibpath_var
5819 # The second colon is a workaround for a bug in BeOS R4 sed
5820 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's
/::*\$
//'\`
5822 export $shlibpath_var
5826 # fixup the dll searchpath if we need to.
5827 if test -n "$dllsearchpath"; then
5829 # Add the dll search path components to the executable PATH
5830 PATH=$dllsearchpath:\$PATH
5835 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5836 # Run the actual program with our arguments.
5839 # Backslashes separate directories on plain windows
5840 *-*-mingw | *-*-os2*)
5842 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5848 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5853 \$echo \"\$0: cannot exec \$program \$*\"
5857 # The program doesn't exist.
5858 \
$echo \"\
$0: error
: \\\
`\$progdir/\$program' does not exist\" 1>&2
5859 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5860 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5871 # See if we need to build an old-fashioned archive.
5872 for oldlib in $oldlibs; do
5874 if test "$build_libtool_libs" = convenience; then
5875 oldobjs="$libobjs_save"
5876 addlibs="$convenience"
5877 build_libtool_libs=no
5879 if test "$build_libtool_libs" = module; then
5880 oldobjs="$libobjs_save"
5881 build_libtool_libs=no
5883 oldobjs="$old_deplibs $non_pic_objects"
5885 addlibs="$old_convenience"
5888 if test -n "$addlibs"; then
5889 gentop="$output_objdir/${outputname}x"
5890 generated="$generated $gentop"
5892 func_extract_archives $gentop $addlibs
5893 oldobjs="$oldobjs $func_extract_archives_result"
5896 # Do each command in the archive commands.
5897 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5898 cmds=$old_archive_from_new_cmds
5900 # POSIX demands no paths to be encoded in archives. We have
5901 # to avoid creating archives with duplicate basenames if we
5902 # might have to extract them afterwards, e.g., when creating a
5903 # static archive out of a convenience library, or when linking
5904 # the entirety of a libtool archive into another (currently
5905 # not supported by libtool).
5906 if (for obj in $oldobjs
5908 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5909 done | sort | sort -uc >/dev/null 2>&1); then
5912 $echo "copying selected object files to avoid basename conflicts..."
5914 if test -z "$gentop"; then
5915 gentop="$output_objdir/${outputname}x"
5916 generated="$generated $gentop"
5918 $show "${rm}r $gentop"
5919 $run ${rm}r "$gentop"
5920 $show "$mkdir $gentop"
5921 $run $mkdir "$gentop"
5923 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5928 save_oldobjs=$oldobjs
5931 for obj in $save_oldobjs
5933 objbase=`$echo "X$obj" |
$Xsed -e 's%^.*/%%'`
5934 case " $oldobjs " in
5935 " ") oldobjs=$obj ;;
5938 # Make sure we don't pick an alternate name that also
5940 newobj=lt$counter-$objbase
5941 counter=`expr $counter + 1`
5942 case " $oldobjs " in
5943 *[\ /]"$newobj "*) ;;
5944 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5947 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5948 $run ln "$obj" "$gentop/$newobj" ||
5949 $run cp "$obj" "$gentop/$newobj"
5950 oldobjs="$oldobjs $gentop/$newobj"
5952 *) oldobjs="$oldobjs $obj" ;;
5957 eval cmds=\"$old_archive_cmds\"
5959 if len=`expr "X$cmds" : ".*"` &&
5960 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5961 cmds=$old_archive_cmds
5963 # the command line is too long to link in one step, link in parts
5964 $echo "using piecewise archive linking..."
5969 save_oldobjs=$oldobjs
5971 # Is there a better way of finding the last object in the list?
5972 for obj in $save_oldobjs
5976 for obj in $save_oldobjs
5978 oldobjs="$objlist $obj"
5979 objlist="$objlist $obj"
5980 eval test_cmds=\"$old_archive_cmds\"
5981 if len=`expr "X$test_cmds" : ".*" 2>/dev
/null
` &&
5982 test "$len" -le "$max_cmd_len"; then
5985 # the above command should be used before it gets too long
5987 if test "$obj" = "$last_oldobj" ; then
5990 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5991 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5997 if test "X$oldobjs" = "X" ; then
5998 eval cmds=\"\$concat_cmds\"
6000 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
6004 save_ifs="$IFS"; IFS='~'
6005 for cmd in $cmds; do
6009 $run eval "$cmd" || exit $?
6014 if test -n "$generated"; then
6015 $show "${rm}r$generated"
6016 $run ${rm}r$generated
6019 # Now create the libtool archive.
6023 test "$build_old_libs" = yes && old_library="$libname.$libext"
6024 $show "creating $output"
6026 # Preserve any variables that may affect compiler behavior
6027 for var in $variables_saved_for_relink; do
6028 if eval test -z \"\${$var+set}\"; then
6029 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
6030 elif eval var_value=\$$var; test -z "$var_value"; then
6031 relink_command="$var=; export $var; $relink_command"
6033 var_value=`$echo "X$var_value" |
$Xsed -e "$sed_quote_subst"`
6034 relink_command="$var=\"$var_value\"; export $var; $relink_command"
6037 # Quote the link command for shipping.
6038 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
6039 relink_command=`$echo "X$relink_command" |
$SP2NL |
$Xsed -e "$sed_quote_subst" |
$NL2SP`
6040 if test "$hardcode_automatic" = yes ; then
6045 # Only create the output if not a dry run.
6046 if test -z "$run"; then
6047 for installed in no yes; do
6048 if test "$installed" = yes; then
6049 if test -z "$install_libdir"; then
6052 output="$output_objdir/$outputname"i
6053 # Replace all uninstalled libtool libraries with the installed ones
6055 for deplib in $dependency_libs; do
6058 name=`$echo "X$deplib" |
$Xsed -e 's%^.*/%%'`
6059 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6060 if test -z "$libdir"; then
6061 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6064 newdependency_libs="$newdependency_libs $libdir/$name"
6066 *) newdependency_libs="$newdependency_libs $deplib" ;;
6069 dependency_libs="$newdependency_libs"
6071 for lib in $dlfiles; do
6072 name=`$echo "X$lib" | $Xsed -e 's
%^.
*/%%'`
6073 eval libdir=`${SED} -n -e 's
/^libdir
=\
(.
*\
)$
/\
1/p
' $lib`
6074 if test -z "$libdir"; then
6075 $echo "$modename: \`$lib' is not a valid libtool archive
" 1>&2
6078 newdlfiles="$newdlfiles $libdir/$name"
6080 dlfiles="$newdlfiles"
6082 for lib in $dlprefiles; do
6083 name=`$echo "X
$lib" | $Xsed -e 's%^.*/%%'`
6084 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6085 if test -z "$libdir"; then
6086 $echo "$modename: \
`$lib' is not a valid libtool archive" 1>&2
6089 newdlprefiles="$newdlprefiles $libdir/$name"
6091 dlprefiles="$newdlprefiles"
6094 for lib in $dlfiles; do
6096 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6097 *) abs=`pwd`"/$lib" ;;
6099 newdlfiles="$newdlfiles $abs"
6101 dlfiles="$newdlfiles"
6103 for lib in $dlprefiles; do
6105 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6106 *) abs=`pwd`"/$lib" ;;
6108 newdlprefiles="$newdlprefiles $abs"
6110 dlprefiles="$newdlprefiles"
6113 # place dlname in correct position for cygwin
6115 case $host,$output,$installed,$module,$dlname in
6116 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6119 # $outputname - a libtool library file
6120 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6122 # Please DO NOT delete this file!
6123 # It is necessary for linking the library.
6125 # The name that we can dlopen(3).
6128 # Names of this library.
6129 library_names='$library_names'
6131 # The name of the static archive.
6132 old_library='$old_library'
6134 # Libraries that this one depends upon.
6135 dependency_libs='$dependency_libs'
6137 # Version information for $libname.
6142 # Is this an already installed library?
6143 installed=$installed
6145 # Should we warn about portability when linking against -modules?
6146 shouldnotlink=$module
6148 # Files to dlopen/dlpreopen
6150 dlpreopen='$dlprefiles'
6152 # Directory that this library needs to be installed in:
6153 libdir='$install_libdir'"
6154 if test "$installed" = no && test "$need_relink" = yes; then
6156 relink_command=\"$relink_command\""
6161 # Do a symbolic link so that the libtool archive can be found in
6162 # LD_LIBRARY_PATH before the program is installed.
6163 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6164 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6170 # libtool install mode
6172 modename="$modename: install"
6174 # There may be an optional sh(1) argument at the beginning of
6175 # install_prog (especially on Windows NT).
6176 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6177 # Allow the use of GNU shtool's install command.
6178 $echo "X$nonopt" | grep shtool > /dev/null; then
6179 # Aesthetically quote it.
6180 arg=`$echo "X$nonopt" |
$Xsed -e "$sed_quote_subst"`
6182 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6186 install_prog="$arg "
6194 # The real first argument should be the name of the installation program.
6195 # Aesthetically quote it.
6196 arg=`$echo "X$arg" |
$Xsed -e "$sed_quote_subst"`
6198 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6202 install_prog="$install_prog$arg"
6204 # We need to accept at least all the BSD install flags.
6214 if test -n "$dest"; then
6215 files="$files $dest"
6223 case " $install_prog " in
6228 -g | -m | -o) prev=$arg ;;
6236 # If the previous option needed an argument, then skip it.
6237 if test -n "$prev"; then
6246 # Aesthetically quote the argument.
6247 arg=`$echo "X$arg" |
$Xsed -e "$sed_quote_subst"`
6249 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6253 install_prog="$install_prog $arg"
6256 if test -z "$install_prog"; then
6257 $echo "$modename: you must specify an install program" 1>&2
6262 if test -n "$prev"; then
6263 $echo "$modename: the \`$prev' option requires an argument" 1>&2
6268 if test -z "$files"; then
6269 if test -z "$dest"; then
6270 $echo "$modename: no file or destination specified" 1>&2
6272 $echo "$modename: you must specify a destination" 1>&2
6278 # Strip any trailing slash from the destination.
6279 dest=`$echo "X$dest" | $Xsed -e 's
%/$
%%'`
6281 # Check to see that the destination is a directory.
6282 test -d "$dest" && isdir=yes
6283 if test "$isdir" = yes; then
6287 destdir=`$echo "X$dest" | $Xsed -e 's
%/[^
/]*$
%%'`
6288 test "X$destdir" = "X$dest" && destdir=.
6289 destname=`$echo "X$dest" | $Xsed -e 's
%^.
*/%%'`
6291 # Not a directory, so check to see that there is only one file specified.
6293 if test "$#" -gt 2; then
6294 $echo "$modename: \`$dest' is not a directory
" 1>&2
6300 [\\/]* | [A-Za-z]:[\\/]*) ;;
6302 for file in $files; do
6306 $echo "$modename: \
`$destdir' must be an absolute directory name" 1>&2
6315 # This variable tells wrapper scripts just to set variables rather
6316 # than running their programs.
6317 libtool_install_magic="$magic"
6322 for file in $files; do
6324 # Do each installation.
6327 # Do the static libraries later.
6328 staticlibs="$staticlibs $file"
6332 # Check to see that this really is a libtool archive.
6333 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6335 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6343 # If there is no directory component, then add one.
6345 */* | *\\*) . $file ;;
6349 # Add the libdir to current_libdirs if it is the destination.
6350 if test "X$destdir" = "X$libdir"; then
6351 case "$current_libdirs " in
6353 *) current_libdirs="$current_libdirs $libdir" ;;
6356 # Note the libdir as a future libdir.
6357 case "$future_libdirs " in
6359 *) future_libdirs="$future_libdirs $libdir" ;;
6363 dir=`$echo "X$file" | $Xsed -e 's
%/[^
/]*$
%%'`/
6364 test "X$dir" = "X$file/" && dir=
6367 if test -n "$relink_command"; then
6368 # Determine the prefix the user has applied to our future dir.
6369 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6371 # Don't allow the user to place us outside of our expected
6372 # location b/c this prevents finding dependent libraries that
6373 # are installed to the same prefix.
6374 # At present, this check doesn't affect windows .dll's that
6375 # are installed into $libdir/../bin (currently, that works fine)
6376 # but it's something to keep an eye on.
6377 if test "$inst_prefix_dir" = "$destdir"; then
6378 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6382 if test -n "$inst_prefix_dir"; then
6383 # Stick the inst_prefix_dir data into the link command.
6384 relink_command
=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6386 relink_command
=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6389 $echo "$modename: warning: relinking \`$file'" 1>&2
6390 $show "$relink_command"
6391 if $run eval "$relink_command"; then :
6393 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6398 # See the names of the shared library.
6399 set dummy
$library_names
6400 if test -n "$2"; then
6406 test -n "$relink_command" && srcname
="$realname"T
6408 # Install the shared library and build the symlinks.
6409 $show "$install_prog $dir/$srcname $destdir/$realname"
6410 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
6411 if test -n "$stripme" && test -n "$striplib"; then
6412 $show "$striplib $destdir/$realname"
6413 $run eval "$striplib $destdir/$realname" ||
exit $?
6416 if test "$#" -gt 0; then
6417 # Delete the old symlinks, and create new ones.
6418 # Try `ln -sf' first, because the `ln' binary might depend on
6419 # the symlink we replace! Solaris /bin/ln does not understand -f,
6420 # so we also need to try rm && ln -s.
6423 if test "$linkname" != "$realname"; then
6424 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6425 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6430 # Do each command in the postinstall commands.
6431 lib
="$destdir/$realname"
6432 cmds
=$postinstall_cmds
6433 save_ifs
="$IFS"; IFS
='~'
6434 for cmd
in $cmds; do
6438 $run eval "$cmd" ||
{
6441 # Restore the uninstalled library and exit
6442 if test "$mode" = relink
; then
6443 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6452 # Install the pseudo-library for information purposes.
6453 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6454 instname
="$dir/$name"i
6455 $show "$install_prog $instname $destdir/$name"
6456 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
6458 # Maybe install the static library, too.
6459 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
6463 # Install (i.e. copy) a libtool object.
6465 # Figure out destination file name, if it wasn't already specified.
6466 if test -n "$destname"; then
6467 destfile
="$destdir/$destname"
6469 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6470 destfile
="$destdir/$destfile"
6473 # Deduce the name of the destination old-style object file.
6476 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6479 staticdest
="$destfile"
6483 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6489 # Install the libtool object if requested.
6490 if test -n "$destfile"; then
6491 $show "$install_prog $file $destfile"
6492 $run eval "$install_prog $file $destfile" ||
exit $?
6495 # Install the old object if enabled.
6496 if test "$build_old_libs" = yes; then
6497 # Deduce the name of the old-style object file.
6498 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
6500 $show "$install_prog $staticobj $staticdest"
6501 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
6507 # Figure out destination file name, if it wasn't already specified.
6508 if test -n "$destname"; then
6509 destfile
="$destdir/$destname"
6511 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6512 destfile
="$destdir/$destfile"
6515 # If the file is missing, and there is a .exe on the end, strip it
6516 # because it is most likely a libtool script we actually want to
6521 if test ! -f "$file"; then
6522 file=`$echo $file|${SED} 's,.exe$,,'`
6528 # Do a test to see if this is really a libtool program.
6531 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
6537 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
6541 # Note that it is not necessary on cygwin/mingw to append a dot to
6542 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6543 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6544 # `FILE.' does not work on cygwin managed mounts.
6546 # If there is no directory component, then add one.
6548 */* |
*\\*) .
${wrapper} ;;
6549 *) . .
/${wrapper} ;;
6552 # Check the variables that should have been set.
6553 if test -z "$notinst_deplibs"; then
6554 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6559 for lib
in $notinst_deplibs; do
6560 # Check to see that each library is installed.
6562 if test -f "$lib"; then
6563 # If there is no directory component, then add one.
6565 */* |
*\\*) .
$lib ;;
6569 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6570 if test -n "$libdir" && test ! -f "$libfile"; then
6571 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6577 # Note that it is not necessary on cygwin/mingw to append a dot to
6578 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6579 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6580 # `FILE.' does not work on cygwin managed mounts.
6582 # If there is no directory component, then add one.
6584 */* |
*\\*) .
${wrapper} ;;
6585 *) . .
/${wrapper} ;;
6589 if test "$fast_install" = no
&& test -n "$relink_command"; then
6590 if test "$finalize" = yes && test -z "$run"; then
6591 tmpdir
=`func_mktempdir`
6592 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6593 outputname
="$tmpdir/$file"
6594 # Replace the output file specification.
6595 relink_command
=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6597 $show "$relink_command"
6598 if $run eval "$relink_command"; then :
6600 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6606 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6609 # Install the binary that we compiled earlier.
6610 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6614 # remove .exe since cygwin /usr/bin/install will append another
6616 case $install_prog,$host in
6617 */usr
/bin
/install*,*cygwin
*)
6618 case $file:$destfile in
6623 destfile
=$destfile.exe
6626 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6631 $show "$install_prog$stripme $file $destfile"
6632 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6633 test -n "$outputname" && ${rm}r
"$tmpdir"
6638 for file in $staticlibs; do
6639 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6641 # Set up the ranlib parameters.
6642 oldlib
="$destdir/$name"
6644 $show "$install_prog $file $oldlib"
6645 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6647 if test -n "$stripme" && test -n "$old_striplib"; then
6648 $show "$old_striplib $oldlib"
6649 $run eval "$old_striplib $oldlib" ||
exit $?
6652 # Do each command in the postinstall commands.
6653 cmds
=$old_postinstall_cmds
6654 save_ifs
="$IFS"; IFS
='~'
6655 for cmd
in $cmds; do
6659 $run eval "$cmd" ||
exit $?
6664 if test -n "$future_libdirs"; then
6665 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6668 if test -n "$current_libdirs"; then
6669 # Maybe just do a dry run.
6670 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6671 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6677 # libtool finish mode
6679 modename
="$modename: finish"
6683 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6686 libdirs
="$libdirs $dir"
6689 for libdir
in $libdirs; do
6690 if test -n "$finish_cmds"; then
6691 # Do each command in the finish commands.
6693 save_ifs
="$IFS"; IFS
='~'
6694 for cmd
in $cmds; do
6698 $run eval "$cmd" || admincmds
="$admincmds
6703 if test -n "$finish_eval"; then
6704 # Do the single finish_eval.
6705 eval cmds
=\"$finish_eval\"
6706 $run eval "$cmds" || admincmds
="$admincmds
6712 # Exit here if they wanted silent mode.
6713 test "$show" = : && exit $EXIT_SUCCESS
6715 $echo "X----------------------------------------------------------------------" |
$Xsed
6716 $echo "Libraries have been installed in:"
6717 for libdir
in $libdirs; do
6721 $echo "If you ever happen to want to link against installed libraries"
6722 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6723 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6724 $echo "flag during linking and do at least one of the following:"
6725 if test -n "$shlibpath_var"; then
6726 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6727 $echo " during execution"
6729 if test -n "$runpath_var"; then
6730 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6731 $echo " during linking"
6733 if test -n "$hardcode_libdir_flag_spec"; then
6735 eval flag
=\"$hardcode_libdir_flag_spec\"
6737 $echo " - use the \`$flag' linker flag"
6739 if test -n "$admincmds"; then
6740 $echo " - have your system administrator run these commands:$admincmds"
6742 if test -f /etc
/ld.so.conf
; then
6743 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6746 $echo "See any operating system documentation about shared libraries for"
6747 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6748 $echo "X----------------------------------------------------------------------" |
$Xsed
6752 # libtool execute mode
6754 modename
="$modename: execute"
6756 # The first argument is the command name.
6758 if test -z "$cmd"; then
6759 $echo "$modename: you must specify a COMMAND" 1>&2
6764 # Handle -dlopen flags immediately.
6765 for file in $execute_dlfiles; do
6766 if test ! -f "$file"; then
6767 $echo "$modename: \`$file' is not a file" 1>&2
6775 # Check to see that this really is a libtool archive.
6776 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6778 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6783 # Read the libtool library.
6787 # If there is no directory component, then add one.
6789 */* |
*\\*) .
$file ;;
6793 # Skip this library if it cannot be dlopened.
6794 if test -z "$dlname"; then
6795 # Warn if it was a shared library.
6796 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6800 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6801 test "X$dir" = "X$file" && dir
=.
6803 if test -f "$dir/$objdir/$dlname"; then
6806 if test ! -f "$dir/$dlname"; then
6807 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6814 # Just add the directory containing the .lo file.
6815 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6816 test "X$dir" = "X$file" && dir
=.
6820 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6825 # Get the absolute pathname.
6826 absdir
=`cd "$dir" && pwd`
6827 test -n "$absdir" && dir
="$absdir"
6829 # Now add the directory to shlibpath_var.
6830 if eval "test -z \"\$$shlibpath_var\""; then
6831 eval "$shlibpath_var=\"\$dir\""
6833 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6837 # This variable tells wrapper scripts just to set shlibpath_var
6838 # rather than running their programs.
6839 libtool_execute_magic
="$magic"
6841 # Check if any of the arguments is a wrapper script.
6848 # Do a test to see if this is really a libtool program.
6849 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6850 # If there is no directory component, then add one.
6852 */* |
*\\*) .
$file ;;
6856 # Transform arg to wrapped name.
6857 file="$progdir/$program"
6861 # Quote arguments (to preserve shell metacharacters).
6862 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6863 args
="$args \"$file\""
6866 if test -z "$run"; then
6867 if test -n "$shlibpath_var"; then
6868 # Export the shlibpath_var.
6869 eval "export $shlibpath_var"
6872 # Restore saved environment variables
6873 for lt_var
in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6875 eval "if test \"\${save_$lt_var+set}\" = set; then
6876 $lt_var=\$save_$lt_var; export $lt_var
6880 # Now prepare to actually exec the command.
6881 exec_cmd
="\$cmd$args"
6883 # Display what would be done.
6884 if test -n "$shlibpath_var"; then
6885 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6886 $echo "export $shlibpath_var"
6893 # libtool clean and uninstall mode
6895 modename
="$modename: $mode"
6901 # This variable tells wrapper scripts just to set variables rather
6902 # than running their programs.
6903 libtool_install_magic
="$magic"
6908 -f) rm="$rm $arg"; rmforce
=yes ;;
6909 -*) rm="$rm $arg" ;;
6910 *) files
="$files $arg" ;;
6914 if test -z "$rm"; then
6915 $echo "$modename: you must specify an RM program" 1>&2
6922 origobjdir
="$objdir"
6923 for file in $files; do
6924 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6925 if test "X$dir" = "X$file"; then
6927 objdir
="$origobjdir"
6929 objdir
="$dir/$origobjdir"
6931 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6932 test "$mode" = uninstall
&& objdir
="$dir"
6934 # Remember objdir for removal later, being careful to avoid duplicates
6935 if test "$mode" = clean
; then
6938 *) rmdirs
="$rmdirs $objdir" ;;
6942 # Don't error if the file doesn't exist and rm -f was used.
6943 if (test -L "$file") >/dev
/null
2>&1 \
6944 ||
(test -h "$file") >/dev
/null
2>&1 \
6945 ||
test -f "$file"; then
6947 elif test -d "$file"; then
6950 elif test "$rmforce" = yes; then
6958 # Possibly a libtool archive, so verify it.
6959 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6962 # Delete the libtool libraries and symlinks.
6963 for n
in $library_names; do
6964 rmfiles
="$rmfiles $objdir/$n"
6966 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6970 case " $library_names " in
6971 # " " in the beginning catches empty $dlname
6973 *) rmfiles
="$rmfiles $objdir/$dlname" ;;
6975 test -n "$libdir" && rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6978 if test -n "$library_names"; then
6979 # Do each command in the postuninstall commands.
6980 cmds
=$postuninstall_cmds
6981 save_ifs
="$IFS"; IFS
='~'
6982 for cmd
in $cmds; do
6987 if test "$?" -ne 0 && test "$rmforce" != yes; then
6994 if test -n "$old_library"; then
6995 # Do each command in the old_postuninstall commands.
6996 cmds
=$old_postuninstall_cmds
6997 save_ifs
="$IFS"; IFS
='~'
6998 for cmd
in $cmds; do
7003 if test "$?" -ne 0 && test "$rmforce" != yes; then
7009 # FIXME: should reinstall the best remaining shared library.
7016 # Possibly a libtool object, so verify it.
7017 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
7022 # Add PIC object to the list of files to remove.
7023 if test -n "$pic_object" \
7024 && test "$pic_object" != none
; then
7025 rmfiles
="$rmfiles $dir/$pic_object"
7028 # Add non-PIC object to the list of files to remove.
7029 if test -n "$non_pic_object" \
7030 && test "$non_pic_object" != none
; then
7031 rmfiles
="$rmfiles $dir/$non_pic_object"
7037 if test "$mode" = clean
; then
7041 file=`$echo $file|${SED} 's,.exe$,,'`
7042 noexename
=`$echo $name|${SED} 's,.exe$,,'`
7043 # $file with .exe has already been added to rmfiles,
7044 # add $file without .exe
7045 rmfiles
="$rmfiles $file"
7048 # Do a test to see if this is a libtool program.
7049 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
7053 # note $name still contains .exe if it was in $file originally
7054 # as does the version of $file that was added into $rmfiles
7055 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7056 if test "$fast_install" = yes && test -n "$relink_command"; then
7057 rmfiles
="$rmfiles $objdir/lt-$name"
7059 if test "X$noexename" != "X$name" ; then
7060 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
7066 $show "$rm $rmfiles"
7067 $run $rm $rmfiles || exit_status
=1
7069 objdir
="$origobjdir"
7071 # Try to remove the ${objdir}s in the directories where we deleted files
7072 for dir
in $rmdirs; do
7073 if test -d "$dir"; then
7075 $run rmdir $dir >/dev
/null
2>&1
7083 $echo "$modename: you must specify a MODE" 1>&2
7084 $echo "$generic_help" 1>&2
7089 if test -z "$exec_cmd"; then
7090 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7091 $echo "$generic_help" 1>&2
7094 fi # test -z "$show_help"
7096 if test -n "$exec_cmd"; then
7101 # We need to display help for each of the modes.
7104 "Usage: $modename [OPTION]... [MODE-ARG]...
7106 Provide generalized library-building support services.
7108 --config show all configuration variables
7109 --debug enable verbose shell tracing
7110 -n, --dry-run display commands without modifying any files
7111 --features display basic configuration information and exit
7112 --finish same as \`--mode=finish'
7113 --help display this help message and exit
7114 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
7115 --quiet same as \`--silent'
7116 --silent don't print informational messages
7117 --tag=TAG use configuration variables from tag TAG
7118 --version print version information
7120 MODE must be one of the following:
7122 clean remove files from the build directory
7123 compile compile a source file into a libtool object
7124 execute automatically set library path, then run a program
7125 finish complete the installation of libtool libraries
7126 install install libraries or executables
7127 link create a library or an executable
7128 uninstall remove libraries from an installed directory
7130 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
7131 a more detailed description of MODE.
7133 Report bugs to <bug-libtool@gnu.org>."
7139 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7141 Remove files from the build directory.
7143 RM is the name of the program to use to delete files associated with each FILE
7144 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7147 If FILE is a libtool library, object or program, all the files associated
7148 with it are deleted. Otherwise, only FILE itself is deleted using RM."
7153 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7155 Compile a source file into a libtool library object.
7157 This mode accepts the following additional options:
7159 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
7160 -prefer-pic try to building PIC objects only
7161 -prefer-non-pic try to building non-PIC objects only
7162 -static always build a \`.o' file suitable for static linking
7164 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7165 from the given SOURCEFILE.
7167 The output file name is determined by removing the directory component from
7168 SOURCEFILE, then substituting the C source code suffix \`.c' with the
7169 library object suffix, \`.lo'."
7174 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7176 Automatically set library path, then run a program.
7178 This mode accepts the following additional options:
7180 -dlopen FILE add the directory containing FILE to the library path
7182 This mode sets the library path environment variable according to \`-dlopen'
7185 If any of the ARGS are libtool executable wrappers, then they are translated
7186 into their corresponding uninstalled binary, and any of their required library
7187 directories are added to the library path.
7189 Then, COMMAND is executed, with ARGS as arguments."
7194 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7196 Complete the installation of libtool libraries.
7198 Each LIBDIR is a directory that contains libtool libraries.
7200 The commands that this mode executes may require superuser privileges. Use
7201 the \`--dry-run' option if you just want to see what would be executed."
7206 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7208 Install executables or libraries.
7210 INSTALL-COMMAND is the installation command. The first component should be
7211 either the \`install' or \`cp' program.
7213 The rest of the components are interpreted as arguments to that command (only
7214 BSD-compatible install options are recognized)."
7219 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7221 Link object files or libraries together to form another library, or to
7222 create an executable program.
7224 LINK-COMMAND is a command using the C compiler that you would use to create
7225 a program from several object files.
7227 The following components of LINK-COMMAND are treated specially:
7229 -all-static do not do any dynamic linking at all
7230 -avoid-version do not add a version suffix if possible
7231 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
7232 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
7233 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7234 -export-symbols SYMFILE
7235 try to export only the symbols listed in SYMFILE
7236 -export-symbols-regex REGEX
7237 try to export only the symbols matching REGEX
7238 -LLIBDIR search LIBDIR for required installed libraries
7239 -lNAME OUTPUT-FILE requires the installed library libNAME
7240 -module build a library that can dlopened
7241 -no-fast-install disable the fast-install mode
7242 -no-install link a not-installable executable
7243 -no-undefined declare that a library does not refer to external symbols
7244 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
7245 -objectlist FILE Use a list of object files found in FILE to specify objects
7246 -precious-files-regex REGEX
7247 don't remove output files matching REGEX
7248 -release RELEASE specify package release information
7249 -rpath LIBDIR the created library will eventually be installed in LIBDIR
7250 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
7251 -static do not do any dynamic linking of uninstalled libtool libraries
7252 -static-libtool-libs
7253 do not do any dynamic linking of libtool libraries
7254 -version-info CURRENT[:REVISION[:AGE]]
7255 specify library version info [each variable defaults to 0]
7257 All other options (arguments beginning with \`-') are ignored.
7259 Every other argument is treated as a filename. Files ending in \`.la' are
7260 treated as uninstalled libtool libraries, other files are standard or library
7263 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7264 only library objects (\`.lo' files) may be specified, and \`-rpath' is
7265 required, except when creating a convenience library.
7267 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7268 using \`ar' and \`ranlib', or on Windows using \`lib'.
7270 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7271 is created, otherwise an executable program is created."
7276 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7278 Remove libraries from an installation directory.
7280 RM is the name of the program to use to delete files associated with each FILE
7281 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7284 If FILE is a libtool library, all the files associated with it are deleted.
7285 Otherwise, only FILE itself is deleted using RM."
7289 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7296 $echo "Try \`$modename --help' for more information about other modes."
7300 # The TAGs below are defined such that we never get into a situation
7301 # in which we disable both kinds of libraries. Given conflicting
7302 # choices, we go for a static library, that is the most portable,
7303 # since we can't tell whether shared libraries were disabled because
7304 # the user asked for that or because the platform doesn't support
7305 # them. This is particularly important on AIX, because we don't
7306 # support having both static and shared libraries enabled at the same
7307 # time on that platform, so we default to a shared-only configuration.
7308 # If a disable-shared tag is given, we'll fallback to a static-only
7309 # configuration. But we'll never go from static-only to shared-only.
7311 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7313 # ### END LIBTOOL TAG CONFIG: disable-shared
7315 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
7317 # ### END LIBTOOL TAG CONFIG: disable-static
7323 # ### BEGIN LIBTOOL TAG CONFIG: CXX
7325 # Libtool was configured on host Felix-Maschine:
7327 # Shell to use when invoking shell scripts.
7330 # Whether or not to build shared libraries.
7331 build_libtool_libs
=yes
7333 # Whether or not to build static libraries.
7336 # Whether or not to add -lc for building shared libraries.
7337 build_libtool_need_lc
=no
7339 # Whether or not to disallow shared libs when runtime libs are static
7340 allow_libtool_libs_with_static_runtimes
=yes
7342 # Whether or not to optimize for fast installation.
7343 fast_install
=needless
7351 build_alias
=i686-pc-cygwin
7352 build
=i686-pc-cygwin
7355 # An echo program that does not interpret backslashes.
7365 # LTCC compiler flags.
7368 # A language-specific compiler.
7371 # Is the compiler the GNU C compiler?
7375 EGREP
="/bin/grep -E"
7377 # The linker used to build libraries.
7378 LD
="/i686-pc-msys/bin/ld.exe"
7380 # Whether we need hard or soft links.
7383 # A BSD-compatible nm program.
7386 # A symbol stripping program
7389 # Used to examine libraries when file_magic_cmd begins "file"
7392 # Used on cygwin: DLL creation program.
7395 # Used on cygwin: object dumper.
7398 # Used on cygwin: assembler.
7401 # The name of the directory that contains temporary libtool files.
7404 # How to create reloadable object files.
7406 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7408 # How to pass a linker flag through the compiler.
7411 # Object file suffix (normally "o").
7414 # Old archive suffix (normally "a").
7417 # Shared library suffix (normally ".so").
7420 # Executable file suffix (normally "").
7423 # Additional compiler flags for building library objects.
7424 pic_flag
=" -DDLL_EXPORT -DPIC"
7427 # What is the maximum length of a command?
7430 # Does compiler simultaneously support -c and -o options?
7433 # Must we lock files when doing compilation?
7436 # Do we need the lib prefix for modules?
7439 # Do we need a version for libraries?
7442 # Whether dlopen is supported.
7443 dlopen_support
=unknown
7445 # Whether dlopen of programs is supported.
7448 # Whether dlopen of statically linked programs is supported.
7449 dlopen_self_static
=unknown
7451 # Compiler flag to prevent dynamic linking.
7454 # Compiler flag to turn off builtin functions.
7455 no_builtin_flag
=" -fno-builtin"
7457 # Compiler flag to allow reflexive dlopens.
7458 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7460 # Compiler flag to generate shared objects directly from archives.
7461 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7463 # Compiler flag to generate thread-safe objects.
7464 thread_safe_flag_spec
=""
7466 # Library versioning type.
7467 version_type
=windows
7469 # Format of library name prefix.
7470 libname_spec
="lib\$name"
7472 # List of archive names. First name is the real one, the rest are links.
7473 # The last name is the one that the linker finds with -lNAME.
7474 library_names_spec
="\$libname.dll.a"
7476 # The coded name of the library, if different from the real name.
7477 soname_spec
="\`echo \${libname} | sed -e s/^lib/cyg/\`\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
7479 # Commands used to build and install an old-style archive.
7481 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7482 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7483 old_postuninstall_cmds
=""
7485 # Create an old-style archive from a shared archive.
7486 old_archive_from_new_cmds
=""
7488 # Create a temporary old-style archive to link instead of a shared archive.
7489 old_archive_from_expsyms_cmds
=""
7491 # Commands used to build and install a shared archive.
7492 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
7493 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
7494 cp \$export_symbols \$output_objdir/\$soname.def;
7496 echo EXPORTS > \$output_objdir/\$soname.def;
7497 cat \$export_symbols >> \$output_objdir/\$soname.def;
7499 \$CC -shared -nostdlib \$output_objdir/\$soname.def \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
7500 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
7501 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
7502 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
7503 test -d \\\$dldir || mkdir -p \\\$dldir~
7504 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname~
7505 chmod a+x \\\$dldir/\$dlname"
7506 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
7507 dlpath=\$dir/\\\$dldll~
7510 # Commands used to build a loadable module (assumed same as above if empty)
7512 module_expsym_cmds
=""
7514 # Commands to strip libraries.
7515 old_striplib
="strip --strip-debug"
7516 striplib
="strip --strip-unneeded"
7518 # Dependencies to place before the objects being linked to create a
7522 # Dependencies to place after the objects being linked to create a
7526 # Dependencies to place before the objects being linked to create a
7530 # Dependencies to place after the objects being linked to create a
7532 postdeps
="-lstdc++ -lgcc -lmsys-1.0 -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc"
7534 # The directories searched by this compiler when creating a shared
7536 compiler_lib_search_dirs
="/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib"
7538 # The library search path used internally by the compiler when linking
7540 compiler_lib_search_path
="-L/usr/lib -L/usr/lib -L/bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 -L/bin/../lib/gcc-lib -L/usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 -L/bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib -L/usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib"
7542 # Method to check whether dependent libraries are shared objects.
7543 deplibs_check_method
=pass_all
7545 # Command to use when deplibs_check_method == file_magic.
7546 file_magic_cmd
="\$OBJDUMP -f"
7548 # Flag that allows shared libraries with undefined symbols to be built.
7549 allow_undefined_flag
="unsupported"
7551 # Flag that forces no undefined symbols.
7552 no_undefined_flag
=""
7554 # Commands used to finish a libtool library installation in a directory.
7557 # Same as above, but a single script fragment to be evaled but not shown.
7560 # Take the output of nm and produce a listing of raw symbols and C names.
7561 global_symbol_pipe
=""
7563 # Transform the output of nm in a proper C declaration
7564 global_symbol_to_cdecl
=""
7566 # Transform the output of nm in a C name address pair
7567 global_symbol_to_c_name_address
=""
7569 # This is the shared library runtime path variable.
7570 runpath_var
=LD_RUN_PATH
7572 # This is the shared library path variable.
7575 # Is shlibpath searched before the hard-coded library search path?
7576 shlibpath_overrides_runpath
=yes
7578 # How to hardcode a shared library path into an executable.
7579 hardcode_action
=immediate
7581 # Whether we should hardcode library paths into libraries.
7582 hardcode_into_libs
=no
7584 # Flag to hardcode $libdir into a binary during linking.
7585 # This must work even if $libdir does not exist.
7586 hardcode_libdir_flag_spec
="-L\$libdir"
7588 # If ld is used when linking, flag to hardcode $libdir into
7589 # a binary during linking. This must work even if $libdir does
7591 hardcode_libdir_flag_spec_ld
=""
7593 # Whether we need a single -rpath flag with a separated argument.
7594 hardcode_libdir_separator
=""
7596 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7600 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7604 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7605 # the resulting binary.
7606 hardcode_shlibpath_var
=unsupported
7608 # Set to yes if building a shared library automatically hardcodes DIR into the library
7609 # and all subsequent libraries and executables linked against it.
7610 hardcode_automatic
=no
7612 # Variables whose values should be saved in libtool wrapper scripts and
7613 # restored at relink time.
7614 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7616 # Whether libtool must link a program against all its dependency libraries.
7617 link_all_deplibs
=unknown
7619 # Compile-time system search path for libraries
7620 sys_lib_search_path_spec
="/usr/lib /lib/w32api /lib /usr/local/lib"
7622 # Run-time system search path for libraries
7623 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
7625 # Fix the shell variable $srcfile for the compiler.
7628 # Set to yes if exported symbols are required.
7629 always_export_symbols
=no
7631 # The commands to list exported symbols.
7632 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGRS][ ]/s/.*[ ]\\\\([^ ]*\\\\)/\\\\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\\\\([^ ]*\\\\)[ ][^ ]*/\\\\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//' | sort | uniq > \$export_symbols"
7634 # The commands to extract the exported symbol list from a shared archive.
7635 extract_expsyms_cmds
=""
7637 # Symbols that should not be listed in the preloaded symbols.
7638 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
7640 # Symbols that must always be exported.
7643 # ### END LIBTOOL TAG CONFIG: CXX
7645 # ### BEGIN LIBTOOL TAG CONFIG: F77
7647 # Libtool was configured on host Felix-Maschine:
7649 # Shell to use when invoking shell scripts.
7652 # Whether or not to build shared libraries.
7653 build_libtool_libs
=yes
7655 # Whether or not to build static libraries.
7658 # Whether or not to add -lc for building shared libraries.
7659 build_libtool_need_lc
=no
7661 # Whether or not to disallow shared libs when runtime libs are static
7662 allow_libtool_libs_with_static_runtimes
=yes
7664 # Whether or not to optimize for fast installation.
7665 fast_install
=needless
7673 build_alias
=i686-pc-cygwin
7674 build
=i686-pc-cygwin
7677 # An echo program that does not interpret backslashes.
7687 # LTCC compiler flags.
7690 # A language-specific compiler.
7693 # Is the compiler the GNU C compiler?
7697 EGREP
="/bin/grep -E"
7699 # The linker used to build libraries.
7700 LD
="/i686-pc-msys/bin/ld.exe"
7702 # Whether we need hard or soft links.
7705 # A BSD-compatible nm program.
7708 # A symbol stripping program
7711 # Used to examine libraries when file_magic_cmd begins "file"
7714 # Used on cygwin: DLL creation program.
7717 # Used on cygwin: object dumper.
7720 # Used on cygwin: assembler.
7723 # The name of the directory that contains temporary libtool files.
7726 # How to create reloadable object files.
7728 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7730 # How to pass a linker flag through the compiler.
7733 # Object file suffix (normally "o").
7736 # Old archive suffix (normally "a").
7739 # Shared library suffix (normally ".so").
7742 # Executable file suffix (normally "").
7745 # Additional compiler flags for building library objects.
7746 pic_flag
=" -DDLL_EXPORT"
7749 # What is the maximum length of a command?
7752 # Does compiler simultaneously support -c and -o options?
7755 # Must we lock files when doing compilation?
7758 # Do we need the lib prefix for modules?
7761 # Do we need a version for libraries?
7764 # Whether dlopen is supported.
7765 dlopen_support
=unknown
7767 # Whether dlopen of programs is supported.
7770 # Whether dlopen of statically linked programs is supported.
7771 dlopen_self_static
=unknown
7773 # Compiler flag to prevent dynamic linking.
7776 # Compiler flag to turn off builtin functions.
7779 # Compiler flag to allow reflexive dlopens.
7780 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7782 # Compiler flag to generate shared objects directly from archives.
7783 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7785 # Compiler flag to generate thread-safe objects.
7786 thread_safe_flag_spec
=""
7788 # Library versioning type.
7789 version_type
=windows
7791 # Format of library name prefix.
7792 libname_spec
="lib\$name"
7794 # List of archive names. First name is the real one, the rest are links.
7795 # The last name is the one that the linker finds with -lNAME.
7796 library_names_spec
="\$libname.dll.a"
7798 # The coded name of the library, if different from the real name.
7799 soname_spec
="\`echo \${libname} | sed -e s/^lib/cyg/\`\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
7801 # Commands used to build and install an old-style archive.
7803 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7804 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7805 old_postuninstall_cmds
=""
7807 # Create an old-style archive from a shared archive.
7808 old_archive_from_new_cmds
=""
7810 # Create a temporary old-style archive to link instead of a shared archive.
7811 old_archive_from_expsyms_cmds
=""
7813 # Commands used to build and install a shared archive.
7814 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
7815 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
7816 cp \$export_symbols \$output_objdir/\$soname.def;
7818 echo EXPORTS > \$output_objdir/\$soname.def;
7819 cat \$export_symbols >> \$output_objdir/\$soname.def;
7821 \$CC -shared \$output_objdir/\$soname.def \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
7822 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
7823 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
7824 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
7825 test -d \\\$dldir || mkdir -p \\\$dldir~
7826 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname~
7827 chmod a+x \\\$dldir/\$dlname"
7828 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
7829 dlpath=\$dir/\\\$dldll~
7832 # Commands used to build a loadable module (assumed same as above if empty)
7834 module_expsym_cmds
=""
7836 # Commands to strip libraries.
7837 old_striplib
="strip --strip-debug"
7838 striplib
="strip --strip-unneeded"
7840 # Dependencies to place before the objects being linked to create a
7844 # Dependencies to place after the objects being linked to create a
7848 # Dependencies to place before the objects being linked to create a
7852 # Dependencies to place after the objects being linked to create a
7856 # The directories searched by this compiler when creating a shared
7858 compiler_lib_search_dirs
=""
7860 # The library search path used internally by the compiler when linking
7862 compiler_lib_search_path
=""
7864 # Method to check whether dependent libraries are shared objects.
7865 deplibs_check_method
=pass_all
7867 # Command to use when deplibs_check_method == file_magic.
7868 file_magic_cmd
="\$OBJDUMP -f"
7870 # Flag that allows shared libraries with undefined symbols to be built.
7871 allow_undefined_flag
="unsupported"
7873 # Flag that forces no undefined symbols.
7874 no_undefined_flag
=""
7876 # Commands used to finish a libtool library installation in a directory.
7879 # Same as above, but a single script fragment to be evaled but not shown.
7882 # Take the output of nm and produce a listing of raw symbols and C names.
7883 global_symbol_pipe
=""
7885 # Transform the output of nm in a proper C declaration
7886 global_symbol_to_cdecl
=""
7888 # Transform the output of nm in a C name address pair
7889 global_symbol_to_c_name_address
=""
7891 # This is the shared library runtime path variable.
7892 runpath_var
=LD_RUN_PATH
7894 # This is the shared library path variable.
7897 # Is shlibpath searched before the hard-coded library search path?
7898 shlibpath_overrides_runpath
=yes
7900 # How to hardcode a shared library path into an executable.
7901 hardcode_action
=immediate
7903 # Whether we should hardcode library paths into libraries.
7904 hardcode_into_libs
=no
7906 # Flag to hardcode $libdir into a binary during linking.
7907 # This must work even if $libdir does not exist.
7908 hardcode_libdir_flag_spec
="-L\$libdir"
7910 # If ld is used when linking, flag to hardcode $libdir into
7911 # a binary during linking. This must work even if $libdir does
7913 hardcode_libdir_flag_spec_ld
=""
7915 # Whether we need a single -rpath flag with a separated argument.
7916 hardcode_libdir_separator
=""
7918 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7922 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7926 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7927 # the resulting binary.
7928 hardcode_shlibpath_var
=unsupported
7930 # Set to yes if building a shared library automatically hardcodes DIR into the library
7931 # and all subsequent libraries and executables linked against it.
7932 hardcode_automatic
=no
7934 # Variables whose values should be saved in libtool wrapper scripts and
7935 # restored at relink time.
7936 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7938 # Whether libtool must link a program against all its dependency libraries.
7939 link_all_deplibs
=unknown
7941 # Compile-time system search path for libraries
7942 sys_lib_search_path_spec
="/usr/lib /lib/w32api /lib /usr/local/lib"
7944 # Run-time system search path for libraries
7945 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
7947 # Fix the shell variable $srcfile for the compiler.
7950 # Set to yes if exported symbols are required.
7951 always_export_symbols
=no
7953 # The commands to list exported symbols.
7954 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGRS][ ]/s/.*[ ]\\\\([^ ]*\\\\)/\\\\1 DATA/' -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > \$export_symbols"
7956 # The commands to extract the exported symbol list from a shared archive.
7957 extract_expsyms_cmds
=""
7959 # Symbols that should not be listed in the preloaded symbols.
7960 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
7962 # Symbols that must always be exported.
7965 # ### END LIBTOOL TAG CONFIG: F77