3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU libtool 1.5.24)
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
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 D293LXD1:
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-mingw32
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.
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
="\${libname}\`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 library search path used internally by the compiler when linking
258 compiler_lib_search_path
=""
260 # Method to check whether dependent libraries are shared objects.
261 deplibs_check_method
="file_magic file format pei*-i386(.*architecture: i386)?"
263 # Command to use when deplibs_check_method == file_magic.
264 file_magic_cmd
="\$OBJDUMP -f"
266 # Flag that allows shared libraries with undefined symbols to be built.
267 allow_undefined_flag
="unsupported"
269 # Flag that forces no undefined symbols.
272 # Commands used to finish a libtool library installation in a directory.
275 # Same as above, but a single script fragment to be evaled but not shown.
278 # Take the output of nm and produce a listing of raw symbols and C names.
279 global_symbol_pipe
=""
281 # Transform the output of nm in a proper C declaration
282 global_symbol_to_cdecl
=""
284 # Transform the output of nm in a C name address pair
285 global_symbol_to_c_name_address
=""
287 # This is the shared library runtime path variable.
288 runpath_var
=LD_RUN_PATH
290 # This is the shared library path variable.
293 # Is shlibpath searched before the hard-coded library search path?
294 shlibpath_overrides_runpath
=yes
296 # How to hardcode a shared library path into an executable.
297 hardcode_action
=immediate
299 # Whether we should hardcode library paths into libraries.
300 hardcode_into_libs
=no
302 # Flag to hardcode $libdir into a binary during linking.
303 # This must work even if $libdir does not exist.
304 hardcode_libdir_flag_spec
="-L\$libdir"
306 # If ld is used when linking, flag to hardcode $libdir into
307 # a binary during linking. This must work even if $libdir does
309 hardcode_libdir_flag_spec_ld
=""
311 # Whether we need a single -rpath flag with a separated argument.
312 hardcode_libdir_separator
=""
314 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
318 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
322 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
323 # the resulting binary.
324 hardcode_shlibpath_var
=unsupported
326 # Set to yes if building a shared library automatically hardcodes DIR into the library
327 # and all subsequent libraries and executables linked against it.
328 hardcode_automatic
=no
330 # Variables whose values should be saved in libtool wrapper scripts and
331 # restored at relink time.
332 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
334 # Whether libtool must link a program against all its dependency libraries.
335 link_all_deplibs
=unknown
337 # Compile-time system search path for libraries
338 sys_lib_search_path_spec
=" /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/ /usr/lib/gcc/i686-pc-msys/2.95.3-1/ /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/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/i686-pc-msys/2.95.3-1/ /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib/"
340 # Run-time system search path for libraries
341 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
343 # Fix the shell variable $srcfile for the compiler.
346 # Set to yes if exported symbols are required.
347 always_export_symbols
=no
349 # The commands to list exported symbols.
350 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGRS][ ]/s/.*[ ]\\\\([^ ]*\\\\)/\\\\1 DATA/' -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > \$export_symbols"
352 # The commands to extract the exported symbol list from a shared archive.
353 extract_expsyms_cmds
=""
355 # Symbols that should not be listed in the preloaded symbols.
356 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
358 # Symbols that must always be exported.
361 # ### END LIBTOOL CONFIG
363 # ltmain.sh - Provide generalized library-building support services.
364 # NOTE: Changing this file will not affect anything until you rerun configure.
366 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
367 # 2007 Free Software Foundation, Inc.
368 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
370 # This program is free software; you can redistribute it and/or modify
371 # it under the terms of the GNU General Public License as published by
372 # the Free Software Foundation; either version 2 of the License, or
373 # (at your option) any later version.
375 # This program is distributed in the hope that it will be useful, but
376 # WITHOUT ANY WARRANTY; without even the implied warranty of
377 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
378 # General Public License for more details.
380 # You should have received a copy of the GNU General Public License
381 # along with this program; if not, write to the Free Software
382 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
384 # As a special exception to the GNU General Public License, if you
385 # distribute this file as part of a program that contains a
386 # configuration script generated by Autoconf, you may include it under
387 # the same distribution terms that you use for the rest of that program.
391 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
392 # is ksh but when the shell is invoked as "sh" and the current value of
393 # the _XPG environment variable is not equal to 1 (one), the special
394 # positional parameter $0, within a function call, is the name of the
398 # The name of this program:
399 progname
=`echo "$progpath" | $SED $basename`
409 TIMESTAMP
=" (1.1220.2.455 2007/06/24 02:13:29)"
411 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
412 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then
415 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
416 # is contrary to our usage. Disable this feature.
417 alias -g '${1+"$@"}'='"$@"'
420 case `(set -o) 2>/dev/null` in *posix
*) set -o posix
;; esac
422 BIN_SH
=xpg4
; export BIN_SH
# for Tru64
423 DUALCASE
=1; export DUALCASE
# for MKS sh
425 # Check that we have a working $echo.
426 if test "X$1" = X--no-reexec
; then
427 # Discard the --no-reexec flag, and continue.
429 elif test "X$1" = X--fallback-echo
; then
430 # Avoid inline document here, it may be left over
432 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
433 # Yippee, $echo works!
436 # Restart under the correct shell, and then maybe $echo will work.
437 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
440 if test "X$1" = X--fallback-echo
; then
441 # used as fallback echo
450 help="Try \`$progname --help' for more information."
451 magic
="%%%MAGIC variable%%%"
456 # Sed substitution that helps us do robust quoting. It backslashifies
457 # metacharacters that are still active within double-quoted strings.
458 Xsed
="${SED}"' -e 1s/^X//'
459 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
460 # test EBCDIC or ASCII
461 case `echo X|tr X '\101'` in
462 A
) # ASCII based system
463 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
465 NL2SP
='tr \015\012 \040\040'
467 *) # EBCDIC based system
469 NL2SP
='tr \r\n \100\100'
474 # Only set LANG and LC_ALL to C if already set.
475 # These must not be set unconditionally because not all systems understand
476 # e.g. LANG=C (notably SCO).
477 # We save the old values to restore during execute mode.
478 for lt_var
in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
480 eval "if test \"\${$lt_var+set}\" = set; then
481 save_$lt_var=\$$lt_var
487 # Make sure IFS has a sensible default
492 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
493 $echo "$modename: not configured to build any kind of library" 1>&2
494 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
509 lo2o
="s/\\.lo\$/.${objext}/"
510 o2lo
="s/\\.${objext}\$/.lo/"
514 #####################################
515 # Shell function definitions:
516 # This seems to be the best place for them
518 # func_mktempdir [string]
519 # Make a temporary directory that won't clash with other running
520 # libtool processes, and avoids race conditions if possible. If
521 # given, STRING is the basename for that directory.
524 my_template
="${TMPDIR-/tmp}/${1-$progname}"
526 if test "$run" = ":"; then
527 # Return a directory name, but don't create it in dry-run mode
528 my_tmpdir
="${my_template}-$$"
531 # If mktemp works, use that first and foremost
532 my_tmpdir
=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
534 if test ! -d "$my_tmpdir"; then
535 # Failing that, at least try and use $RANDOM to avoid a race
536 my_tmpdir
="${my_template}-${RANDOM-0}$$"
538 save_mktempdir_umask
=`umask`
541 umask $save_mktempdir_umask
544 # If we're not in dry-run mode, bomb out on failure
545 test -d "$my_tmpdir" ||
{
546 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
551 $echo "X$my_tmpdir" |
$Xsed
555 # func_win32_libid arg
556 # return the library type of file 'arg'
558 # Need a lot of goo to handle *both* DLLs and import libs
559 # Has to be a shell function in order to 'eat' the argument
560 # that is supplied when $file_magic_command is called.
563 win32_libid_type
="unknown"
564 win32_fileres
=`file -L $1 2>/dev/null`
565 case $win32_fileres in
566 *ar\ archive\ import\ library
*) # definitely import
567 win32_libid_type
="x86 archive import"
569 *ar\ archive
*) # could be an import, or static
570 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
571 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
572 win32_nmres
=`eval $NM -f posix -A $1 | \
581 import
*) win32_libid_type
="x86 archive import";;
582 *) win32_libid_type
="x86 archive static";;
587 win32_libid_type
="x86 DLL"
589 *executable
*) # but shell scripts are "executable" too...
590 case $win32_fileres in
591 *MS\ Windows\ PE\ Intel
*)
592 win32_libid_type
="x86 DLL"
597 $echo $win32_libid_type
602 # Infer tagged configuration to use if any are available and
603 # if one wasn't chosen via the "--tag" command line option.
604 # Only attempt this if the compiler in the base compile
605 # command doesn't match the default compiler.
606 # arg is usually of the form 'gcc ...'
609 if test -n "$available_tags" && test -z "$tagname"; then
613 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
617 CC_quoted
="$CC_quoted $arg"
620 # Blanks in the command may have been stripped by the calling shell,
621 # but not from the CC environment variable when configure was run.
622 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
623 # Blanks at the start of $base_compile will cause this to fail
624 # if we don't check for them as well.
626 for z
in $available_tags; do
627 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
628 # Evaluate the configuration.
629 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
632 # Double-quote args containing other shell metacharacters.
634 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
638 CC_quoted
="$CC_quoted $arg"
641 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
642 # The compiler in the base compile command matches
643 # the one in the tagged configuration.
644 # Assume this is the tagged configuration we want.
651 # If $tagname still isn't set, then no tagged configuration
652 # was found and let the user know that the "--tag" command
653 # line option must be used.
654 if test -z "$tagname"; then
655 $echo "$modename: unable to infer tagged configuration"
656 $echo "$modename: specify a tag with \`--tag'" 1>&2
659 # $echo "$modename: using $tagname tagged configuration"
667 # func_extract_an_archive dir oldlib
668 func_extract_an_archive
()
670 f_ex_an_ar_dir
="$1"; shift
671 f_ex_an_ar_oldlib
="$1"
673 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
674 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" ||
exit $?
675 if ($AR t
"$f_ex_an_ar_oldlib" |
sort |
sort -uc >/dev
/null
2>&1); then
678 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
683 # func_extract_archives gentop oldlib ...
684 func_extract_archives
()
686 my_gentop
="$1"; shift
694 $show "${rm}r $my_gentop"
695 $run ${rm}r
"$my_gentop"
696 $show "$mkdir $my_gentop"
697 $run $mkdir "$my_gentop"
699 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
703 for my_xlib
in $my_oldlibs; do
704 # Extract the objects.
706 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
707 *) my_xabs
=`pwd`"/$my_xlib" ;;
709 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
712 case " $extracted_archives " in
714 extracted_serial
=`expr $extracted_serial + 1`
715 my_xlib_u
=lt
$extracted_serial-$my_xlib ;;
719 extracted_archives
="$extracted_archives $my_xlib_u"
720 my_xdir
="$my_gentop/$my_xlib_u"
722 $show "${rm}r $my_xdir"
723 $run ${rm}r
"$my_xdir"
724 $show "$mkdir $my_xdir"
725 $run $mkdir "$my_xdir"
727 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
732 $show "Extracting $my_xabs"
733 # Do not bother doing anything if just a dry run
734 if test -z "$run"; then
735 darwin_orig_dir
=`pwd`
736 cd $my_xdir ||
exit $?
737 darwin_archive
=$my_xabs
739 darwin_base_archive
=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
740 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
741 if test -n "$darwin_arches"; then
742 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
744 $show "$darwin_base_archive has multiple architectures $darwin_arches"
745 for darwin_arch
in $darwin_arches ; do
746 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
747 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
748 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
749 func_extract_an_archive
"`pwd`" "${darwin_base_archive}"
751 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
752 done # $darwin_arches
753 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
754 darwin_filelist
=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
757 for darwin_file
in $darwin_filelist; do
758 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
759 lipo
-create -output "$darwin_file" $darwin_files
760 done # $darwin_filelist
762 cd "$darwin_orig_dir"
764 cd "$darwin_orig_dir"
765 func_extract_an_archive
"$my_xdir" "$my_xabs"
770 func_extract_an_archive
"$my_xdir" "$my_xabs"
773 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
775 func_extract_archives_result
="$my_oldobjs"
777 # End of Shell function definitions
778 #####################################
781 eval std_shrext
=\"$shrext_cmds\"
785 # Parse our command line options once, thoroughly.
786 while test "$#" -gt 0
792 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
796 # If the previous option needs an argument, assign it.
797 if test -n "$prev"; then
800 execute_dlfiles
="$execute_dlfiles $arg"
804 preserve_args
="${preserve_args}=$arg"
806 # Check whether tagname contains only valid characters
809 $echo "$progname: invalid tag name: $tagname" 1>&2
816 # Don't test for the "default" C tag, as we know, it's there, but
817 # not specially marked.
820 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
821 taglist
="$taglist $tagname"
822 # Evaluate the configuration.
823 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
825 $echo "$progname: ignoring unknown tag $tagname" 1>&2
840 # Have we seen a non-optional argument yet?
848 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
850 Copyright (C) 2007 Free Software Foundation, Inc.
851 This is free software; see the source for copying conditions. There is NO
852 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
857 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
858 # Now print the configurations for the tags.
859 for tagname
in $taglist; do
860 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
866 $echo "$progname: enabling shell trace mode"
868 preserve_args
="$preserve_args $arg"
877 if test "$build_libtool_libs" = yes; then
878 $echo "enable shared libraries"
880 $echo "disable shared libraries"
882 if test "$build_old_libs" = yes; then
883 $echo "enable static libraries"
885 $echo "disable static libraries"
890 --finish) mode
="finish" ;;
892 --mode) prevopt
="--mode" prev
=mode
;;
893 --mode=*) mode
="$optarg" ;;
895 --preserve-dup-deps) duplicate_deps
="yes" ;;
899 preserve_args
="$preserve_args $arg"
905 preserve_args
="$preserve_args --tag"
908 set tag
"$optarg" ${1+"$@"}
911 preserve_args
="$preserve_args --tag"
920 $echo "$modename: unrecognized option \`$arg'" 1>&2
932 if test -n "$prevopt"; then
933 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
938 case $disable_libs in
942 build_libtool_libs
=no
946 build_old_libs
=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
950 # If this variable is set in any of the actions, the command in it
951 # will be execed at the end. This prevents here-documents from being
952 # left over by shells.
955 if test -z "$show_help"; then
957 # Infer the operation mode.
958 if test -z "$mode"; then
959 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
960 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
962 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
974 *db |
*dbx |
*strace |
*truss
)
984 # If we have no mode, but dlfiles were specified, then do execute mode.
985 test -n "$execute_dlfiles" && mode
=execute
987 # Just use the default operation mode.
988 if test -z "$mode"; then
989 if test -n "$nonopt"; then
990 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
992 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
999 # Only execute mode is allowed to have -dlopen flags.
1000 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
1001 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
1006 # Change the help message to a mode-specific one.
1007 generic_help
="$help"
1008 help="Try \`$modename --help --mode=$mode' for more information."
1010 # These modes are in order of execution frequency so that they run quickly.
1012 # libtool compile mode
1014 modename
="$modename: compile"
1015 # Get the compilation command and the source file.
1017 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
1028 # do not "continue". Instead, add this to base_compile
1040 # Accept any command-line options.
1043 if test -n "$libobj" ; then
1044 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
1051 -static |
-prefer-pic |
-prefer-non-pic)
1062 arg_mode
=arg
# the next one goes into the "base_compile" arg list
1063 continue # The current "srcfile" will either be retained or
1064 ;; # replaced later. I would guess that would be a bug.
1067 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1069 save_ifs
="$IFS"; IFS
=','
1070 for arg
in $args; do
1073 # Double-quote args containing other shell metacharacters.
1074 # Many Bourne shells cannot handle close brackets correctly
1075 # in scan sets, so we specify it separately.
1077 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1081 lastarg
="$lastarg $arg"
1084 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1086 # Add the arguments to base_compile.
1087 base_compile
="$base_compile $lastarg"
1092 # Accept the current argument as the source file.
1093 # The previous "srcfile" becomes the current argument.
1100 esac # case $arg_mode
1102 # Aesthetically quote the previous argument.
1103 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1106 # Double-quote args containing other shell metacharacters.
1107 # Many Bourne shells cannot handle close brackets correctly
1108 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1109 # in scan sets (worked around with variable expansion),
1110 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1111 # at all, so we specify them separately.
1112 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1113 lastarg
="\"$lastarg\""
1117 base_compile
="$base_compile $lastarg"
1122 $echo "$modename: you must specify an argument for -Xcompile"
1126 $echo "$modename: you must specify a target with \`-o'" 1>&2
1130 # Get the name of the library object.
1131 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1135 # Recognize several different file suffixes.
1136 # If the user specifies -o file.o, it is replaced with file.lo
1146 *.class
) xform
=class
;;
1149 *.
[fF
][09]?
) xform
=[fF
][09].
;;
1151 *.java
) xform
=java
;;
1155 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1158 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1160 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1165 func_infer_tag
$base_compile
1167 for arg
in $later; do
1186 qlibobj
=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1188 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1189 qlibobj
="\"$qlibobj\"" ;;
1191 test "X$libobj" != "X$qlibobj" \
1192 && $echo "X$libobj" |
grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1193 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1194 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1195 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1196 if test "X$xdir" = "X$obj"; then
1201 lobj
=${xdir}$objdir/$objname
1203 if test -z "$base_compile"; then
1204 $echo "$modename: you must specify a compilation command" 1>&2
1209 # Delete any leftover library objects.
1210 if test "$build_old_libs" = yes; then
1211 removelist
="$obj $lobj $libobj ${libobj}T"
1213 removelist
="$lobj $libobj ${libobj}T"
1216 $run $rm $removelist
1217 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1219 # On Cygwin there's no "real" PIC flag so we must build both object types
1221 cygwin
* | mingw
* | pw32
* | os2
*)
1225 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1226 # non-PIC code in shared libraries is not supported
1230 # Calculate the filename of the output object if compiler does
1231 # not support -o with -c
1232 if test "$compiler_c_o" = no
; then
1233 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1234 lockfile
="$output_obj.lock"
1235 removelist
="$removelist $output_obj $lockfile"
1236 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1243 # Lock this critical section if it is needed
1244 # We use this script file to make the link, it avoids creating a new file
1245 if test "$need_locks" = yes; then
1246 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1247 $show "Waiting for $lockfile to be removed"
1250 elif test "$need_locks" = warn
; then
1251 if test -f "$lockfile"; then
1253 *** ERROR, $lockfile exists and contains:
1254 `cat $lockfile 2>/dev/null`
1256 This indicates that another process is trying to use the same
1257 temporary object file, and libtool could not work around it because
1258 your compiler does not support \`-c' and \`-o' together. If you
1259 repeat this compilation, it may succeed, by chance, but you had better
1260 avoid parallel builds (make -j) in this platform, or get a better
1263 $run $rm $removelist
1266 $echo "$srcfile" > "$lockfile"
1269 if test -n "$fix_srcfile_path"; then
1270 eval srcfile
=\"$fix_srcfile_path\"
1272 qsrcfile
=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1274 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1275 qsrcfile
="\"$qsrcfile\"" ;;
1278 $run $rm "$libobj" "${libobj}T"
1280 # Create a libtool object file (analogous to a ".la" file),
1281 # but don't create it if we're doing a dry run.
1282 test -z "$run" && cat > ${libobj}T
<<EOF
1283 # $libobj - a libtool object file
1284 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1286 # Please DO NOT delete this file!
1287 # It is necessary for linking the library.
1289 # Name of the PIC object.
1292 # Only build a PIC object if we are building libtool libraries.
1293 if test "$build_libtool_libs" = yes; then
1294 # Without this assignment, base_compile gets emptied.
1295 fbsd_hideous_sh_bug
=$base_compile
1297 if test "$pic_mode" != no
; then
1298 command="$base_compile $qsrcfile $pic_flag"
1300 # Don't build PIC code
1301 command="$base_compile $qsrcfile"
1304 if test ! -d "${xdir}$objdir"; then
1305 $show "$mkdir ${xdir}$objdir"
1306 $run $mkdir ${xdir}$objdir
1308 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1313 if test -z "$output_obj"; then
1314 # Place PIC objects in $objdir
1315 command="$command -o $lobj"
1318 $run $rm "$lobj" "$output_obj"
1321 if $run eval "$command"; then :
1323 test -n "$output_obj" && $run $rm $removelist
1327 if test "$need_locks" = warn
&&
1328 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1330 *** ERROR, $lockfile contains:
1331 `cat $lockfile 2>/dev/null`
1333 but it should contain:
1336 This indicates that another process is trying to use the same
1337 temporary object file, and libtool could not work around it because
1338 your compiler does not support \`-c' and \`-o' together. If you
1339 repeat this compilation, it may succeed, by chance, but you had better
1340 avoid parallel builds (make -j) in this platform, or get a better
1343 $run $rm $removelist
1347 # Just move the object if needed, then go on to compile the next one
1348 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1349 $show "$mv $output_obj $lobj"
1350 if $run $mv $output_obj $lobj; then :
1353 $run $rm $removelist
1358 # Append the name of the PIC object to the libtool object file.
1359 test -z "$run" && cat >> ${libobj}T
<<EOF
1360 pic_object='$objdir/$objname'
1364 # Allow error messages only from the first compilation.
1365 if test "$suppress_opt" = yes; then
1366 suppress_output
=' >/dev/null 2>&1'
1369 # No PIC object so indicate it doesn't exist in the libtool
1371 test -z "$run" && cat >> ${libobj}T
<<EOF
1377 # Only build a position-dependent object if we build old libraries.
1378 if test "$build_old_libs" = yes; then
1379 if test "$pic_mode" != yes; then
1380 # Don't build PIC code
1381 command="$base_compile $qsrcfile"
1383 command="$base_compile $qsrcfile $pic_flag"
1385 if test "$compiler_c_o" = yes; then
1386 command="$command -o $obj"
1389 # Suppress compiler output if we already did a PIC compilation.
1390 command="$command$suppress_output"
1391 $run $rm "$obj" "$output_obj"
1393 if $run eval "$command"; then :
1395 $run $rm $removelist
1399 if test "$need_locks" = warn
&&
1400 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1402 *** ERROR, $lockfile contains:
1403 `cat $lockfile 2>/dev/null`
1405 but it should contain:
1408 This indicates that another process is trying to use the same
1409 temporary object file, and libtool could not work around it because
1410 your compiler does not support \`-c' and \`-o' together. If you
1411 repeat this compilation, it may succeed, by chance, but you had better
1412 avoid parallel builds (make -j) in this platform, or get a better
1415 $run $rm $removelist
1419 # Just move the object if needed
1420 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1421 $show "$mv $output_obj $obj"
1422 if $run $mv $output_obj $obj; then :
1425 $run $rm $removelist
1430 # Append the name of the non-PIC object the libtool object file.
1431 # Only append if the libtool object file exists.
1432 test -z "$run" && cat >> ${libobj}T
<<EOF
1433 # Name of the non-PIC object.
1434 non_pic_object='$objname'
1438 # Append the name of the non-PIC object the libtool object file.
1439 # Only append if the libtool object file exists.
1440 test -z "$run" && cat >> ${libobj}T
<<EOF
1441 # Name of the non-PIC object.
1447 $run $mv "${libobj}T" "${libobj}"
1449 # Unlock the critical section if it was locked
1450 if test "$need_locks" != no
; then
1451 $run $rm "$lockfile"
1459 modename
="$modename: link"
1461 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1462 # It is impossible to link a dll without this setting, and
1463 # we shouldn't force the makefile maintainer to figure out
1464 # which system we are compiling for in order to pass an extra
1465 # flag for every libtool invocation.
1466 # allow_undefined=no
1468 # FIXME: Unfortunately, there are problems with the above when trying
1469 # to make a dll which has undefined symbols, in which case not
1470 # even a static library is built. For now, we need to specify
1471 # -no-undefined on the libtool link line when we can be certain
1472 # that all symbols are satisfied, otherwise we get a static library.
1479 libtool_args
="$nonopt"
1480 base_compile
="$nonopt $@"
1481 compile_command
="$nonopt"
1482 finalize_command
="$nonopt"
1495 lib_search_path
=`pwd`
1504 export_symbols_regex
=
1512 notinst_path
= # paths that contain not-installed libtool libraries
1513 precious_files_regex
=
1514 prefer_static_libs
=no
1527 func_infer_tag
$base_compile
1529 # We need to know -static, to get the right output filenames.
1533 -all-static |
-static |
-static-libtool-libs)
1536 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1537 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1539 if test -n "$link_static_flag"; then
1540 dlopen_self
=$dlopen_self_static
1542 prefer_static_libs
=yes
1545 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1546 dlopen_self
=$dlopen_self_static
1548 prefer_static_libs
=built
1550 -static-libtool-libs)
1551 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1552 dlopen_self
=$dlopen_self_static
1554 prefer_static_libs
=yes
1557 build_libtool_libs
=no
1564 # See if our shared archives depend on static archives.
1565 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1567 # Go through the arguments, transforming them on the way.
1568 while test "$#" -gt 0; do
1572 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1573 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1577 libtool_args
="$libtool_args $qarg"
1579 # If the previous option needs an argument, assign it.
1580 if test -n "$prev"; then
1583 compile_command
="$compile_command @OUTPUT@"
1584 finalize_command
="$finalize_command @OUTPUT@"
1590 if test "$preload" = no
; then
1591 # Add the symbol object into the linking commands.
1592 compile_command
="$compile_command @SYMFILE@"
1593 finalize_command
="$finalize_command @SYMFILE@"
1597 *.la |
*.lo
) ;; # We handle these cases below.
1599 if test "$dlself" = no
; then
1607 if test "$prev" = dlprefiles
; then
1609 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1619 if test "$prev" = dlfiles
; then
1620 dlfiles
="$dlfiles $arg"
1622 dlprefiles
="$dlprefiles $arg"
1630 export_symbols
="$arg"
1631 if test ! -f "$arg"; then
1632 $echo "$modename: symbol file \`$arg' does not exist"
1639 export_symbols_regex
="$arg"
1644 inst_prefix_dir
="$arg"
1649 precious_files_regex
="$arg"
1659 if test -f "$arg"; then
1662 for fil
in `cat $save_arg`
1664 # moreargs="$moreargs $fil"
1666 # A libtool-controlled object.
1668 # Check to see that this really is a libtool object.
1669 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1674 # If there is no directory component, then add one.
1676 */* |
*\\*) .
$arg ;;
1680 if test -z "$pic_object" || \
1681 test -z "$non_pic_object" ||
1682 test "$pic_object" = none
&& \
1683 test "$non_pic_object" = none
; then
1684 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1688 # Extract subdirectory from the argument.
1689 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1690 if test "X$xdir" = "X$arg"; then
1696 if test "$pic_object" != none
; then
1697 # Prepend the subdirectory the object is found in.
1698 pic_object
="$xdir$pic_object"
1700 if test "$prev" = dlfiles
; then
1701 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1702 dlfiles
="$dlfiles $pic_object"
1706 # If libtool objects are unsupported, then we need to preload.
1711 # CHECK ME: I think I busted this. -Ossama
1712 if test "$prev" = dlprefiles
; then
1713 # Preload the old-style object.
1714 dlprefiles
="$dlprefiles $pic_object"
1719 libobjs
="$libobjs $pic_object"
1724 if test "$non_pic_object" != none
; then
1725 # Prepend the subdirectory the object is found in.
1726 non_pic_object
="$xdir$non_pic_object"
1728 # A standard non-PIC object
1729 non_pic_objects
="$non_pic_objects $non_pic_object"
1730 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1731 arg
="$non_pic_object"
1734 # If the PIC object exists, use it instead.
1735 # $xdir was prepended to $pic_object above.
1736 non_pic_object
="$pic_object"
1737 non_pic_objects
="$non_pic_objects $non_pic_object"
1740 # Only an error if not doing a dry-run.
1741 if test -z "$run"; then
1742 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1747 # Extract subdirectory from the argument.
1748 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1749 if test "X$xdir" = "X$arg"; then
1755 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1756 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1757 libobjs
="$libobjs $pic_object"
1758 non_pic_objects
="$non_pic_objects $non_pic_object"
1763 $echo "$modename: link input file \`$save_arg' does not exist"
1771 # We need an absolute path.
1773 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1775 $echo "$modename: only absolute run-paths are allowed" 1>&2
1779 if test "$prev" = rpath
; then
1782 *) rpath
="$rpath $arg" ;;
1787 *) xrpath
="$xrpath $arg" ;;
1794 compiler_flags
="$compiler_flags $qarg"
1796 compile_command
="$compile_command $qarg"
1797 finalize_command
="$finalize_command $qarg"
1801 linker_flags
="$linker_flags $qarg"
1802 compiler_flags
="$compiler_flags $wl$qarg"
1804 compile_command
="$compile_command $wl$qarg"
1805 finalize_command
="$finalize_command $wl$qarg"
1809 linker_flags
="$linker_flags $qarg"
1810 compiler_flags
="$compiler_flags $qarg"
1812 compile_command
="$compile_command $qarg"
1813 finalize_command
="$finalize_command $qarg"
1821 darwin_framework|darwin_framework_skip
)
1822 test "$prev" = "darwin_framework" && compiler_flags
="$compiler_flags $arg"
1823 compile_command
="$compile_command $arg"
1824 finalize_command
="$finalize_command $arg"
1829 eval "$prev=\"\$arg\""
1834 fi # test -n "$prev"
1840 if test -n "$link_static_flag"; then
1841 compile_command
="$compile_command $link_static_flag"
1842 finalize_command
="$finalize_command $link_static_flag"
1848 # FIXME: remove this flag sometime in the future.
1849 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1873 -export-symbols |
-export-symbols-regex)
1874 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1875 $echo "$modename: more than one -exported-symbols argument is not allowed"
1878 if test "X$arg" = "X-export-symbols"; then
1886 -framework|
-arch|
-isysroot)
1888 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1889 prev
=darwin_framework_skip
;;
1890 *) compiler_flags
="$compiler_flags $arg"
1891 prev
=darwin_framework
;;
1893 compile_command
="$compile_command $arg"
1894 finalize_command
="$finalize_command $arg"
1903 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1904 # so, if we see these flags be careful not to treat them like -L
1906 case $with_gcc/$host in
1907 no
/*-*-irix* |
/*-*-irix*)
1908 compile_command
="$compile_command $arg"
1909 finalize_command
="$finalize_command $arg"
1916 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1917 # We need an absolute path.
1919 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1921 absdir
=`cd "$dir" && pwd`
1922 if test -z "$absdir"; then
1923 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1925 notinst_path
="$notinst_path $dir"
1933 deplibs
="$deplibs -L$dir"
1934 lib_search_path
="$lib_search_path $dir"
1938 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1939 testbindir
=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1940 case :$dllsearchpath: in
1942 *) dllsearchpath
="$dllsearchpath:$dir";;
1944 case :$dllsearchpath: in
1945 *":$testbindir:"*) ;;
1946 *) dllsearchpath
="$dllsearchpath:$testbindir";;
1954 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1956 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-beos*)
1957 # These systems don't actually have a C or math library (as such)
1961 # These systems don't actually have a C library (as such)
1962 test "X$arg" = "X-lc" && continue
1964 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1965 # Do not include libc due to us having libc/libc_r.
1966 test "X$arg" = "X-lc" && continue
1968 *-*-rhapsody* |
*-*-darwin1.
[012])
1969 # Rhapsody C and math libraries are in the System framework
1970 deplibs
="$deplibs -framework System"
1973 *-*-sco3.2v5
* |
*-*-sco5v6*)
1974 # Causes problems with __ctype
1975 test "X$arg" = "X-lc" && continue
1977 *-*-sysv4.2uw2
* |
*-*-sysv5* |
*-*-unixware* |
*-*-OpenUNIX*)
1978 # Compiler inserts libc in the correct place for threads to work
1979 test "X$arg" = "X-lc" && continue
1982 elif test "X$arg" = "X-lc_r"; then
1984 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1985 # Do not include libc_r directly, use -pthread flag.
1990 deplibs
="$deplibs $arg"
1994 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1995 # classes, name mangling, and exception handling.
1997 compile_command
="$compile_command $arg"
1998 compiler_flags
="$compiler_flags $arg"
1999 finalize_command
="$finalize_command $arg"
2004 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe|
-threads)
2005 compiler_flags
="$compiler_flags $arg"
2006 compile_command
="$compile_command $arg"
2007 finalize_command
="$finalize_command $arg"
2016 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2017 # -r[0-9][0-9]* specifies the processor on the SGI compiler
2018 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2019 # +DA*, +DD* enable 64-bit mode on the HP compiler
2020 # -q* pass through compiler args for the IBM compiler
2021 # -m* pass through architecture-specific compiler args for GCC
2022 # -m*, -t[45]*, -txscale* pass through architecture-specific
2023 # compiler args for GCC
2024 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
2025 # -F/path gives path to uninstalled frameworks, gcc on darwin
2026 # @file GCC response files
2027 -64|
-mips[0-9]|
-r[0-9][0-9]*|
-xarch=*|
-xtarget=*|
+DA
*|
+DD
*|
-q*|
-m*| \
2028 -t[45]*|
-txscale*|
-p|
-pg|
--coverage|
-fprofile-*|
-F*|@
*)
2030 # Unknown arguments in both finalize_command and compile_command need
2031 # to be aesthetically quoted because they are evaled later.
2032 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2034 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2038 compile_command
="$compile_command $arg"
2039 finalize_command
="$finalize_command $arg"
2040 compiler_flags
="$compiler_flags $arg"
2056 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-darwin*)
2057 # The PATH hackery in wrapper scripts is required on Windows
2058 # and Darwin in order for the loader to find any dlls it needs.
2059 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2060 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2063 *) no_install
=yes ;;
2080 -precious-files-regex)
2101 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2102 # We need an absolute path.
2104 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
2106 $echo "$modename: only absolute run-paths are allowed" 1>&2
2112 *) xrpath
="$xrpath $dir" ;;
2117 -static |
-static-libtool-libs)
2118 # The effects of -static are defined in a previous loop.
2119 # We used to do the same as -all-static on platforms that
2120 # didn't have a PIC flag, but the assumption that the effects
2121 # would be equivalent was wrong. It would break on at least
2122 # Digital Unix and AIX.
2142 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2144 save_ifs
="$IFS"; IFS
=','
2145 for flag
in $args; do
2148 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2153 compiler_flags
="$compiler_flags $flag"
2156 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2160 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2162 save_ifs
="$IFS"; IFS
=','
2163 for flag
in $args; do
2166 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2171 compiler_flags
="$compiler_flags $wl$flag"
2172 linker_flags
="$linker_flags $flag"
2175 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2193 # Some other compiler flag.
2195 # Unknown arguments in both finalize_command and compile_command need
2196 # to be aesthetically quoted because they are evaled later.
2197 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2199 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2206 # A standard object.
2211 # A libtool-controlled object.
2213 # Check to see that this really is a libtool object.
2214 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2219 # If there is no directory component, then add one.
2221 */* |
*\\*) .
$arg ;;
2225 if test -z "$pic_object" || \
2226 test -z "$non_pic_object" ||
2227 test "$pic_object" = none
&& \
2228 test "$non_pic_object" = none
; then
2229 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2233 # Extract subdirectory from the argument.
2234 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2235 if test "X$xdir" = "X$arg"; then
2241 if test "$pic_object" != none
; then
2242 # Prepend the subdirectory the object is found in.
2243 pic_object
="$xdir$pic_object"
2245 if test "$prev" = dlfiles
; then
2246 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2247 dlfiles
="$dlfiles $pic_object"
2251 # If libtool objects are unsupported, then we need to preload.
2256 # CHECK ME: I think I busted this. -Ossama
2257 if test "$prev" = dlprefiles
; then
2258 # Preload the old-style object.
2259 dlprefiles
="$dlprefiles $pic_object"
2264 libobjs
="$libobjs $pic_object"
2269 if test "$non_pic_object" != none
; then
2270 # Prepend the subdirectory the object is found in.
2271 non_pic_object
="$xdir$non_pic_object"
2273 # A standard non-PIC object
2274 non_pic_objects
="$non_pic_objects $non_pic_object"
2275 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2276 arg
="$non_pic_object"
2279 # If the PIC object exists, use it instead.
2280 # $xdir was prepended to $pic_object above.
2281 non_pic_object
="$pic_object"
2282 non_pic_objects
="$non_pic_objects $non_pic_object"
2285 # Only an error if not doing a dry-run.
2286 if test -z "$run"; then
2287 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2292 # Extract subdirectory from the argument.
2293 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2294 if test "X$xdir" = "X$arg"; then
2300 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2301 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2302 libobjs
="$libobjs $pic_object"
2303 non_pic_objects
="$non_pic_objects $non_pic_object"
2310 deplibs
="$deplibs $arg"
2311 old_deplibs
="$old_deplibs $arg"
2316 # A libtool-controlled library.
2318 if test "$prev" = dlfiles
; then
2319 # This library was specified with -dlopen.
2320 dlfiles
="$dlfiles $arg"
2322 elif test "$prev" = dlprefiles
; then
2323 # The library was specified with -dlpreopen.
2324 dlprefiles
="$dlprefiles $arg"
2327 deplibs
="$deplibs $arg"
2332 # Some other compiler argument.
2334 # Unknown arguments in both finalize_command and compile_command need
2335 # to be aesthetically quoted because they are evaled later.
2336 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2338 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2345 # Now actually substitute the argument into the commands.
2346 if test -n "$arg"; then
2347 compile_command
="$compile_command $arg"
2348 finalize_command
="$finalize_command $arg"
2350 done # argument parsing loop
2352 if test -n "$prev"; then
2353 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2358 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2359 eval arg
=\"$export_dynamic_flag_spec\"
2360 compile_command
="$compile_command $arg"
2361 finalize_command
="$finalize_command $arg"
2365 # calculate the name of the file, without its directory
2366 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2367 libobjs_save
="$libobjs"
2369 if test -n "$shlibpath_var"; then
2370 # get the directories listed in $shlibpath_var
2371 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2375 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2376 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2378 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2379 if test "X$output_objdir" = "X$output"; then
2380 output_objdir
="$objdir"
2382 output_objdir
="$output_objdir/$objdir"
2384 # Create the object directory.
2385 if test ! -d "$output_objdir"; then
2386 $show "$mkdir $output_objdir"
2387 $run $mkdir $output_objdir
2389 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2394 # Determine the type of output
2397 $echo "$modename: you must specify an output file" 1>&2
2401 *.
$libext) linkmode
=oldlib
;;
2402 *.lo |
*.
$objext) linkmode
=obj
;;
2403 *.la
) linkmode
=lib
;;
2404 *) linkmode
=prog
;; # Anything else should be a program.
2408 *cygwin
* |
*mingw
* |
*pw32
*)
2409 # don't eliminate duplications in $postdeps and $predeps
2410 duplicate_compiler_generated_deps
=yes
2413 duplicate_compiler_generated_deps
=$duplicate_deps
2419 # Find all interdependent deplibs by searching for libraries
2420 # that are linked more than once (e.g. -la -lb -la)
2421 for deplib
in $deplibs; do
2422 if test "X$duplicate_deps" = "Xyes" ; then
2424 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2427 libs
="$libs $deplib"
2430 if test "$linkmode" = lib
; then
2431 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2433 # Compute libraries that are listed more than once in $predeps
2434 # $postdeps and mark them as special (i.e., whose duplicates are
2435 # not to be eliminated).
2437 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2438 for pre_post_dep
in $predeps $postdeps; do
2439 case "$pre_post_deps " in
2440 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2442 pre_post_deps
="$pre_post_deps $pre_post_dep"
2451 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2452 notinst_deplibs
= # not-installed libtool libraries
2456 for file in $dlfiles $dlprefiles; do
2460 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2472 passes
="conv scan dlopen dlpreopen link"
2477 for pass
in $passes; do
2478 if test "$linkmode,$pass" = "lib,link" ||
2479 test "$linkmode,$pass" = "prog,scan"; then
2483 if test "$linkmode" = prog
; then
2485 dlopen
) libs
="$dlfiles" ;;
2486 dlpreopen
) libs
="$dlprefiles" ;;
2487 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2490 if test "$pass" = dlopen
; then
2491 # Collect dlpreopened libraries
2492 save_deplibs
="$deplibs"
2495 for deplib
in $libs; do
2499 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe|
-threads)
2500 if test "$linkmode,$pass" = "prog,link"; then
2501 compile_deplibs
="$deplib $compile_deplibs"
2502 finalize_deplibs
="$deplib $finalize_deplibs"
2504 compiler_flags
="$compiler_flags $deplib"
2509 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2510 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2513 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2514 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2515 for search_ext
in .la
$std_shrext .so .a
; do
2516 # Search the libtool library
2517 lib
="$searchdir/lib${name}${search_ext}"
2518 if test -f "$lib"; then
2519 if test "$search_ext" = ".la"; then
2528 if test "$found" != yes; then
2529 # deplib doesn't seem to be a libtool library
2530 if test "$linkmode,$pass" = "prog,link"; then
2531 compile_deplibs
="$deplib $compile_deplibs"
2532 finalize_deplibs
="$deplib $finalize_deplibs"
2534 deplibs
="$deplib $deplibs"
2535 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2538 else # deplib is a libtool library
2539 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2540 # We need to do some special things here, and not later.
2541 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2542 case " $predeps $postdeps " in
2544 if (${SED} -e '2q' $lib |
2545 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2549 */* |
*\\*) .
$lib ;;
2552 for l
in $old_library $library_names; do
2555 if test "X$ll" = "X$old_library" ; then # only static version available
2557 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2558 test "X$ladir" = "X$lib" && ladir
="."
2559 lib
=$ladir/$old_library
2560 if test "$linkmode,$pass" = "prog,link"; then
2561 compile_deplibs
="$deplib $compile_deplibs"
2562 finalize_deplibs
="$deplib $finalize_deplibs"
2564 deplibs
="$deplib $deplibs"
2565 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2579 deplibs
="$deplib $deplibs"
2580 test "$pass" = conv
&& continue
2581 newdependency_libs
="$deplib $newdependency_libs"
2582 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2585 if test "$pass" = conv
; then
2586 deplibs
="$deplib $deplibs"
2589 if test "$pass" = scan
; then
2590 deplibs
="$deplib $deplibs"
2592 compile_deplibs
="$deplib $compile_deplibs"
2593 finalize_deplibs
="$deplib $finalize_deplibs"
2595 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2598 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2604 if test "$pass" = link
; then
2605 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2606 # Make sure the xrpath contains only unique directories.
2609 *) xrpath
="$xrpath $dir" ;;
2612 deplibs
="$deplib $deplibs"
2615 *.la
) lib
="$deplib" ;;
2617 if test "$pass" = conv
; then
2618 deplibs
="$deplib $deplibs"
2624 case $deplibs_check_method in
2626 set dummy
$deplibs_check_method
2627 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2628 if eval $echo \"$deplib\" 2>/dev
/null \
2630 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2638 if test "$valid_a_lib" != yes; then
2640 $echo "*** Warning: Trying to link with static lib archive $deplib."
2641 $echo "*** I have the capability to make that library automatically link in when"
2642 $echo "*** you link to this library. But I can only do this if you have a"
2643 $echo "*** shared version of the library, which you do not appear to have"
2644 $echo "*** because the file extensions .$libext of this argument makes me believe"
2645 $echo "*** that it is just a static archive that I should not used here."
2648 $echo "*** Warning: Linking the shared library $output against the"
2649 $echo "*** static library $deplib is not portable!"
2650 deplibs
="$deplib $deplibs"
2655 if test "$pass" != link
; then
2656 deplibs
="$deplib $deplibs"
2658 compile_deplibs
="$deplib $compile_deplibs"
2659 finalize_deplibs
="$deplib $finalize_deplibs"
2666 if test "$pass" = conv
; then
2667 deplibs
="$deplib $deplibs"
2668 elif test "$linkmode" = prog
; then
2669 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2670 # If there is no dlopen support or we're linking statically,
2671 # we need to preload.
2672 newdlprefiles
="$newdlprefiles $deplib"
2673 compile_deplibs
="$deplib $compile_deplibs"
2674 finalize_deplibs
="$deplib $finalize_deplibs"
2676 newdlfiles
="$newdlfiles $deplib"
2686 if test "$found" = yes ||
test -f "$lib"; then :
2688 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2692 # Check to see that this really is a libtool archive.
2693 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2695 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2699 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2700 test "X$ladir" = "X$lib" && ladir
="."
2708 # If the library was installed with an old release of libtool,
2709 # it will not redefine variables installed, or shouldnotlink
2717 */* |
*\\*) .
$lib ;;
2721 if test "$linkmode,$pass" = "lib,link" ||
2722 test "$linkmode,$pass" = "prog,scan" ||
2723 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2724 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2725 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2728 if test "$pass" = conv
; then
2729 # Only check for convenience libraries
2730 deplibs
="$lib $deplibs"
2731 if test -z "$libdir"; then
2732 if test -z "$old_library"; then
2733 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2736 # It is a libtool convenience library, so add in its objects.
2737 convenience
="$convenience $ladir/$objdir/$old_library"
2738 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2740 for deplib
in $dependency_libs; do
2741 deplibs
="$deplib $deplibs"
2742 if test "X$duplicate_deps" = "Xyes" ; then
2743 case "$tmp_libs " in
2744 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2747 tmp_libs
="$tmp_libs $deplib"
2749 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2750 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2757 # Get the name of the library we link against.
2759 for l
in $old_library $library_names; do
2762 if test -z "$linklib"; then
2763 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2767 # This library was specified with -dlopen.
2768 if test "$pass" = dlopen
; then
2769 if test -z "$libdir"; then
2770 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2773 if test -z "$dlname" ||
2774 test "$dlopen_support" != yes ||
2775 test "$build_libtool_libs" = no
; then
2776 # If there is no dlname, no dlopen support or we're linking
2777 # statically, we need to preload. We also need to preload any
2778 # dependent libraries so libltdl's deplib preloader doesn't
2779 # bomb out in the load deplibs phase.
2780 dlprefiles
="$dlprefiles $lib $dependency_libs"
2782 newdlfiles
="$newdlfiles $lib"
2787 # We need an absolute path.
2789 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2791 abs_ladir
=`cd "$ladir" && pwd`
2792 if test -z "$abs_ladir"; then
2793 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2794 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2799 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2801 # Find the relevant object directory and library name.
2802 if test "X$installed" = Xyes
; then
2803 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2804 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2812 test "X$hardcode_automatic" = Xyes
&& avoidtemprpath
=yes
2814 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2817 # Remove this search path later
2818 notinst_path
="$notinst_path $abs_ladir"
2820 dir
="$ladir/$objdir"
2821 absdir
="$abs_ladir/$objdir"
2822 # Remove this search path later
2823 notinst_path
="$notinst_path $abs_ladir"
2825 fi # $installed = yes
2826 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2828 # This library was specified with -dlpreopen.
2829 if test "$pass" = dlpreopen
; then
2830 if test -z "$libdir"; then
2831 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2834 # Prefer using a static library (so that no silly _DYNAMIC symbols
2835 # are required to link).
2836 if test -n "$old_library"; then
2837 newdlprefiles
="$newdlprefiles $dir/$old_library"
2838 # Otherwise, use the dlname, so that lt_dlopen finds it.
2839 elif test -n "$dlname"; then
2840 newdlprefiles
="$newdlprefiles $dir/$dlname"
2842 newdlprefiles
="$newdlprefiles $dir/$linklib"
2844 fi # $pass = dlpreopen
2846 if test -z "$libdir"; then
2847 # Link the convenience library
2848 if test "$linkmode" = lib
; then
2849 deplibs
="$dir/$old_library $deplibs"
2850 elif test "$linkmode,$pass" = "prog,link"; then
2851 compile_deplibs
="$dir/$old_library $compile_deplibs"
2852 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2854 deplibs
="$lib $deplibs" # used for prog,scan pass
2860 if test "$linkmode" = prog
&& test "$pass" != link
; then
2861 newlib_search_path
="$newlib_search_path $ladir"
2862 deplibs
="$lib $deplibs"
2865 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2866 test "$build_libtool_libs" = no
; then
2871 for deplib
in $dependency_libs; do
2873 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2875 # Need to link against all dependency_libs?
2876 if test "$linkalldeplibs" = yes; then
2877 deplibs
="$deplib $deplibs"
2879 # Need to hardcode shared library paths
2880 # or/and link against static libraries
2881 newdependency_libs
="$deplib $newdependency_libs"
2883 if test "X$duplicate_deps" = "Xyes" ; then
2884 case "$tmp_libs " in
2885 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2888 tmp_libs
="$tmp_libs $deplib"
2891 fi # $linkmode = prog...
2893 if test "$linkmode,$pass" = "prog,link"; then
2894 if test -n "$library_names" &&
2895 { { test "$prefer_static_libs" = no ||
2896 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2897 test -z "$old_library"; }; then
2898 # We need to hardcode the library path
2899 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2900 # Make sure the rpath contains only unique directories.
2901 case "$temp_rpath " in
2904 *) temp_rpath
="$temp_rpath $absdir" ;;
2908 # Hardcode the library path.
2909 # Skip directories that are in the system default run-time
2911 case " $sys_lib_dlsearch_path " in
2914 case "$compile_rpath " in
2916 *) compile_rpath
="$compile_rpath $absdir"
2920 case " $sys_lib_dlsearch_path " in
2923 case "$finalize_rpath " in
2925 *) finalize_rpath
="$finalize_rpath $libdir"
2929 fi # $linkmode,$pass = prog,link...
2931 if test "$alldeplibs" = yes &&
2932 { test "$deplibs_check_method" = pass_all ||
2933 { test "$build_libtool_libs" = yes &&
2934 test -n "$library_names"; }; }; then
2935 # We only need to search for static libraries
2940 link_static
=no
# Whether the deplib will be linked statically
2941 use_static_libs
=$prefer_static_libs
2942 if test "$use_static_libs" = built
&& test "$installed" = yes ; then
2945 if test -n "$library_names" &&
2946 { test "$use_static_libs" = no ||
test -z "$old_library"; }; then
2947 if test "$installed" = no
; then
2948 notinst_deplibs
="$notinst_deplibs $lib"
2951 # This is a shared library
2953 # Warn about portability, can't link against -module's on
2954 # some systems (darwin)
2955 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2957 if test "$linkmode" = prog
; then
2958 $echo "*** Warning: Linking the executable $output against the loadable module"
2960 $echo "*** Warning: Linking the shared library $output against the loadable module"
2962 $echo "*** $linklib is not portable!"
2964 if test "$linkmode" = lib
&&
2965 test "$hardcode_into_libs" = yes; then
2966 # Hardcode the library path.
2967 # Skip directories that are in the system default run-time
2969 case " $sys_lib_dlsearch_path " in
2972 case "$compile_rpath " in
2974 *) compile_rpath
="$compile_rpath $absdir"
2978 case " $sys_lib_dlsearch_path " in
2981 case "$finalize_rpath " in
2983 *) finalize_rpath
="$finalize_rpath $libdir"
2989 if test -n "$old_archive_from_expsyms_cmds"; then
2990 # figure out the soname
2991 set dummy
$library_names
2994 libname
=`eval \\$echo \"$libname_spec\"`
2995 # use dlname if we got it. it's perfectly good, no?
2996 if test -n "$dlname"; then
2998 elif test -n "$soname_spec"; then
3002 major
=`expr $current - $age`
3006 eval soname
=\"$soname_spec\"
3011 # Make a new name for the extract_expsyms_cmds to use
3013 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
3014 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
3016 # If the library has no export list, then create one now
3017 if test -f "$output_objdir/$soname-def"; then :
3019 $show "extracting exported symbol list from \`$soname'"
3020 save_ifs
="$IFS"; IFS
='~'
3021 cmds
=$extract_expsyms_cmds
3022 for cmd
in $cmds; do
3026 $run eval "$cmd" ||
exit $?
3032 if test -f "$output_objdir/$newlib"; then :; else
3033 $show "generating import library for \`$soname'"
3034 save_ifs
="$IFS"; IFS
='~'
3035 cmds
=$old_archive_from_expsyms_cmds
3036 for cmd
in $cmds; do
3040 $run eval "$cmd" ||
exit $?
3044 # make sure the library variables are pointing to the new library
3047 fi # test -n "$old_archive_from_expsyms_cmds"
3049 if test "$linkmode" = prog ||
test "$mode" != relink
; then
3054 case $hardcode_action in
3055 immediate | unsupported
)
3056 if test "$hardcode_direct" = no
; then
3059 *-*-sco3.2v5.0.
[024]*) add_dir
="-L$dir" ;;
3060 *-*-sysv4*uw2
*) add_dir
="-L$dir" ;;
3061 *-*-sysv5OpenUNIX* |
*-*-sysv5UnixWare7.
[01].
[10]* | \
3062 *-*-unixware7*) add_dir
="-L$dir" ;;
3064 # if the lib is a module then we can not link against
3065 # it, someone is ignoring the new warnings I added
3066 if /usr
/bin
/file -L $add 2> /dev
/null |
3067 $EGREP ": [^:]* bundle" >/dev
/null
; then
3068 $echo "** Warning, lib $linklib is a module, not a shared library"
3069 if test -z "$old_library" ; then
3071 $echo "** And there doesn't seem to be a static archive available"
3072 $echo "** The link will probably fail, sorry"
3074 add
="$dir/$old_library"
3078 elif test "$hardcode_minus_L" = no
; then
3080 *-*-sunos*) add_shlibpath
="$dir" ;;
3084 elif test "$hardcode_shlibpath_var" = no
; then
3085 add_shlibpath
="$dir"
3092 if test "$hardcode_direct" = yes; then
3094 elif test "$hardcode_minus_L" = yes; then
3096 # Try looking first in the location we're being installed to.
3097 if test -n "$inst_prefix_dir"; then
3100 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3105 elif test "$hardcode_shlibpath_var" = yes; then
3106 add_shlibpath
="$dir"
3115 if test "$lib_linked" != yes; then
3116 $echo "$modename: configuration error: unsupported hardcode properties"
3120 if test -n "$add_shlibpath"; then
3121 case :$compile_shlibpath: in
3122 *":$add_shlibpath:"*) ;;
3123 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
3126 if test "$linkmode" = prog
; then
3127 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
3128 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
3130 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3131 test -n "$add" && deplibs
="$add $deplibs"
3132 if test "$hardcode_direct" != yes && \
3133 test "$hardcode_minus_L" != yes && \
3134 test "$hardcode_shlibpath_var" = yes; then
3135 case :$finalize_shlibpath: in
3137 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3143 if test "$linkmode" = prog ||
test "$mode" = relink
; then
3147 # Finalize command for both is simple: just hardcode it.
3148 if test "$hardcode_direct" = yes; then
3149 add
="$libdir/$linklib"
3150 elif test "$hardcode_minus_L" = yes; then
3153 elif test "$hardcode_shlibpath_var" = yes; then
3154 case :$finalize_shlibpath: in
3156 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3159 elif test "$hardcode_automatic" = yes; then
3160 if test -n "$inst_prefix_dir" &&
3161 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3162 add
="$inst_prefix_dir$libdir/$linklib"
3164 add
="$libdir/$linklib"
3167 # We cannot seem to hardcode it, guess we'll fake it.
3169 # Try looking first in the location we're being installed to.
3170 if test -n "$inst_prefix_dir"; then
3173 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3180 if test "$linkmode" = prog
; then
3181 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
3182 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
3184 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3185 test -n "$add" && deplibs
="$add $deplibs"
3188 elif test "$linkmode" = prog
; then
3189 # Here we assume that one of hardcode_direct or hardcode_minus_L
3190 # is not unsupported. This is valid on all known static and
3192 if test "$hardcode_direct" != unsupported
; then
3193 test -n "$old_library" && linklib
="$old_library"
3194 compile_deplibs
="$dir/$linklib $compile_deplibs"
3195 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3197 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3198 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3200 elif test "$build_libtool_libs" = yes; then
3201 # Not a shared library
3202 if test "$deplibs_check_method" != pass_all
; then
3203 # We're trying link a shared library against a static one
3204 # but the system doesn't support it.
3206 # Just print a warning and add the library to dependency_libs so
3207 # that the program can be linked against the static library.
3209 $echo "*** Warning: This system can not link to static lib archive $lib."
3210 $echo "*** I have the capability to make that library automatically link in when"
3211 $echo "*** you link to this library. But I can only do this if you have a"
3212 $echo "*** shared version of the library, which you do not appear to have."
3213 if test "$module" = yes; then
3214 $echo "*** But as you try to build a module library, libtool will still create "
3215 $echo "*** a static module, that should work as long as the dlopening application"
3216 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3217 if test -z "$global_symbol_pipe"; then
3219 $echo "*** However, this would only work if libtool was able to extract symbol"
3220 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3221 $echo "*** not find such a program. So, this module is probably useless."
3222 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3224 if test "$build_old_libs" = no
; then
3225 build_libtool_libs
=module
3228 build_libtool_libs
=no
3232 deplibs
="$dir/$old_library $deplibs"
3235 fi # link shared/static library?
3237 if test "$linkmode" = lib
; then
3238 if test -n "$dependency_libs" &&
3239 { test "$hardcode_into_libs" != yes ||
3240 test "$build_old_libs" = yes ||
3241 test "$link_static" = yes; }; then
3242 # Extract -R from dependency_libs
3244 for libdir
in $dependency_libs; do
3246 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3248 *" $temp_xrpath "*) ;;
3249 *) xrpath
="$xrpath $temp_xrpath";;
3251 *) temp_deplibs
="$temp_deplibs $libdir";;
3254 dependency_libs
="$temp_deplibs"
3257 newlib_search_path
="$newlib_search_path $absdir"
3258 # Link against this library
3259 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3260 # ... and its dependency_libs
3262 for deplib
in $dependency_libs; do
3263 newdependency_libs
="$deplib $newdependency_libs"
3264 if test "X$duplicate_deps" = "Xyes" ; then
3265 case "$tmp_libs " in
3266 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3269 tmp_libs
="$tmp_libs $deplib"
3272 if test "$link_all_deplibs" != no
; then
3273 # Add the search paths of all dependency libraries
3274 for deplib
in $dependency_libs; do
3276 -L*) path
="$deplib" ;;
3278 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3279 test "X$dir" = "X$deplib" && dir
="."
3280 # We need an absolute path.
3282 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3284 absdir
=`cd "$dir" && pwd`
3285 if test -z "$absdir"; then
3286 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3291 if grep "^installed=no" $deplib > /dev
/null
; then
3292 path
="$absdir/$objdir"
3294 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3295 if test -z "$libdir"; then
3296 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3299 if test "$absdir" != "$libdir"; then
3300 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3307 # we do not want to link against static libs,
3308 # but need to link against shared
3309 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3310 if test -n "$deplibrary_names" ; then
3311 for tmp
in $deplibrary_names ; do
3314 if test -f "$path/$depdepl" ; then
3315 depdepl
="$path/$depdepl"
3317 # do not add paths which are already there
3318 case " $newlib_search_path " in
3320 *) newlib_search_path
="$newlib_search_path $path";;
3333 # Again, we only want to link against shared libraries
3334 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3335 for tmp
in $newlib_search_path ; do
3336 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3337 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3348 case " $deplibs " in
3350 *) deplibs
="$path $deplibs" ;;
3352 case " $deplibs " in
3354 *) deplibs
="$depdepl $deplibs" ;;
3357 fi # link_all_deplibs != no
3359 done # for deplib in $libs
3360 dependency_libs
="$newdependency_libs"
3361 if test "$pass" = dlpreopen
; then
3362 # Link the dlpreopened libraries before other libraries
3363 for deplib
in $save_deplibs; do
3364 deplibs
="$deplib $deplibs"
3367 if test "$pass" != dlopen
; then
3368 if test "$pass" != conv
; then
3369 # Make sure lib_search_path contains only unique directories.
3371 for dir
in $newlib_search_path; do
3372 case "$lib_search_path " in
3374 *) lib_search_path
="$lib_search_path $dir" ;;
3380 if test "$linkmode,$pass" != "prog,link"; then
3383 vars
="compile_deplibs finalize_deplibs"
3385 for var
in $vars dependency_libs
; do
3386 # Add libraries to $var in reverse order
3387 eval tmp_libs
=\"\$
$var\"
3389 for deplib
in $tmp_libs; do
3390 # FIXME: Pedantically, this is the right thing to do, so
3391 # that some nasty dependency loop isn't accidentally
3393 #new_libs="$deplib $new_libs"
3394 # Pragmatically, this seems to cause very few problems in
3397 -L*) new_libs
="$deplib $new_libs" ;;
3400 # And here is the reason: when a library appears more
3401 # than once as an explicit dependence of a library, or
3402 # is implicitly linked in more than once by the
3403 # compiler, it is considered special, and multiple
3404 # occurrences thereof are not removed. Compare this
3405 # with having the same library being listed as a
3406 # dependency of multiple other libraries: in this case,
3407 # we know (pedantically, we assume) the library does not
3408 # need to be listed more than once, so we keep only the
3409 # last copy. This is not always right, but it is rare
3410 # enough that we require users that really mean to play
3411 # such unportable linking tricks to link the library
3412 # using -Wl,-lname, so that libtool does not consider it
3413 # for duplicate removal.
3414 case " $specialdeplibs " in
3415 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3417 case " $new_libs " in
3419 *) new_libs
="$deplib $new_libs" ;;
3427 for deplib
in $new_libs; do
3430 case " $tmp_libs " in
3432 *) tmp_libs
="$tmp_libs $deplib" ;;
3435 *) tmp_libs
="$tmp_libs $deplib" ;;
3438 eval $var=\"$tmp_libs\"
3441 # Last step: remove runtime libs from dependency_libs
3442 # (they stay in deplibs)
3444 for i
in $dependency_libs ; do
3445 case " $predeps $postdeps $compiler_lib_search_path " in
3450 if test -n "$i" ; then
3451 tmp_libs
="$tmp_libs $i"
3454 dependency_libs
=$tmp_libs
3456 if test "$linkmode" = prog
; then
3457 dlfiles
="$newdlfiles"
3458 dlprefiles
="$newdlprefiles"
3463 if test -n "$deplibs"; then
3464 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3467 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3468 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3471 if test -n "$rpath"; then
3472 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3475 if test -n "$xrpath"; then
3476 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3479 if test -n "$vinfo"; then
3480 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3483 if test -n "$release"; then
3484 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3487 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3488 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3491 # Now set the variables for building old libraries.
3492 build_libtool_libs
=no
3494 objs
="$objs$old_deplibs"
3498 # Make sure we only generate libraries of the form `libNAME.la'.
3501 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3502 eval shared_ext
=\"$shrext_cmds\"
3503 eval libname
=\"$libname_spec\"
3506 if test "$module" = no
; then
3507 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3511 if test "$need_lib_prefix" != no
; then
3512 # Add the "lib" prefix for modules if required
3513 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3514 eval shared_ext
=\"$shrext_cmds\"
3515 eval libname
=\"$libname_spec\"
3517 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3522 if test -n "$objs"; then
3523 if test "$deplibs_check_method" != pass_all
; then
3524 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3528 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3529 $echo "*** objects $objs is not portable!"
3530 libobjs
="$libobjs $objs"
3534 if test "$dlself" != no
; then
3535 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3539 if test "$#" -gt 2; then
3540 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3545 if test -z "$rpath"; then
3546 if test "$build_libtool_libs" = yes; then
3547 # Building a libtool convenience library.
3548 # Some compilers have problems with a `.al' extension so
3549 # convenience libraries should have the same extension an
3550 # archive normally would.
3551 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3552 build_libtool_libs
=convenience
3556 if test -n "$vinfo"; then
3557 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3560 if test -n "$release"; then
3561 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3565 # Parse the version information argument.
3566 save_ifs
="$IFS"; IFS
=':'
3567 set dummy
$vinfo 0 0 0
3570 if test -n "$8"; then
3571 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3576 # convert absolute version numbers to libtool ages
3577 # this retains compatibility with .la files and attempts
3578 # to make the code below a bit more comprehensible
3580 case $vinfo_number in
3584 number_revision
="$4"
3586 # There are really only two kinds -- those that
3587 # use the current revision as the major version
3588 # and those that subtract age and use age as
3589 # a minor version. But, then there is irix
3590 # which has an extra 1 added just for fun
3592 case $version_type in
3593 darwin|linux|osf|windows|none
)
3594 current
=`expr $number_major + $number_minor`
3596 revision
="$number_revision"
3598 freebsd-aout|freebsd-elf|sunos
)
3599 current
="$number_major"
3600 revision
="$number_minor"
3604 current
=`expr $number_major + $number_minor`
3606 revision
="$number_minor"
3607 lt_irix_increment
=no
3618 # Check that each of the things are valid numbers.
3620 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]) ;;
3622 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3623 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3629 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]) ;;
3631 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3632 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3638 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]) ;;
3640 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3641 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3646 if test "$age" -gt "$current"; then
3647 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3648 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3652 # Calculate the version variables.
3656 case $version_type in
3660 # Like Linux, but with the current version available in
3661 # verstring for coding it into the library header
3662 major
=.
`expr $current - $age`
3663 versuffix
="$major.$age.$revision"
3664 # Darwin ld doesn't like 0 for these options...
3665 minor_current
=`expr $current + 1`
3666 xlcverstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3667 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
3672 versuffix
=".$current.$revision";
3677 versuffix
=".$current";
3681 if test "X$lt_irix_increment" = "Xno"; then
3682 major
=`expr $current - $age`
3684 major
=`expr $current - $age + 1`
3686 case $version_type in
3687 nonstopux
) verstring_prefix
=nonstopux
;;
3688 *) verstring_prefix
=sgi
;;
3690 verstring
="$verstring_prefix$major.$revision"
3692 # Add in all the interfaces that we are compatible with.
3694 while test "$loop" -ne 0; do
3695 iface
=`expr $revision - $loop`
3696 loop
=`expr $loop - 1`
3697 verstring
="$verstring_prefix$major.$iface:$verstring"
3700 # Before this point, $major must not contain `.'.
3702 versuffix
="$major.$revision"
3706 major
=.
`expr $current - $age`
3707 versuffix
="$major.$age.$revision"
3711 major
=.
`expr $current - $age`
3712 versuffix
=".$current.$age.$revision"
3713 verstring
="$current.$age.$revision"
3715 # Add in all the interfaces that we are compatible with.
3717 while test "$loop" -ne 0; do
3718 iface
=`expr $current - $loop`
3719 loop
=`expr $loop - 1`
3720 verstring
="$verstring:${iface}.0"
3723 # Make executables depend on our current version.
3724 verstring
="$verstring:${current}.0"
3729 versuffix
=".$current.$revision"
3733 # Use '-' rather than '.', since we only want one
3734 # extension on DOS 8.3 filesystems.
3735 major
=`expr $current - $age`
3740 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3741 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3746 # Clear the version info if we defaulted, and they specified a release.
3747 if test -z "$vinfo" && test -n "$release"; then
3749 case $version_type in
3751 # we can't check for "0.0" in archive_cmds due to quoting
3752 # problems, so we reset it completely
3759 if test "$need_version" = no
; then
3766 # Remove version info from name if versioning should be avoided
3767 if test "$avoid_version" = yes && test "$need_version" = no
; then
3773 # Check to see if the archive will have undefined symbols.
3774 if test "$allow_undefined" = yes; then
3775 if test "$allow_undefined_flag" = unsupported
; then
3776 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3777 build_libtool_libs
=no
3781 # Don't allow undefined symbols.
3782 allow_undefined_flag
="$no_undefined_flag"
3786 if test "$mode" != relink
; then
3787 # Remove our outputs, but don't remove object files since they
3788 # may have been created when compiling PIC objects.
3790 tempremovelist
=`$echo "$output_objdir/*"`
3791 for p
in $tempremovelist; do
3795 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3796 if test "X$precious_files_regex" != "X"; then
3797 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3802 removelist
="$removelist $p"
3807 if test -n "$removelist"; then
3808 $show "${rm}r $removelist"
3809 $run ${rm}r
$removelist
3813 # Now set the variables for building old libraries.
3814 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3815 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3817 # Transform .lo files to .o files.
3818 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3821 # Eliminate all temporary directories.
3822 #for path in $notinst_path; do
3823 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3824 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3825 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3828 if test -n "$xrpath"; then
3829 # If the user specified any rpath flags, then add them.
3831 for libdir
in $xrpath; do
3832 temp_xrpath
="$temp_xrpath -R$libdir"
3833 case "$finalize_rpath " in
3835 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3838 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3839 dependency_libs
="$temp_xrpath $dependency_libs"
3843 # Make sure dlfiles contains only unique files that won't be dlpreopened
3844 old_dlfiles
="$dlfiles"
3846 for lib
in $old_dlfiles; do
3847 case " $dlprefiles $dlfiles " in
3849 *) dlfiles
="$dlfiles $lib" ;;
3853 # Make sure dlprefiles contains only unique files
3854 old_dlprefiles
="$dlprefiles"
3856 for lib
in $old_dlprefiles; do
3857 case "$dlprefiles " in
3859 *) dlprefiles
="$dlprefiles $lib" ;;
3863 if test "$build_libtool_libs" = yes; then
3864 if test -n "$rpath"; then
3866 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3867 # these systems don't actually have a c library (as such)!
3869 *-*-rhapsody* |
*-*-darwin1.
[012])
3870 # Rhapsody C library is in the System framework
3871 deplibs
="$deplibs -framework System"
3874 # Don't link with libc until the a.out ld.so is fixed.
3876 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
3877 # Do not include libc due to us having libc/libc_r.
3879 *-*-sco3.2v5
* |
*-*-sco5v6*)
3880 # Causes problems with __ctype
3882 *-*-sysv4.2uw2
* |
*-*-sysv5* |
*-*-unixware* |
*-*-OpenUNIX*)
3883 # Compiler inserts libc in the correct place for threads to work
3886 # Add libc to deplibs on all other systems if necessary.
3887 if test "$build_libtool_need_lc" = "yes"; then
3888 deplibs
="$deplibs -lc"
3894 # Transform deplibs into only deplibs that can be linked in shared.
3896 libname_save
=$libname
3897 release_save
=$release
3898 versuffix_save
=$versuffix
3900 # I'm not sure if I'm treating the release correctly. I think
3901 # release should show up in the -l (ie -lgmp5) so we don't want to
3902 # add it in twice. Is that correct?
3908 case $deplibs_check_method in
3910 # Don't check for shared/static. Everything works.
3911 # This might be a little naive. We might want to check
3912 # whether the library exists or not. But this is on
3913 # osf3 & osf4 and I'm not really sure... Just
3914 # implementing what was already the behavior.
3918 # This code stresses the "libraries are programs" paradigm to its
3919 # limits. Maybe even breaks it. We compile a program, linking it
3920 # against the deplibs as a proxy for the library. Then we can check
3921 # whether they linked in statically or dynamically with ldd.
3923 cat > conftest.c
<<EOF
3924 int main() { return 0; }
3927 if $LTCC $LTCFLAGS -o conftest conftest.c
$deplibs; then
3928 ldd_output
=`ldd conftest`
3929 for i
in $deplibs; do
3930 name
=`expr $i : '-l\(.*\)'`
3931 # If $name is empty we are operating on a -L argument.
3932 if test "$name" != "" && test "$name" != "0"; then
3933 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3934 case " $predeps $postdeps " in
3936 newdeplibs
="$newdeplibs $i"
3941 if test -n "$i" ; then
3942 libname
=`eval \\$echo \"$libname_spec\"`
3943 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3944 set dummy
$deplib_matches
3946 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3947 newdeplibs
="$newdeplibs $i"
3951 $echo "*** Warning: dynamic linker does not accept needed library $i."
3952 $echo "*** I have the capability to make that library automatically link in when"
3953 $echo "*** you link to this library. But I can only do this if you have a"
3954 $echo "*** shared version of the library, which I believe you do not have"
3955 $echo "*** because a test_compile did reveal that the linker did not use it for"
3956 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3960 newdeplibs
="$newdeplibs $i"
3964 # Error occurred in the first compile. Let's try to salvage
3965 # the situation: Compile a separate program for each library.
3966 for i
in $deplibs; do
3967 name
=`expr $i : '-l\(.*\)'`
3968 # If $name is empty we are operating on a -L argument.
3969 if test "$name" != "" && test "$name" != "0"; then
3971 if $LTCC $LTCFLAGS -o conftest conftest.c
$i; then
3972 ldd_output
=`ldd conftest`
3973 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3974 case " $predeps $postdeps " in
3976 newdeplibs
="$newdeplibs $i"
3981 if test -n "$i" ; then
3982 libname
=`eval \\$echo \"$libname_spec\"`
3983 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3984 set dummy
$deplib_matches
3986 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3987 newdeplibs
="$newdeplibs $i"
3991 $echo "*** Warning: dynamic linker does not accept needed library $i."
3992 $echo "*** I have the capability to make that library automatically link in when"
3993 $echo "*** you link to this library. But I can only do this if you have a"
3994 $echo "*** shared version of the library, which you do not appear to have"
3995 $echo "*** because a test_compile did reveal that the linker did not use this one"
3996 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
4002 $echo "*** Warning! Library $i is needed by this library but I was not able to"
4003 $echo "*** make it link in! You will probably need to install it or some"
4004 $echo "*** library that it depends on before this library will be fully"
4005 $echo "*** functional. Installing it before continuing would be even better."
4008 newdeplibs
="$newdeplibs $i"
4014 set dummy
$deplibs_check_method
4015 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4016 for a_deplib
in $deplibs; do
4017 name
=`expr $a_deplib : '-l\(.*\)'`
4018 # If $name is empty we are operating on a -L argument.
4019 if test "$name" != "" && test "$name" != "0"; then
4020 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4021 case " $predeps $postdeps " in
4023 newdeplibs
="$newdeplibs $a_deplib"
4028 if test -n "$a_deplib" ; then
4029 libname
=`eval \\$echo \"$libname_spec\"`
4030 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4031 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
4032 for potent_lib
in $potential_libs; do
4033 # Follow soft links.
4034 if ls -lLd "$potent_lib" 2>/dev
/null \
4035 |
grep " -> " >/dev
/null
; then
4038 # The statement above tries to avoid entering an
4039 # endless loop below, in case of cyclic links.
4040 # We might still enter an endless loop, since a link
4041 # loop can be closed while we follow links,
4043 potlib
="$potent_lib"
4044 while test -h "$potlib" 2>/dev
/null
; do
4045 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
4047 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
4048 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4051 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
4053 |
$EGREP "$file_magic_regex" > /dev
/null
; then
4054 newdeplibs
="$newdeplibs $a_deplib"
4061 if test -n "$a_deplib" ; then
4064 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4065 $echo "*** I have the capability to make that library automatically link in when"
4066 $echo "*** you link to this library. But I can only do this if you have a"
4067 $echo "*** shared version of the library, which you do not appear to have"
4068 $echo "*** because I did check the linker path looking for a file starting"
4069 if test -z "$potlib" ; then
4070 $echo "*** with $libname but no candidates were found. (...for file magic test)"
4072 $echo "*** with $libname and none of the candidates passed a file format test"
4073 $echo "*** using a file magic. Last file checked: $potlib"
4077 # Add a -L argument.
4078 newdeplibs
="$newdeplibs $a_deplib"
4080 done # Gone through all deplibs.
4083 set dummy
$deplibs_check_method
4084 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4085 for a_deplib
in $deplibs; do
4086 name
=`expr $a_deplib : '-l\(.*\)'`
4087 # If $name is empty we are operating on a -L argument.
4088 if test -n "$name" && test "$name" != "0"; then
4089 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4090 case " $predeps $postdeps " in
4092 newdeplibs
="$newdeplibs $a_deplib"
4097 if test -n "$a_deplib" ; then
4098 libname
=`eval \\$echo \"$libname_spec\"`
4099 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4100 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
4101 for potent_lib
in $potential_libs; do
4102 potlib
="$potent_lib" # see symlink-check above in file_magic test
4103 if eval $echo \"$potent_lib\" 2>/dev
/null \
4105 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
4106 newdeplibs
="$newdeplibs $a_deplib"
4113 if test -n "$a_deplib" ; then
4116 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4117 $echo "*** I have the capability to make that library automatically link in when"
4118 $echo "*** you link to this library. But I can only do this if you have a"
4119 $echo "*** shared version of the library, which you do not appear to have"
4120 $echo "*** because I did check the linker path looking for a file starting"
4121 if test -z "$potlib" ; then
4122 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4124 $echo "*** with $libname and none of the candidates passed a file format test"
4125 $echo "*** using a regex pattern. Last file checked: $potlib"
4129 # Add a -L argument.
4130 newdeplibs
="$newdeplibs $a_deplib"
4132 done # Gone through all deplibs.
4136 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4137 -e 's/ -[LR][^ ]*//g'`
4138 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4139 for i
in $predeps $postdeps ; do
4140 # can't use Xsed below, because $i might contain '/'
4141 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4144 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
4145 |
grep .
>/dev
/null
; then
4147 if test "X$deplibs_check_method" = "Xnone"; then
4148 $echo "*** Warning: inter-library dependencies are not supported in this platform."
4150 $echo "*** Warning: inter-library dependencies are not known to be supported."
4152 $echo "*** All declared inter-library dependencies are being dropped."
4157 versuffix
=$versuffix_save
4159 release
=$release_save
4160 libname
=$libname_save
4164 *-*-rhapsody* |
*-*-darwin1.
[012])
4165 # On Rhapsody replace the C library is the System framework
4166 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4170 if test "$droppeddeps" = yes; then
4171 if test "$module" = yes; then
4173 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4174 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4175 $echo "*** a static module, that should work as long as the dlopening"
4176 $echo "*** application is linked with the -dlopen flag."
4177 if test -z "$global_symbol_pipe"; then
4179 $echo "*** However, this would only work if libtool was able to extract symbol"
4180 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4181 $echo "*** not find such a program. So, this module is probably useless."
4182 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4184 if test "$build_old_libs" = no
; then
4185 oldlibs
="$output_objdir/$libname.$libext"
4186 build_libtool_libs
=module
4189 build_libtool_libs
=no
4192 $echo "*** The inter-library dependencies that have been dropped here will be"
4193 $echo "*** automatically added whenever a program is linked with this library"
4194 $echo "*** or is declared to -dlopen it."
4196 if test "$allow_undefined" = no
; then
4198 $echo "*** Since this library must not contain undefined symbols,"
4199 $echo "*** because either the platform does not support them or"
4200 $echo "*** it was explicitly requested with -no-undefined,"
4201 $echo "*** libtool will only create a static version of it."
4202 if test "$build_old_libs" = no
; then
4203 oldlibs
="$output_objdir/$libname.$libext"
4204 build_libtool_libs
=module
4207 build_libtool_libs
=no
4212 # Done checking deplibs!
4217 # move library search paths that coincide with paths to not yet
4218 # installed libraries to the beginning of the library search list
4220 for path
in $notinst_path; do
4221 case " $new_libs " in
4222 *" -L$path/$objdir "*) ;;
4224 case " $deplibs " in
4225 *" -L$path/$objdir "*)
4226 new_libs
="$new_libs -L$path/$objdir" ;;
4231 for deplib
in $deplibs; do
4234 case " $new_libs " in
4236 *) new_libs
="$new_libs $deplib" ;;
4239 *) new_libs
="$new_libs $deplib" ;;
4245 # All the library-specific variables (install_libdir is set above).
4250 # Test again, we may have decided not to build it any more
4251 if test "$build_libtool_libs" = yes; then
4252 if test "$hardcode_into_libs" = yes; then
4253 # Hardcode the library paths
4256 rpath
="$finalize_rpath"
4257 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4258 for libdir
in $rpath; do
4259 if test -n "$hardcode_libdir_flag_spec"; then
4260 if test -n "$hardcode_libdir_separator"; then
4261 if test -z "$hardcode_libdirs"; then
4262 hardcode_libdirs
="$libdir"
4264 # Just accumulate the unique libdirs.
4265 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4266 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4269 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4274 eval flag
=\"$hardcode_libdir_flag_spec\"
4275 dep_rpath
="$dep_rpath $flag"
4277 elif test -n "$runpath_var"; then
4278 case "$perm_rpath " in
4280 *) perm_rpath
="$perm_rpath $libdir" ;;
4284 # Substitute the hardcoded libdirs into the rpath.
4285 if test -n "$hardcode_libdir_separator" &&
4286 test -n "$hardcode_libdirs"; then
4287 libdir
="$hardcode_libdirs"
4288 if test -n "$hardcode_libdir_flag_spec_ld"; then
4289 case $archive_cmds in
4290 *\
$LD*) eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\" ;;
4291 *) eval dep_rpath
=\"$hardcode_libdir_flag_spec\" ;;
4294 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4297 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4298 # We should set the runpath_var.
4300 for dir
in $perm_rpath; do
4303 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4305 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4308 shlibpath
="$finalize_shlibpath"
4309 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4310 if test -n "$shlibpath"; then
4311 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4314 # Get the real and link names of the library.
4315 eval shared_ext
=\"$shrext_cmds\"
4316 eval library_names
=\"$library_names_spec\"
4317 set dummy
$library_names
4321 if test -n "$soname_spec"; then
4322 eval soname
=\"$soname_spec\"
4326 if test -z "$dlname"; then
4330 lib
="$output_objdir/$realname"
4334 linknames
="$linknames $link"
4337 # Use standard objects if they are pic
4338 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4340 # Prepare the list of exported symbols
4341 if test -z "$export_symbols"; then
4342 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4343 $show "generating symbol list for \`$libname.la'"
4344 export_symbols
="$output_objdir/$libname.exp"
4345 $run $rm $export_symbols
4346 cmds
=$export_symbols_cmds
4347 save_ifs
="$IFS"; IFS
='~'
4348 for cmd
in $cmds; do
4351 if len
=`expr "X$cmd" : ".*"` &&
4352 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4354 $run eval "$cmd" ||
exit $?
4355 skipped_export
=false
4357 # The command line is too long to execute in one step.
4358 $show "using reloadable object file for export list..."
4360 # Break out early, otherwise skipped_export may be
4361 # set to false by a later but shorter cmd.
4366 if test -n "$export_symbols_regex"; then
4367 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4368 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4369 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4370 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4375 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4376 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4380 for test_deplib
in $deplibs; do
4381 case " $convenience " in
4382 *" $test_deplib "*) ;;
4384 tmp_deplibs
="$tmp_deplibs $test_deplib"
4388 deplibs
="$tmp_deplibs"
4390 if test -n "$convenience"; then
4391 if test -n "$whole_archive_flag_spec"; then
4392 save_libobjs
=$libobjs
4393 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4395 gentop
="$output_objdir/${outputname}x"
4396 generated
="$generated $gentop"
4398 func_extract_archives
$gentop $convenience
4399 libobjs
="$libobjs $func_extract_archives_result"
4403 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4404 eval flag
=\"$thread_safe_flag_spec\"
4405 linker_flags
="$linker_flags $flag"
4408 # Make a backup of the uninstalled library when relinking
4409 if test "$mode" = relink
; then
4410 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4413 # Do each of the archive commands.
4414 if test "$module" = yes && test -n "$module_cmds" ; then
4415 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4416 eval test_cmds
=\"$module_expsym_cmds\"
4417 cmds
=$module_expsym_cmds
4419 eval test_cmds
=\"$module_cmds\"
4423 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4424 eval test_cmds
=\"$archive_expsym_cmds\"
4425 cmds
=$archive_expsym_cmds
4427 eval test_cmds
=\"$archive_cmds\"
4432 if test "X$skipped_export" != "X:" &&
4433 len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4434 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4437 # The command line is too long to link in one step, link piecewise.
4438 $echo "creating reloadable object files..."
4440 # Save the value of $output and $libobjs because we want to
4441 # use them later. If we have whole_archive_flag_spec, we
4442 # want to use save_libobjs as it was before
4443 # whole_archive_flag_spec was expanded, because we can't
4444 # assume the linker understands whole_archive_flag_spec.
4445 # This may have to be revisited, in case too many
4446 # convenience libraries get linked in and end up exceeding
4448 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4449 save_libobjs
=$libobjs
4452 output_la
=`$echo "X$output" | $Xsed -e "$basename"`
4454 # Clear the reloadable object creation command queue and
4455 # initialize k to one.
4462 output
=$output_objdir/$output_la-${k}.
$objext
4463 # Loop over the list of objects to be linked.
4464 for obj
in $save_libobjs
4466 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4467 if test "X$objlist" = X ||
4468 { len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4469 test "$len" -le "$max_cmd_len"; }; then
4470 objlist
="$objlist $obj"
4472 # The command $test_cmds is almost too long, add a
4473 # command to the queue.
4474 if test "$k" -eq 1 ; then
4475 # The first file doesn't have a previous command to add.
4476 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4478 # All subsequent reloadable object files will link in
4479 # the last one created.
4480 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4482 last_robj
=$output_objdir/$output_la-${k}.
$objext
4484 output
=$output_objdir/$output_la-${k}.
$objext
4489 # Handle the remaining objects by creating one last
4490 # reloadable object file. All subsequent reloadable object
4491 # files will link in the last one created.
4492 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4493 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4495 if ${skipped_export-false}; then
4496 $show "generating symbol list for \`$libname.la'"
4497 export_symbols
="$output_objdir/$libname.exp"
4498 $run $rm $export_symbols
4500 # Append the command to create the export file.
4501 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4504 # Set up a command to remove the reloadable object files
4505 # after they are used.
4507 while test "$i" -lt "$k"
4510 delfiles
="$delfiles $output_objdir/$output_la-${i}.$objext"
4513 $echo "creating a temporary reloadable object file: $output"
4515 # Loop through the commands generated above and execute them.
4516 save_ifs
="$IFS"; IFS
='~'
4517 for cmd
in $concat_cmds; do
4520 $run eval "$cmd" ||
exit $?
4525 # Restore the value of output.
4528 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4529 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4531 # Expand the library linking commands again to reset the
4532 # value of $libobjs for piecewise linking.
4534 # Do each of the archive commands.
4535 if test "$module" = yes && test -n "$module_cmds" ; then
4536 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4537 cmds
=$module_expsym_cmds
4542 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4543 cmds
=$archive_expsym_cmds
4549 # Append the command to remove the reloadable object files
4550 # to the just-reset $cmds.
4551 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4553 save_ifs
="$IFS"; IFS
='~'
4554 for cmd
in $cmds; do
4558 $run eval "$cmd" ||
{
4561 # Restore the uninstalled library and exit
4562 if test "$mode" = relink
; then
4563 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4571 # Restore the uninstalled library and exit
4572 if test "$mode" = relink
; then
4573 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4575 if test -n "$convenience"; then
4576 if test -z "$whole_archive_flag_spec"; then
4577 $show "${rm}r $gentop"
4578 $run ${rm}r
"$gentop"
4585 # Create links to the real library.
4586 for linkname
in $linknames; do
4587 if test "$realname" != "$linkname"; then
4588 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4589 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4593 # If -module or -export-dynamic was specified, set the dlname.
4594 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4595 # On all known operating systems, these are identical.
4602 if test -n "$deplibs"; then
4603 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4606 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4607 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4610 if test -n "$rpath"; then
4611 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4614 if test -n "$xrpath"; then
4615 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4618 if test -n "$vinfo"; then
4619 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4622 if test -n "$release"; then
4623 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4628 if test -n "$objs$old_deplibs"; then
4629 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4633 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4641 # Delete the old objects.
4642 $run $rm $obj $libobj
4644 # Objects from convenience libraries. This assumes
4645 # single-version convenience libraries. Whenever we create
4646 # different ones for PIC/non-PIC, this we'll have to duplicate
4650 # reload_cmds runs $LD directly, so let us get rid of
4651 # -Wl from whole_archive_flag_spec and hope we can get by with
4652 # turning comma into space..
4655 if test -n "$convenience"; then
4656 if test -n "$whole_archive_flag_spec"; then
4657 eval tmp_whole_archive_flags
=\"$whole_archive_flag_spec\"
4658 reload_conv_objs
=$reload_objs\
`$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4660 gentop
="$output_objdir/${obj}x"
4661 generated
="$generated $gentop"
4663 func_extract_archives
$gentop $convenience
4664 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4668 # Create the old-style object.
4669 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
4673 save_ifs
="$IFS"; IFS
='~'
4674 for cmd
in $cmds; do
4678 $run eval "$cmd" ||
exit $?
4682 # Exit if we aren't doing a library object file.
4683 if test -z "$libobj"; then
4684 if test -n "$gentop"; then
4685 $show "${rm}r $gentop"
4692 if test "$build_libtool_libs" != yes; then
4693 if test -n "$gentop"; then
4694 $show "${rm}r $gentop"
4698 # Create an invalid libtool object if no PIC, so that we don't
4699 # accidentally link it into a program.
4700 # $show "echo timestamp > $libobj"
4701 # $run eval "echo timestamp > $libobj" || exit $?
4705 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4706 # Only do commands if we really have different PIC objects.
4707 reload_objs
="$libobjs $reload_conv_objs"
4710 save_ifs
="$IFS"; IFS
='~'
4711 for cmd
in $cmds; do
4715 $run eval "$cmd" ||
exit $?
4720 if test -n "$gentop"; then
4721 $show "${rm}r $gentop"
4730 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4732 if test -n "$vinfo"; then
4733 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4736 if test -n "$release"; then
4737 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4740 if test "$preload" = yes; then
4741 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4742 test "$dlopen_self_static" = unknown
; then
4743 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4748 *-*-rhapsody* |
*-*-darwin1.
[012])
4749 # On Rhapsody replace the C library is the System framework
4750 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4751 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4757 # Don't allow lazy linking, it breaks C++ global constructors
4758 if test "$tagname" = CXX
; then
4759 compile_command
="$compile_command ${wl}-bind_at_load"
4760 finalize_command
="$finalize_command ${wl}-bind_at_load"
4766 # move library search paths that coincide with paths to not yet
4767 # installed libraries to the beginning of the library search list
4769 for path
in $notinst_path; do
4770 case " $new_libs " in
4771 *" -L$path/$objdir "*) ;;
4773 case " $compile_deplibs " in
4774 *" -L$path/$objdir "*)
4775 new_libs
="$new_libs -L$path/$objdir" ;;
4780 for deplib
in $compile_deplibs; do
4783 case " $new_libs " in
4785 *) new_libs
="$new_libs $deplib" ;;
4788 *) new_libs
="$new_libs $deplib" ;;
4791 compile_deplibs
="$new_libs"
4794 compile_command
="$compile_command $compile_deplibs"
4795 finalize_command
="$finalize_command $finalize_deplibs"
4797 if test -n "$rpath$xrpath"; then
4798 # If the user specified any rpath flags, then add them.
4799 for libdir
in $rpath $xrpath; do
4800 # This is the magic to use -rpath.
4801 case "$finalize_rpath " in
4803 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4808 # Now hardcode the library paths
4811 for libdir
in $compile_rpath $finalize_rpath; do
4812 if test -n "$hardcode_libdir_flag_spec"; then
4813 if test -n "$hardcode_libdir_separator"; then
4814 if test -z "$hardcode_libdirs"; then
4815 hardcode_libdirs
="$libdir"
4817 # Just accumulate the unique libdirs.
4818 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4819 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4822 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4827 eval flag
=\"$hardcode_libdir_flag_spec\"
4828 rpath
="$rpath $flag"
4830 elif test -n "$runpath_var"; then
4831 case "$perm_rpath " in
4833 *) perm_rpath
="$perm_rpath $libdir" ;;
4837 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4838 testbindir
=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4839 case :$dllsearchpath: in
4841 *) dllsearchpath
="$dllsearchpath:$libdir";;
4843 case :$dllsearchpath: in
4844 *":$testbindir:"*) ;;
4845 *) dllsearchpath
="$dllsearchpath:$testbindir";;
4850 # Substitute the hardcoded libdirs into the rpath.
4851 if test -n "$hardcode_libdir_separator" &&
4852 test -n "$hardcode_libdirs"; then
4853 libdir
="$hardcode_libdirs"
4854 eval rpath
=\" $hardcode_libdir_flag_spec\"
4856 compile_rpath
="$rpath"
4860 for libdir
in $finalize_rpath; do
4861 if test -n "$hardcode_libdir_flag_spec"; then
4862 if test -n "$hardcode_libdir_separator"; then
4863 if test -z "$hardcode_libdirs"; then
4864 hardcode_libdirs
="$libdir"
4866 # Just accumulate the unique libdirs.
4867 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4868 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4871 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4876 eval flag
=\"$hardcode_libdir_flag_spec\"
4877 rpath
="$rpath $flag"
4879 elif test -n "$runpath_var"; then
4880 case "$finalize_perm_rpath " in
4882 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4886 # Substitute the hardcoded libdirs into the rpath.
4887 if test -n "$hardcode_libdir_separator" &&
4888 test -n "$hardcode_libdirs"; then
4889 libdir
="$hardcode_libdirs"
4890 eval rpath
=\" $hardcode_libdir_flag_spec\"
4892 finalize_rpath
="$rpath"
4894 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4895 # Transform all the library objects into standard objects.
4896 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4897 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4901 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4902 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4903 dlsyms
="${outputname}S.c"
4905 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4909 if test -n "$dlsyms"; then
4913 # Discover the nlist of each of the dlfiles.
4914 nlist
="$output_objdir/${outputname}.nm"
4916 $show "$rm $nlist ${nlist}S ${nlist}T"
4917 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4919 # Parse the name list into a source file.
4920 $show "creating $output_objdir/$dlsyms"
4922 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4923 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4924 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4930 /* Prevent the only kind of declaration conflicts we can make. */
4931 #define lt_preloaded_symbols some_other_symbol
4933 /* External symbol declarations for the compiler. */\
4936 if test "$dlself" = yes; then
4937 $show "generating symbol list for \`$output'"
4939 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4941 # Add our own program objects to the symbol list.
4942 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4943 for arg
in $progfiles; do
4944 $show "extracting global C symbols from \`$arg'"
4945 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4948 if test -n "$exclude_expsyms"; then
4949 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4950 $run eval '$mv "$nlist"T "$nlist"'
4953 if test -n "$export_symbols_regex"; then
4954 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4955 $run eval '$mv "$nlist"T "$nlist"'
4958 # Prepare the list of exported symbols
4959 if test -z "$export_symbols"; then
4960 export_symbols
="$output_objdir/$outputname.exp"
4961 $run $rm $export_symbols
4962 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4964 *cygwin
* |
*mingw
* )
4965 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4966 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4970 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4971 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4972 $run eval 'mv "$nlist"T "$nlist"'
4974 *cygwin
* |
*mingw
* )
4975 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4976 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4982 for arg
in $dlprefiles; do
4983 $show "extracting global C symbols from \`$arg'"
4984 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4985 $run eval '$echo ": $name " >> "$nlist"'
4986 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4989 if test -z "$run"; then
4990 # Make sure we have at least an empty file.
4991 test -f "$nlist" ||
: > "$nlist"
4993 if test -n "$exclude_expsyms"; then
4994 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4995 $mv "$nlist"T
"$nlist"
4998 # Try sorting and uniquifying the output.
4999 if grep -v "^: " < "$nlist" |
5000 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
5005 uniq > "$nlist"S
; then
5008 grep -v "^: " < "$nlist" > "$nlist"S
5011 if test -f "$nlist"S
; then
5012 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
5014 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
5017 $echo >> "$output_objdir/$dlsyms" "\
5019 #undef lt_preloaded_symbols
5021 #if defined (__STDC__) && __STDC__
5022 # define lt_ptr void *
5024 # define lt_ptr char *
5028 /* The mapping between symbol names and symbols. */
5032 *cygwin
* |
*mingw
* )
5033 $echo >> "$output_objdir/$dlsyms" "\
5034 /* DATA imports from DLLs on WIN32 can't be const, because
5035 runtime relocations are performed -- see ld's documentation
5041 $echo >> "$output_objdir/$dlsyms" "\
5048 $echo >> "$output_objdir/$dlsyms" "\
5052 lt_preloaded_symbols[] =
5056 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5058 $echo >> "$output_objdir/$dlsyms" "\
5062 /* This works around a problem in FreeBSD linker */
5063 #ifdef FREEBSD_WORKAROUND
5064 static const void *lt_preloaded_setup() {
5065 return lt_preloaded_symbols;
5075 pic_flag_for_symtable
=
5077 # compiling the symbol table file with pic_flag works around
5078 # a FreeBSD bug that causes programs to crash when -lm is
5079 # linked before any other PIC object. But we must not use
5080 # pic_flag when linking with -static. The problem exists in
5081 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5082 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
5083 case "$compile_command " in
5085 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
5088 case "$compile_command " in
5090 *) pic_flag_for_symtable
=" $pic_flag";;
5094 # Now compile the dynamic symbol file.
5095 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5096 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
5098 # Clean up the generated files.
5099 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5100 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5102 # Transform the symbol file into the correct name.
5104 *cygwin
* |
*mingw
* )
5105 if test -f "$output_objdir/${outputname}.def" ; then
5106 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5107 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5109 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5110 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5114 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5115 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5120 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5125 # We keep going just in case the user didn't refer to
5126 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
5127 # really was required.
5129 # Nullify the symbol file.
5130 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5131 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5134 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
5135 # Replace the output file specification.
5136 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5137 link_command
="$compile_command$compile_rpath"
5139 # We have no uninstalled library dependencies, so finalize right now.
5140 $show "$link_command"
5141 $run eval "$link_command"
5144 # Delete the generated files.
5145 if test -n "$dlsyms"; then
5146 $show "$rm $output_objdir/${outputname}S.${objext}"
5147 $run $rm "$output_objdir/${outputname}S.${objext}"
5153 if test -n "$shlibpath_var"; then
5154 # We should set the shlibpath_var
5156 for dir
in $temp_rpath; do
5158 [\\/]* |
[A-Za-z
]:[\\/]*)
5163 # Relative path: add a thisdir entry.
5164 rpath
="$rpath\$thisdir/$dir:"
5171 if test -n "$compile_shlibpath$finalize_shlibpath"; then
5172 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5174 if test -n "$finalize_shlibpath"; then
5175 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5180 if test -n "$runpath_var"; then
5181 if test -n "$perm_rpath"; then
5182 # We should set the runpath_var.
5184 for dir
in $perm_rpath; do
5187 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
5189 if test -n "$finalize_perm_rpath"; then
5190 # We should set the runpath_var.
5192 for dir
in $finalize_perm_rpath; do
5195 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
5199 if test "$no_install" = yes; then
5200 # We don't need to create a wrapper script.
5201 link_command
="$compile_var$compile_command$compile_rpath"
5202 # Replace the output file specification.
5203 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5204 # Delete the old output file.
5206 # Link the executable and exit
5207 $show "$link_command"
5208 $run eval "$link_command" ||
exit $?
5212 if test "$hardcode_action" = relink
; then
5213 # Fast installation is not supported
5214 link_command
="$compile_var$compile_command$compile_rpath"
5215 relink_command
="$finalize_var$finalize_command$finalize_rpath"
5217 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5218 $echo "$modename: \`$output' will be relinked during installation" 1>&2
5220 if test "$fast_install" != no
; then
5221 link_command
="$finalize_var$compile_command$finalize_rpath"
5222 if test "$fast_install" = yes; then
5223 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5225 # fast_install is set to needless
5229 link_command
="$compile_var$compile_command$compile_rpath"
5230 relink_command
="$finalize_var$finalize_command$finalize_rpath"
5234 # Replace the output file specification.
5235 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5237 # Delete the old output files.
5238 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
5240 $show "$link_command"
5241 $run eval "$link_command" ||
exit $?
5243 # Now create the wrapper script.
5244 $show "creating $output"
5246 # Quote the relink command for shipping.
5247 if test -n "$relink_command"; then
5248 # Preserve any variables that may affect compiler behavior
5249 for var
in $variables_saved_for_relink; do
5250 if eval test -z \"\
${$var+set}\"; then
5251 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5252 elif eval var_value
=\$
$var; test -z "$var_value"; then
5253 relink_command
="$var=; export $var; $relink_command"
5255 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5256 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5259 relink_command
="(cd `pwd`; $relink_command)"
5260 relink_command
=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5263 # Quote $echo for shipping.
5264 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5266 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
5267 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
5269 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5271 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5274 # Only actually do things if our run command is non-null.
5275 if test -z "$run"; then
5276 # win32 will think the script is a binary if it has
5277 # a .exe suffix, so we strip it off here.
5279 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
5281 # test for cygwin because mv fails w/o .exe extensions
5285 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5289 *cygwin
* |
*mingw
* )
5290 output_name
=`basename $output`
5291 output_path
=`dirname $output`
5292 cwrappersource
="$output_path/$objdir/lt-$output_name.c"
5293 cwrapper
="$output_path/$output_name.exe"
5294 $rm $cwrappersource $cwrapper
5295 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5297 cat > $cwrappersource <<EOF
5299 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5300 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5302 The $output program cannot be directly executed until all the libtool
5303 libraries that it depends on are installed.
5305 This wrapper executable should never be moved out of the build directory.
5306 If it is, it will not operate correctly.
5308 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5309 but could eventually absorb all of the scripts functionality and
5310 exec $objdir/$outputname directly.
5313 cat >> $cwrappersource<<"EOF"
5322 #include <sys/stat.h>
5324 #if defined(PATH_MAX)
5325 # define LT_PATHMAX PATH_MAX
5326 #elif defined(MAXPATHLEN)
5327 # define LT_PATHMAX MAXPATHLEN
5329 # define LT_PATHMAX 1024
5332 #ifndef DIR_SEPARATOR
5333 # define DIR_SEPARATOR '/'
5334 # define PATH_SEPARATOR ':'
5337 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5339 # define HAVE_DOS_BASED_FILE_SYSTEM
5340 # ifndef DIR_SEPARATOR_2
5341 # define DIR_SEPARATOR_2 '\\'
5343 # ifndef PATH_SEPARATOR_2
5344 # define PATH_SEPARATOR_2 ';'
5348 #ifndef DIR_SEPARATOR_2
5349 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5350 #else /* DIR_SEPARATOR_2 */
5351 # define IS_DIR_SEPARATOR(ch) \
5352 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5353 #endif /* DIR_SEPARATOR_2 */
5355 #ifndef PATH_SEPARATOR_2
5356 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5357 #else /* PATH_SEPARATOR_2 */
5358 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5359 #endif /* PATH_SEPARATOR_2 */
5361 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5362 #define XFREE(stale) do { \
5363 if (stale) { free ((void *) stale); stale = 0; } \
5366 /* -DDEBUG is fairly common in CFLAGS. */
5368 #if defined DEBUGWRAPPER
5369 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5371 # define DEBUG(format, ...)
5374 const char *program_name = NULL;
5376 void * xmalloc (size_t num);
5377 char * xstrdup (const char *string);
5378 const char * base_name (const char *name);
5379 char * find_executable(const char *wrapper);
5380 int check_executable(const char *path);
5381 char * strendzap(char *str, const char *pat);
5382 void lt_fatal (const char *message, ...);
5385 main (int argc, char *argv[])
5390 program_name = (char *) xstrdup (base_name (argv[0]));
5391 DEBUG("(main) argv[0] : %s\n",argv[0]);
5392 DEBUG("(main) program_name : %s\n",program_name);
5393 newargz = XMALLOC(char *, argc+2);
5396 cat >> $cwrappersource <<EOF
5397 newargz[0] = (char *) xstrdup("$SHELL");
5400 cat >> $cwrappersource <<"EOF"
5401 newargz
[1] = find_executable
(argv
[0]);
5402 if (newargz
[1] == NULL
)
5403 lt_fatal
("Couldn't find %s", argv
[0]);
5404 DEBUG
("(main) found exe at : %s\n",newargz
[1]);
5405 /* we know the
script has the same name
, without the .exe
*/
5406 /* so
make sure newargz
[1] doesn
't end in .exe */
5407 strendzap(newargz[1],".exe");
5408 for (i = 1; i < argc; i++)
5409 newargz[i+1] = xstrdup(argv[i]);
5410 newargz[argc+1] = NULL;
5412 for (i=0; i<argc+1; i++)
5414 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5422 cat >> $cwrappersource <<EOF
5423 execv("$SHELL",(char const **)newargz);
5427 cat >> $cwrappersource <<EOF
5428 execv("$SHELL",newargz);
5433 cat >> $cwrappersource <<"EOF"
5438 xmalloc (size_t num)
5440 void * p = (void *) malloc (num);
5442 lt_fatal ("Memory exhausted");
5448 xstrdup (const char *string)
5450 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5455 base_name (const char *name)
5459 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5460 /* Skip over the disk name in MSDOS pathnames. */
5461 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5465 for (base = name; *name; name++)
5466 if (IS_DIR_SEPARATOR (*name))
5472 check_executable(const char * path)
5476 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5477 if ((!path) || (!*path))
5480 if ((stat (path, &st) >= 0) &&
5482 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5483 #if defined (S_IXOTH)
5484 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5486 #if defined (S_IXGRP)
5487 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5489 ((st.st_mode & S_IXUSR) == S_IXUSR))
5496 /* Searches for the full path of the wrapper. Returns
5497 newly allocated full path name if found, NULL otherwise */
5499 find_executable (const char* wrapper)
5504 /* static buffer for getcwd */
5505 char tmp[LT_PATHMAX + 1];
5509 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5511 if ((wrapper == NULL) || (*wrapper == '\
0'))
5514 /* Absolute path? */
5515 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5516 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5518 concat_name = xstrdup (wrapper);
5519 if (check_executable(concat_name))
5526 if (IS_DIR_SEPARATOR (wrapper[0]))
5528 concat_name = xstrdup (wrapper);
5529 if (check_executable(concat_name))
5533 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5537 for (p = wrapper; *p; p++)
5545 /* no slashes; search PATH */
5546 const char* path = getenv ("PATH");
5549 for (p = path; *p; p = p_next)
5553 for (q = p; *q; q++)
5554 if (IS_PATH_SEPARATOR(*q))
5557 p_next = (*q == '\
0' ? q : q + 1);
5560 /* empty path: current directory */
5561 if (getcwd (tmp, LT_PATHMAX) == NULL)
5562 lt_fatal ("getcwd failed");
5563 tmp_len = strlen(tmp);
5564 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5565 memcpy (concat_name, tmp, tmp_len);
5566 concat_name[tmp_len] = '/';
5567 strcpy (concat_name + tmp_len + 1, wrapper);
5571 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5572 memcpy (concat_name, p, p_len);
5573 concat_name[p_len] = '/';
5574 strcpy (concat_name + p_len + 1, wrapper);
5576 if (check_executable(concat_name))
5581 /* not found in PATH; assume curdir */
5583 /* Relative path | not found in path: prepend cwd */
5584 if (getcwd (tmp, LT_PATHMAX) == NULL)
5585 lt_fatal ("getcwd failed");
5586 tmp_len = strlen(tmp);
5587 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5588 memcpy (concat_name, tmp, tmp_len);
5589 concat_name[tmp_len] = '/';
5590 strcpy (concat_name + tmp_len + 1, wrapper);
5592 if (check_executable(concat_name))
5599 strendzap(char *str, const char *pat)
5603 assert(str != NULL);
5604 assert(pat != NULL);
5607 patlen = strlen(pat);
5611 str += len - patlen;
5612 if (strcmp(str, pat) == 0)
5619 lt_error_core (int exit_status, const char * mode,
5620 const char * message, va_list ap)
5622 fprintf (stderr, "%s: %s: ", program_name, mode);
5623 vfprintf (stderr, message, ap);
5624 fprintf (stderr, ".\n");
5626 if (exit_status >= 0)
5631 lt_fatal (const char *message, ...)
5634 va_start (ap, message);
5635 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5639 # we should really use a build-platform specific compiler
5640 # here, but OTOH, the wrappers (shell script and this C one)
5641 # are only useful if you want to execute the "real" binary.
5642 # Since the "real" binary is built for $host, then this
5643 # wrapper might as well be built for $host, too.
5644 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5648 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5653 # $output - temporary wrapper script for $objdir/$outputname
5654 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5656 # The $output program cannot be directly executed until all the libtool
5657 # libraries that it depends on are installed.
5659 # This wrapper script should never be moved out of the build directory.
5660 # If it is, it will not operate correctly.
5662 # Sed substitution that helps us do robust quoting. It backslashifies
5663 # metacharacters that are still active within double-quoted strings.
5664 Xsed='${SED} -e 1s
/^X
//'
5665 sed_quote_subst='$sed_quote_subst'
5667 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5668 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5671 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5672 # is contrary to our usage. Disable this feature.
5673 alias -g '\
${1+\"\$@\"}'='\"\$@
\"'
5674 setopt NO_GLOB_SUBST
5676 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5678 BIN_SH=xpg4; export BIN_SH # for Tru64
5679 DUALCASE=1; export DUALCASE # for MKS sh
5681 # The HP-UX ksh and POSIX shell print the target directory to stdout
5683 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5685 relink_command=\"$relink_command\"
5687 # This environment variable determines our operation mode.
5688 if test \"\$libtool_install_magic\" = \"$magic\"; then
5689 # install mode needs the following variable:
5690 notinst_deplibs='$notinst_deplibs'
5692 # When we are sourced in execute mode, \$file and \$echo are already set.
5693 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5696 # Make sure echo works.
5697 if test \"X\$1\" = X--no-reexec; then
5698 # Discard the --no-reexec flag, and continue.
5700 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X
\t'; then
5701 # Yippee, \$echo works!
5704 # Restart under the correct shell, and then maybe \$echo will work.
5705 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5711 # Find the directory that this script lives in.
5712 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's
%/[^
/]*$
%%'\`
5713 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5715 # Follow symbolic links until we get to the real thisdir.
5716 file=\`ls -ld \"\$file\" | ${SED} -n 's
/.
*-> //p
'\`
5717 while test -n \"\$file\"; do
5718 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's
%/[^
/]*\$
%%'\`
5720 # If there was a directory component, then change thisdir.
5721 if test \"x\$destdir\" != \"x\$file\"; then
5722 case \"\$destdir\" in
5723 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5724 *) thisdir=\"\$thisdir/\$destdir\" ;;
5728 file=\`\$echo \"X\$file\" | \$Xsed -e 's
%^.
*/%%'\`
5729 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's
/.
*-> //p
'\`
5732 # Try to get the absolute directory name.
5733 absdir=\`cd \"\$thisdir\" && pwd\`
5734 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5737 if test "$fast_install" = yes; then
5739 program=lt-'$outputname'$exeext
5740 progdir=\"\$thisdir/$objdir\"
5742 if test ! -f \"\$progdir/\$program\" || \\
5743 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5744 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5746 file=\"\$\$-\$program\"
5748 if test ! -d \"\$progdir\"; then
5749 $mkdir \"\$progdir\"
5751 $rm \"\$progdir/\$file\"
5756 # relink executable if necessary
5757 if test -n \"\$relink_command\"; then
5758 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5760 $echo \"\$relink_command_output\" >&2
5761 $rm \"\$progdir/\$file\"
5766 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5767 { $rm \"\$progdir/\$program\";
5768 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5769 $rm \"\$progdir/\$file\"
5773 program='$outputname'
5774 progdir=\"\$thisdir/$objdir\"
5780 if test -f \"\$progdir/\$program\"; then"
5782 # Export our shlibpath_var if we have one.
5783 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5785 # Add our own library path to $shlibpath_var
5786 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5788 # Some systems cannot cope with colon-terminated $shlibpath_var
5789 # The second colon is a workaround for a bug in BeOS R4 sed
5790 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's
/::*\$
//'\`
5792 export $shlibpath_var
5796 # fixup the dll searchpath if we need to.
5797 if test -n "$dllsearchpath"; then
5799 # Add the dll search path components to the executable PATH
5800 PATH=$dllsearchpath:\$PATH
5805 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5806 # Run the actual program with our arguments.
5809 # Backslashes separate directories on plain windows
5810 *-*-mingw | *-*-os2*)
5812 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5818 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5823 \$echo \"\$0: cannot exec \$program \$*\"
5827 # The program doesn't exist.
5828 \
$echo \"\
$0: error
: \\\
`\$progdir/\$program' does not exist\" 1>&2
5829 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5830 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5841 # See if we need to build an old-fashioned archive.
5842 for oldlib in $oldlibs; do
5844 if test "$build_libtool_libs" = convenience; then
5845 oldobjs="$libobjs_save"
5846 addlibs="$convenience"
5847 build_libtool_libs=no
5849 if test "$build_libtool_libs" = module; then
5850 oldobjs="$libobjs_save"
5851 build_libtool_libs=no
5853 oldobjs="$old_deplibs $non_pic_objects"
5855 addlibs="$old_convenience"
5858 if test -n "$addlibs"; then
5859 gentop="$output_objdir/${outputname}x"
5860 generated="$generated $gentop"
5862 func_extract_archives $gentop $addlibs
5863 oldobjs="$oldobjs $func_extract_archives_result"
5866 # Do each command in the archive commands.
5867 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5868 cmds=$old_archive_from_new_cmds
5870 # POSIX demands no paths to be encoded in archives. We have
5871 # to avoid creating archives with duplicate basenames if we
5872 # might have to extract them afterwards, e.g., when creating a
5873 # static archive out of a convenience library, or when linking
5874 # the entirety of a libtool archive into another (currently
5875 # not supported by libtool).
5876 if (for obj in $oldobjs
5878 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5879 done | sort | sort -uc >/dev/null 2>&1); then
5882 $echo "copying selected object files to avoid basename conflicts..."
5884 if test -z "$gentop"; then
5885 gentop="$output_objdir/${outputname}x"
5886 generated="$generated $gentop"
5888 $show "${rm}r $gentop"
5889 $run ${rm}r "$gentop"
5890 $show "$mkdir $gentop"
5891 $run $mkdir "$gentop"
5893 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5898 save_oldobjs=$oldobjs
5901 for obj in $save_oldobjs
5903 objbase=`$echo "X$obj" |
$Xsed -e 's%^.*/%%'`
5904 case " $oldobjs " in
5905 " ") oldobjs=$obj ;;
5908 # Make sure we don't pick an alternate name that also
5910 newobj=lt$counter-$objbase
5911 counter=`expr $counter + 1`
5912 case " $oldobjs " in
5913 *[\ /]"$newobj "*) ;;
5914 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5917 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5918 $run ln "$obj" "$gentop/$newobj" ||
5919 $run cp "$obj" "$gentop/$newobj"
5920 oldobjs="$oldobjs $gentop/$newobj"
5922 *) oldobjs="$oldobjs $obj" ;;
5927 eval cmds=\"$old_archive_cmds\"
5929 if len=`expr "X$cmds" : ".*"` &&
5930 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5931 cmds=$old_archive_cmds
5933 # the command line is too long to link in one step, link in parts
5934 $echo "using piecewise archive linking..."
5939 save_oldobjs=$oldobjs
5941 # Is there a better way of finding the last object in the list?
5942 for obj in $save_oldobjs
5946 for obj in $save_oldobjs
5948 oldobjs="$objlist $obj"
5949 objlist="$objlist $obj"
5950 eval test_cmds=\"$old_archive_cmds\"
5951 if len=`expr "X$test_cmds" : ".*" 2>/dev
/null
` &&
5952 test "$len" -le "$max_cmd_len"; then
5955 # the above command should be used before it gets too long
5957 if test "$obj" = "$last_oldobj" ; then
5960 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5961 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5967 if test "X$oldobjs" = "X" ; then
5968 eval cmds=\"\$concat_cmds\"
5970 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5974 save_ifs="$IFS"; IFS='~'
5975 for cmd in $cmds; do
5979 $run eval "$cmd" || exit $?
5984 if test -n "$generated"; then
5985 $show "${rm}r$generated"
5986 $run ${rm}r$generated
5989 # Now create the libtool archive.
5993 test "$build_old_libs" = yes && old_library="$libname.$libext"
5994 $show "creating $output"
5996 # Preserve any variables that may affect compiler behavior
5997 for var in $variables_saved_for_relink; do
5998 if eval test -z \"\${$var+set}\"; then
5999 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
6000 elif eval var_value=\$$var; test -z "$var_value"; then
6001 relink_command="$var=; export $var; $relink_command"
6003 var_value=`$echo "X$var_value" |
$Xsed -e "$sed_quote_subst"`
6004 relink_command="$var=\"$var_value\"; export $var; $relink_command"
6007 # Quote the link command for shipping.
6008 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
6009 relink_command=`$echo "X$relink_command" |
$SP2NL |
$Xsed -e "$sed_quote_subst" |
$NL2SP`
6010 if test "$hardcode_automatic" = yes ; then
6015 # Only create the output if not a dry run.
6016 if test -z "$run"; then
6017 for installed in no yes; do
6018 if test "$installed" = yes; then
6019 if test -z "$install_libdir"; then
6022 output="$output_objdir/$outputname"i
6023 # Replace all uninstalled libtool libraries with the installed ones
6025 for deplib in $dependency_libs; do
6028 name=`$echo "X$deplib" |
$Xsed -e 's%^.*/%%'`
6029 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6030 if test -z "$libdir"; then
6031 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6034 newdependency_libs="$newdependency_libs $libdir/$name"
6036 *) newdependency_libs="$newdependency_libs $deplib" ;;
6039 dependency_libs="$newdependency_libs"
6041 for lib in $dlfiles; do
6042 name=`$echo "X$lib" | $Xsed -e 's
%^.
*/%%'`
6043 eval libdir=`${SED} -n -e 's
/^libdir
=\
(.
*\
)$
/\
1/p
' $lib`
6044 if test -z "$libdir"; then
6045 $echo "$modename: \`$lib' is not a valid libtool archive
" 1>&2
6048 newdlfiles="$newdlfiles $libdir/$name"
6050 dlfiles="$newdlfiles"
6052 for lib in $dlprefiles; do
6053 name=`$echo "X
$lib" | $Xsed -e 's%^.*/%%'`
6054 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6055 if test -z "$libdir"; then
6056 $echo "$modename: \
`$lib' is not a valid libtool archive" 1>&2
6059 newdlprefiles="$newdlprefiles $libdir/$name"
6061 dlprefiles="$newdlprefiles"
6064 for lib in $dlfiles; do
6066 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6067 *) abs=`pwd`"/$lib" ;;
6069 newdlfiles="$newdlfiles $abs"
6071 dlfiles="$newdlfiles"
6073 for lib in $dlprefiles; do
6075 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6076 *) abs=`pwd`"/$lib" ;;
6078 newdlprefiles="$newdlprefiles $abs"
6080 dlprefiles="$newdlprefiles"
6083 # place dlname in correct position for cygwin
6085 case $host,$output,$installed,$module,$dlname in
6086 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6089 # $outputname - a libtool library file
6090 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6092 # Please DO NOT delete this file!
6093 # It is necessary for linking the library.
6095 # The name that we can dlopen(3).
6098 # Names of this library.
6099 library_names='$library_names'
6101 # The name of the static archive.
6102 old_library='$old_library'
6104 # Libraries that this one depends upon.
6105 dependency_libs='$dependency_libs'
6107 # Version information for $libname.
6112 # Is this an already installed library?
6113 installed=$installed
6115 # Should we warn about portability when linking against -modules?
6116 shouldnotlink=$module
6118 # Files to dlopen/dlpreopen
6120 dlpreopen='$dlprefiles'
6122 # Directory that this library needs to be installed in:
6123 libdir='$install_libdir'"
6124 if test "$installed" = no && test "$need_relink" = yes; then
6126 relink_command=\"$relink_command\""
6131 # Do a symbolic link so that the libtool archive can be found in
6132 # LD_LIBRARY_PATH before the program is installed.
6133 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6134 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6140 # libtool install mode
6142 modename="$modename: install"
6144 # There may be an optional sh(1) argument at the beginning of
6145 # install_prog (especially on Windows NT).
6146 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6147 # Allow the use of GNU shtool's install command.
6148 $echo "X$nonopt" | grep shtool > /dev/null; then
6149 # Aesthetically quote it.
6150 arg=`$echo "X$nonopt" |
$Xsed -e "$sed_quote_subst"`
6152 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6156 install_prog="$arg "
6164 # The real first argument should be the name of the installation program.
6165 # Aesthetically quote it.
6166 arg=`$echo "X$arg" |
$Xsed -e "$sed_quote_subst"`
6168 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6172 install_prog="$install_prog$arg"
6174 # We need to accept at least all the BSD install flags.
6184 if test -n "$dest"; then
6185 files="$files $dest"
6193 case " $install_prog " in
6198 -g | -m | -o) prev=$arg ;;
6206 # If the previous option needed an argument, then skip it.
6207 if test -n "$prev"; then
6216 # Aesthetically quote the argument.
6217 arg=`$echo "X$arg" |
$Xsed -e "$sed_quote_subst"`
6219 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6223 install_prog="$install_prog $arg"
6226 if test -z "$install_prog"; then
6227 $echo "$modename: you must specify an install program" 1>&2
6232 if test -n "$prev"; then
6233 $echo "$modename: the \`$prev' option requires an argument" 1>&2
6238 if test -z "$files"; then
6239 if test -z "$dest"; then
6240 $echo "$modename: no file or destination specified" 1>&2
6242 $echo "$modename: you must specify a destination" 1>&2
6248 # Strip any trailing slash from the destination.
6249 dest=`$echo "X$dest" | $Xsed -e 's
%/$
%%'`
6251 # Check to see that the destination is a directory.
6252 test -d "$dest" && isdir=yes
6253 if test "$isdir" = yes; then
6257 destdir=`$echo "X$dest" | $Xsed -e 's
%/[^
/]*$
%%'`
6258 test "X$destdir" = "X$dest" && destdir=.
6259 destname=`$echo "X$dest" | $Xsed -e 's
%^.
*/%%'`
6261 # Not a directory, so check to see that there is only one file specified.
6263 if test "$#" -gt 2; then
6264 $echo "$modename: \`$dest' is not a directory
" 1>&2
6270 [\\/]* | [A-Za-z]:[\\/]*) ;;
6272 for file in $files; do
6276 $echo "$modename: \
`$destdir' must be an absolute directory name" 1>&2
6285 # This variable tells wrapper scripts just to set variables rather
6286 # than running their programs.
6287 libtool_install_magic="$magic"
6292 for file in $files; do
6294 # Do each installation.
6297 # Do the static libraries later.
6298 staticlibs="$staticlibs $file"
6302 # Check to see that this really is a libtool archive.
6303 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6305 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6313 # If there is no directory component, then add one.
6315 */* | *\\*) . $file ;;
6319 # Add the libdir to current_libdirs if it is the destination.
6320 if test "X$destdir" = "X$libdir"; then
6321 case "$current_libdirs " in
6323 *) current_libdirs="$current_libdirs $libdir" ;;
6326 # Note the libdir as a future libdir.
6327 case "$future_libdirs " in
6329 *) future_libdirs="$future_libdirs $libdir" ;;
6333 dir=`$echo "X$file" | $Xsed -e 's
%/[^
/]*$
%%'`/
6334 test "X$dir" = "X$file/" && dir=
6337 if test -n "$relink_command"; then
6338 # Determine the prefix the user has applied to our future dir.
6339 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6341 # Don't allow the user to place us outside of our expected
6342 # location b/c this prevents finding dependent libraries that
6343 # are installed to the same prefix.
6344 # At present, this check doesn't affect windows .dll's that
6345 # are installed into $libdir/../bin (currently, that works fine)
6346 # but it's something to keep an eye on.
6347 if test "$inst_prefix_dir" = "$destdir"; then
6348 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6352 if test -n "$inst_prefix_dir"; then
6353 # Stick the inst_prefix_dir data into the link command.
6354 relink_command
=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6356 relink_command
=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6359 $echo "$modename: warning: relinking \`$file'" 1>&2
6360 $show "$relink_command"
6361 if $run eval "$relink_command"; then :
6363 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6368 # See the names of the shared library.
6369 set dummy
$library_names
6370 if test -n "$2"; then
6376 test -n "$relink_command" && srcname
="$realname"T
6378 # Install the shared library and build the symlinks.
6379 $show "$install_prog $dir/$srcname $destdir/$realname"
6380 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
6381 if test -n "$stripme" && test -n "$striplib"; then
6382 $show "$striplib $destdir/$realname"
6383 $run eval "$striplib $destdir/$realname" ||
exit $?
6386 if test "$#" -gt 0; then
6387 # Delete the old symlinks, and create new ones.
6388 # Try `ln -sf' first, because the `ln' binary might depend on
6389 # the symlink we replace! Solaris /bin/ln does not understand -f,
6390 # so we also need to try rm && ln -s.
6393 if test "$linkname" != "$realname"; then
6394 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6395 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6400 # Do each command in the postinstall commands.
6401 lib
="$destdir/$realname"
6402 cmds
=$postinstall_cmds
6403 save_ifs
="$IFS"; IFS
='~'
6404 for cmd
in $cmds; do
6408 $run eval "$cmd" ||
{
6411 # Restore the uninstalled library and exit
6412 if test "$mode" = relink
; then
6413 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6422 # Install the pseudo-library for information purposes.
6423 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6424 instname
="$dir/$name"i
6425 $show "$install_prog $instname $destdir/$name"
6426 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
6428 # Maybe install the static library, too.
6429 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
6433 # Install (i.e. copy) a libtool object.
6435 # Figure out destination file name, if it wasn't already specified.
6436 if test -n "$destname"; then
6437 destfile
="$destdir/$destname"
6439 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6440 destfile
="$destdir/$destfile"
6443 # Deduce the name of the destination old-style object file.
6446 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6449 staticdest
="$destfile"
6453 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6459 # Install the libtool object if requested.
6460 if test -n "$destfile"; then
6461 $show "$install_prog $file $destfile"
6462 $run eval "$install_prog $file $destfile" ||
exit $?
6465 # Install the old object if enabled.
6466 if test "$build_old_libs" = yes; then
6467 # Deduce the name of the old-style object file.
6468 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
6470 $show "$install_prog $staticobj $staticdest"
6471 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
6477 # Figure out destination file name, if it wasn't already specified.
6478 if test -n "$destname"; then
6479 destfile
="$destdir/$destname"
6481 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6482 destfile
="$destdir/$destfile"
6485 # If the file is missing, and there is a .exe on the end, strip it
6486 # because it is most likely a libtool script we actually want to
6491 if test ! -f "$file"; then
6492 file=`$echo $file|${SED} 's,.exe$,,'`
6498 # Do a test to see if this is really a libtool program.
6501 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
6507 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
6511 # Note that it is not necessary on cygwin/mingw to append a dot to
6512 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6513 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6514 # `FILE.' does not work on cygwin managed mounts.
6516 # If there is no directory component, then add one.
6518 */* |
*\\*) .
${wrapper} ;;
6519 *) . .
/${wrapper} ;;
6522 # Check the variables that should have been set.
6523 if test -z "$notinst_deplibs"; then
6524 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6529 for lib
in $notinst_deplibs; do
6530 # Check to see that each library is installed.
6532 if test -f "$lib"; then
6533 # If there is no directory component, then add one.
6535 */* |
*\\*) .
$lib ;;
6539 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6540 if test -n "$libdir" && test ! -f "$libfile"; then
6541 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6547 # Note that it is not necessary on cygwin/mingw to append a dot to
6548 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6549 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6550 # `FILE.' does not work on cygwin managed mounts.
6552 # If there is no directory component, then add one.
6554 */* |
*\\*) .
${wrapper} ;;
6555 *) . .
/${wrapper} ;;
6559 if test "$fast_install" = no
&& test -n "$relink_command"; then
6560 if test "$finalize" = yes && test -z "$run"; then
6561 tmpdir
=`func_mktempdir`
6562 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6563 outputname
="$tmpdir/$file"
6564 # Replace the output file specification.
6565 relink_command
=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6567 $show "$relink_command"
6568 if $run eval "$relink_command"; then :
6570 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6576 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6579 # Install the binary that we compiled earlier.
6580 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6584 # remove .exe since cygwin /usr/bin/install will append another
6586 case $install_prog,$host in
6587 */usr
/bin
/install*,*cygwin
*)
6588 case $file:$destfile in
6593 destfile
=$destfile.exe
6596 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6601 $show "$install_prog$stripme $file $destfile"
6602 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6603 test -n "$outputname" && ${rm}r
"$tmpdir"
6608 for file in $staticlibs; do
6609 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6611 # Set up the ranlib parameters.
6612 oldlib
="$destdir/$name"
6614 $show "$install_prog $file $oldlib"
6615 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6617 if test -n "$stripme" && test -n "$old_striplib"; then
6618 $show "$old_striplib $oldlib"
6619 $run eval "$old_striplib $oldlib" ||
exit $?
6622 # Do each command in the postinstall commands.
6623 cmds
=$old_postinstall_cmds
6624 save_ifs
="$IFS"; IFS
='~'
6625 for cmd
in $cmds; do
6629 $run eval "$cmd" ||
exit $?
6634 if test -n "$future_libdirs"; then
6635 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6638 if test -n "$current_libdirs"; then
6639 # Maybe just do a dry run.
6640 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6641 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6647 # libtool finish mode
6649 modename
="$modename: finish"
6653 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6656 libdirs
="$libdirs $dir"
6659 for libdir
in $libdirs; do
6660 if test -n "$finish_cmds"; then
6661 # Do each command in the finish commands.
6663 save_ifs
="$IFS"; IFS
='~'
6664 for cmd
in $cmds; do
6668 $run eval "$cmd" || admincmds
="$admincmds
6673 if test -n "$finish_eval"; then
6674 # Do the single finish_eval.
6675 eval cmds
=\"$finish_eval\"
6676 $run eval "$cmds" || admincmds
="$admincmds
6682 # Exit here if they wanted silent mode.
6683 test "$show" = : && exit $EXIT_SUCCESS
6685 $echo "X----------------------------------------------------------------------" |
$Xsed
6686 $echo "Libraries have been installed in:"
6687 for libdir
in $libdirs; do
6691 $echo "If you ever happen to want to link against installed libraries"
6692 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6693 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6694 $echo "flag during linking and do at least one of the following:"
6695 if test -n "$shlibpath_var"; then
6696 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6697 $echo " during execution"
6699 if test -n "$runpath_var"; then
6700 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6701 $echo " during linking"
6703 if test -n "$hardcode_libdir_flag_spec"; then
6705 eval flag
=\"$hardcode_libdir_flag_spec\"
6707 $echo " - use the \`$flag' linker flag"
6709 if test -n "$admincmds"; then
6710 $echo " - have your system administrator run these commands:$admincmds"
6712 if test -f /etc
/ld.so.conf
; then
6713 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6716 $echo "See any operating system documentation about shared libraries for"
6717 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6718 $echo "X----------------------------------------------------------------------" |
$Xsed
6722 # libtool execute mode
6724 modename
="$modename: execute"
6726 # The first argument is the command name.
6728 if test -z "$cmd"; then
6729 $echo "$modename: you must specify a COMMAND" 1>&2
6734 # Handle -dlopen flags immediately.
6735 for file in $execute_dlfiles; do
6736 if test ! -f "$file"; then
6737 $echo "$modename: \`$file' is not a file" 1>&2
6745 # Check to see that this really is a libtool archive.
6746 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6748 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6753 # Read the libtool library.
6757 # If there is no directory component, then add one.
6759 */* |
*\\*) .
$file ;;
6763 # Skip this library if it cannot be dlopened.
6764 if test -z "$dlname"; then
6765 # Warn if it was a shared library.
6766 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6770 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6771 test "X$dir" = "X$file" && dir
=.
6773 if test -f "$dir/$objdir/$dlname"; then
6776 if test ! -f "$dir/$dlname"; then
6777 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6784 # Just add the directory containing the .lo file.
6785 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6786 test "X$dir" = "X$file" && dir
=.
6790 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6795 # Get the absolute pathname.
6796 absdir
=`cd "$dir" && pwd`
6797 test -n "$absdir" && dir
="$absdir"
6799 # Now add the directory to shlibpath_var.
6800 if eval "test -z \"\$$shlibpath_var\""; then
6801 eval "$shlibpath_var=\"\$dir\""
6803 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6807 # This variable tells wrapper scripts just to set shlibpath_var
6808 # rather than running their programs.
6809 libtool_execute_magic
="$magic"
6811 # Check if any of the arguments is a wrapper script.
6818 # Do a test to see if this is really a libtool program.
6819 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6820 # If there is no directory component, then add one.
6822 */* |
*\\*) .
$file ;;
6826 # Transform arg to wrapped name.
6827 file="$progdir/$program"
6831 # Quote arguments (to preserve shell metacharacters).
6832 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6833 args
="$args \"$file\""
6836 if test -z "$run"; then
6837 if test -n "$shlibpath_var"; then
6838 # Export the shlibpath_var.
6839 eval "export $shlibpath_var"
6842 # Restore saved environment variables
6843 for lt_var
in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6845 eval "if test \"\${save_$lt_var+set}\" = set; then
6846 $lt_var=\$save_$lt_var; export $lt_var
6850 # Now prepare to actually exec the command.
6851 exec_cmd
="\$cmd$args"
6853 # Display what would be done.
6854 if test -n "$shlibpath_var"; then
6855 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6856 $echo "export $shlibpath_var"
6863 # libtool clean and uninstall mode
6865 modename
="$modename: $mode"
6871 # This variable tells wrapper scripts just to set variables rather
6872 # than running their programs.
6873 libtool_install_magic
="$magic"
6878 -f) rm="$rm $arg"; rmforce
=yes ;;
6879 -*) rm="$rm $arg" ;;
6880 *) files
="$files $arg" ;;
6884 if test -z "$rm"; then
6885 $echo "$modename: you must specify an RM program" 1>&2
6892 origobjdir
="$objdir"
6893 for file in $files; do
6894 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6895 if test "X$dir" = "X$file"; then
6897 objdir
="$origobjdir"
6899 objdir
="$dir/$origobjdir"
6901 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6902 test "$mode" = uninstall
&& objdir
="$dir"
6904 # Remember objdir for removal later, being careful to avoid duplicates
6905 if test "$mode" = clean
; then
6908 *) rmdirs
="$rmdirs $objdir" ;;
6912 # Don't error if the file doesn't exist and rm -f was used.
6913 if (test -L "$file") >/dev
/null
2>&1 \
6914 ||
(test -h "$file") >/dev
/null
2>&1 \
6915 ||
test -f "$file"; then
6917 elif test -d "$file"; then
6920 elif test "$rmforce" = yes; then
6928 # Possibly a libtool archive, so verify it.
6929 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6932 # Delete the libtool libraries and symlinks.
6933 for n
in $library_names; do
6934 rmfiles
="$rmfiles $objdir/$n"
6936 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6940 case " $library_names " in
6941 # " " in the beginning catches empty $dlname
6943 *) rmfiles
="$rmfiles $objdir/$dlname" ;;
6945 test -n "$libdir" && rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6948 if test -n "$library_names"; then
6949 # Do each command in the postuninstall commands.
6950 cmds
=$postuninstall_cmds
6951 save_ifs
="$IFS"; IFS
='~'
6952 for cmd
in $cmds; do
6957 if test "$?" -ne 0 && test "$rmforce" != yes; then
6964 if test -n "$old_library"; then
6965 # Do each command in the old_postuninstall commands.
6966 cmds
=$old_postuninstall_cmds
6967 save_ifs
="$IFS"; IFS
='~'
6968 for cmd
in $cmds; do
6973 if test "$?" -ne 0 && test "$rmforce" != yes; then
6979 # FIXME: should reinstall the best remaining shared library.
6986 # Possibly a libtool object, so verify it.
6987 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6992 # Add PIC object to the list of files to remove.
6993 if test -n "$pic_object" \
6994 && test "$pic_object" != none
; then
6995 rmfiles
="$rmfiles $dir/$pic_object"
6998 # Add non-PIC object to the list of files to remove.
6999 if test -n "$non_pic_object" \
7000 && test "$non_pic_object" != none
; then
7001 rmfiles
="$rmfiles $dir/$non_pic_object"
7007 if test "$mode" = clean
; then
7011 file=`$echo $file|${SED} 's,.exe$,,'`
7012 noexename
=`$echo $name|${SED} 's,.exe$,,'`
7013 # $file with .exe has already been added to rmfiles,
7014 # add $file without .exe
7015 rmfiles
="$rmfiles $file"
7018 # Do a test to see if this is a libtool program.
7019 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
7023 # note $name still contains .exe if it was in $file originally
7024 # as does the version of $file that was added into $rmfiles
7025 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7026 if test "$fast_install" = yes && test -n "$relink_command"; then
7027 rmfiles
="$rmfiles $objdir/lt-$name"
7029 if test "X$noexename" != "X$name" ; then
7030 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
7036 $show "$rm $rmfiles"
7037 $run $rm $rmfiles || exit_status
=1
7039 objdir
="$origobjdir"
7041 # Try to remove the ${objdir}s in the directories where we deleted files
7042 for dir
in $rmdirs; do
7043 if test -d "$dir"; then
7045 $run rmdir $dir >/dev
/null
2>&1
7053 $echo "$modename: you must specify a MODE" 1>&2
7054 $echo "$generic_help" 1>&2
7059 if test -z "$exec_cmd"; then
7060 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7061 $echo "$generic_help" 1>&2
7064 fi # test -z "$show_help"
7066 if test -n "$exec_cmd"; then
7071 # We need to display help for each of the modes.
7074 "Usage: $modename [OPTION]... [MODE-ARG]...
7076 Provide generalized library-building support services.
7078 --config show all configuration variables
7079 --debug enable verbose shell tracing
7080 -n, --dry-run display commands without modifying any files
7081 --features display basic configuration information and exit
7082 --finish same as \`--mode=finish'
7083 --help display this help message and exit
7084 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
7085 --quiet same as \`--silent'
7086 --silent don't print informational messages
7087 --tag=TAG use configuration variables from tag TAG
7088 --version print version information
7090 MODE must be one of the following:
7092 clean remove files from the build directory
7093 compile compile a source file into a libtool object
7094 execute automatically set library path, then run a program
7095 finish complete the installation of libtool libraries
7096 install install libraries or executables
7097 link create a library or an executable
7098 uninstall remove libraries from an installed directory
7100 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
7101 a more detailed description of MODE.
7103 Report bugs to <bug-libtool@gnu.org>."
7109 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7111 Remove files from the build directory.
7113 RM is the name of the program to use to delete files associated with each FILE
7114 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7117 If FILE is a libtool library, object or program, all the files associated
7118 with it are deleted. Otherwise, only FILE itself is deleted using RM."
7123 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7125 Compile a source file into a libtool library object.
7127 This mode accepts the following additional options:
7129 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
7130 -prefer-pic try to building PIC objects only
7131 -prefer-non-pic try to building non-PIC objects only
7132 -static always build a \`.o' file suitable for static linking
7134 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7135 from the given SOURCEFILE.
7137 The output file name is determined by removing the directory component from
7138 SOURCEFILE, then substituting the C source code suffix \`.c' with the
7139 library object suffix, \`.lo'."
7144 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7146 Automatically set library path, then run a program.
7148 This mode accepts the following additional options:
7150 -dlopen FILE add the directory containing FILE to the library path
7152 This mode sets the library path environment variable according to \`-dlopen'
7155 If any of the ARGS are libtool executable wrappers, then they are translated
7156 into their corresponding uninstalled binary, and any of their required library
7157 directories are added to the library path.
7159 Then, COMMAND is executed, with ARGS as arguments."
7164 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7166 Complete the installation of libtool libraries.
7168 Each LIBDIR is a directory that contains libtool libraries.
7170 The commands that this mode executes may require superuser privileges. Use
7171 the \`--dry-run' option if you just want to see what would be executed."
7176 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7178 Install executables or libraries.
7180 INSTALL-COMMAND is the installation command. The first component should be
7181 either the \`install' or \`cp' program.
7183 The rest of the components are interpreted as arguments to that command (only
7184 BSD-compatible install options are recognized)."
7189 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7191 Link object files or libraries together to form another library, or to
7192 create an executable program.
7194 LINK-COMMAND is a command using the C compiler that you would use to create
7195 a program from several object files.
7197 The following components of LINK-COMMAND are treated specially:
7199 -all-static do not do any dynamic linking at all
7200 -avoid-version do not add a version suffix if possible
7201 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
7202 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
7203 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7204 -export-symbols SYMFILE
7205 try to export only the symbols listed in SYMFILE
7206 -export-symbols-regex REGEX
7207 try to export only the symbols matching REGEX
7208 -LLIBDIR search LIBDIR for required installed libraries
7209 -lNAME OUTPUT-FILE requires the installed library libNAME
7210 -module build a library that can dlopened
7211 -no-fast-install disable the fast-install mode
7212 -no-install link a not-installable executable
7213 -no-undefined declare that a library does not refer to external symbols
7214 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
7215 -objectlist FILE Use a list of object files found in FILE to specify objects
7216 -precious-files-regex REGEX
7217 don't remove output files matching REGEX
7218 -release RELEASE specify package release information
7219 -rpath LIBDIR the created library will eventually be installed in LIBDIR
7220 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
7221 -static do not do any dynamic linking of uninstalled libtool libraries
7222 -static-libtool-libs
7223 do not do any dynamic linking of libtool libraries
7224 -version-info CURRENT[:REVISION[:AGE]]
7225 specify library version info [each variable defaults to 0]
7227 All other options (arguments beginning with \`-') are ignored.
7229 Every other argument is treated as a filename. Files ending in \`.la' are
7230 treated as uninstalled libtool libraries, other files are standard or library
7233 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7234 only library objects (\`.lo' files) may be specified, and \`-rpath' is
7235 required, except when creating a convenience library.
7237 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7238 using \`ar' and \`ranlib', or on Windows using \`lib'.
7240 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7241 is created, otherwise an executable program is created."
7246 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7248 Remove libraries from an installation directory.
7250 RM is the name of the program to use to delete files associated with each FILE
7251 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7254 If FILE is a libtool library, all the files associated with it are deleted.
7255 Otherwise, only FILE itself is deleted using RM."
7259 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7266 $echo "Try \`$modename --help' for more information about other modes."
7270 # The TAGs below are defined such that we never get into a situation
7271 # in which we disable both kinds of libraries. Given conflicting
7272 # choices, we go for a static library, that is the most portable,
7273 # since we can't tell whether shared libraries were disabled because
7274 # the user asked for that or because the platform doesn't support
7275 # them. This is particularly important on AIX, because we don't
7276 # support having both static and shared libraries enabled at the same
7277 # time on that platform, so we default to a shared-only configuration.
7278 # If a disable-shared tag is given, we'll fallback to a static-only
7279 # configuration. But we'll never go from static-only to shared-only.
7281 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7283 # ### END LIBTOOL TAG CONFIG: disable-shared
7285 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
7287 # ### END LIBTOOL TAG CONFIG: disable-static
7293 # ### BEGIN LIBTOOL TAG CONFIG: CXX
7295 # Libtool was configured on host D293LXD1:
7297 # Shell to use when invoking shell scripts.
7300 # Whether or not to build shared libraries.
7301 build_libtool_libs
=yes
7303 # Whether or not to build static libraries.
7306 # Whether or not to add -lc for building shared libraries.
7307 build_libtool_need_lc
=no
7309 # Whether or not to disallow shared libs when runtime libs are static
7310 allow_libtool_libs_with_static_runtimes
=yes
7312 # Whether or not to optimize for fast installation.
7313 fast_install
=needless
7317 host=i686-pc-mingw32
7321 build_alias
=i686-pc-mingw32
7322 build
=i686-pc-mingw32
7325 # An echo program that does not interpret backslashes.
7335 # LTCC compiler flags.
7338 # A language-specific compiler.
7341 # Is the compiler the GNU C compiler?
7345 EGREP
="/bin/grep -E"
7347 # The linker used to build libraries.
7348 LD
="/i686-pc-msys/bin/ld.exe"
7350 # Whether we need hard or soft links.
7353 # A BSD-compatible nm program.
7356 # A symbol stripping program
7359 # Used to examine libraries when file_magic_cmd begins "file"
7362 # Used on cygwin: DLL creation program.
7365 # Used on cygwin: object dumper.
7368 # Used on cygwin: assembler.
7371 # The name of the directory that contains temporary libtool files.
7374 # How to create reloadable object files.
7376 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7378 # How to pass a linker flag through the compiler.
7381 # Object file suffix (normally "o").
7384 # Old archive suffix (normally "a").
7387 # Shared library suffix (normally ".so").
7390 # Executable file suffix (normally "").
7393 # Additional compiler flags for building library objects.
7394 pic_flag
=" -DDLL_EXPORT -DPIC"
7397 # What is the maximum length of a command?
7400 # Does compiler simultaneously support -c and -o options?
7403 # Must we lock files when doing compilation?
7406 # Do we need the lib prefix for modules?
7409 # Do we need a version for libraries?
7412 # Whether dlopen is supported.
7415 # Whether dlopen of programs is supported.
7418 # Whether dlopen of statically linked programs is supported.
7419 dlopen_self_static
=unknown
7421 # Compiler flag to prevent dynamic linking.
7424 # Compiler flag to turn off builtin functions.
7425 no_builtin_flag
=" -fno-builtin"
7427 # Compiler flag to allow reflexive dlopens.
7428 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7430 # Compiler flag to generate shared objects directly from archives.
7431 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7433 # Compiler flag to generate thread-safe objects.
7434 thread_safe_flag_spec
=""
7436 # Library versioning type.
7437 version_type
=windows
7439 # Format of library name prefix.
7440 libname_spec
="lib\$name"
7442 # List of archive names. First name is the real one, the rest are links.
7443 # The last name is the one that the linker finds with -lNAME.
7444 library_names_spec
="\$libname.dll.a"
7446 # The coded name of the library, if different from the real name.
7447 soname_spec
="\${libname}\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
7449 # Commands used to build and install an old-style archive.
7451 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7452 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7453 old_postuninstall_cmds
=""
7455 # Create an old-style archive from a shared archive.
7456 old_archive_from_new_cmds
=""
7458 # Create a temporary old-style archive to link instead of a shared archive.
7459 old_archive_from_expsyms_cmds
=""
7461 # Commands used to build and install a shared archive.
7462 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"
7463 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
7464 cp \$export_symbols \$output_objdir/\$soname.def;
7466 echo EXPORTS > \$output_objdir/\$soname.def;
7467 cat \$export_symbols >> \$output_objdir/\$soname.def;
7469 \$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"
7470 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
7471 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
7472 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
7473 test -d \\\$dldir || mkdir -p \\\$dldir~
7474 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname~
7475 chmod a+x \\\$dldir/\$dlname"
7476 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
7477 dlpath=\$dir/\\\$dldll~
7480 # Commands used to build a loadable module (assumed same as above if empty)
7482 module_expsym_cmds
=""
7484 # Commands to strip libraries.
7485 old_striplib
="strip --strip-debug"
7486 striplib
="strip --strip-unneeded"
7488 # Dependencies to place before the objects being linked to create a
7492 # Dependencies to place after the objects being linked to create a
7496 # Dependencies to place before the objects being linked to create a
7500 # Dependencies to place after the objects being linked to create a
7502 postdeps
="-lstdc++ -lgcc -lmsys-1.0 -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc"
7504 # The library search path used internally by the compiler when linking
7506 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"
7508 # Method to check whether dependent libraries are shared objects.
7509 deplibs_check_method
="file_magic file format pei*-i386(.*architecture: i386)?"
7511 # Command to use when deplibs_check_method == file_magic.
7512 file_magic_cmd
="\$OBJDUMP -f"
7514 # Flag that allows shared libraries with undefined symbols to be built.
7515 allow_undefined_flag
="unsupported"
7517 # Flag that forces no undefined symbols.
7518 no_undefined_flag
=""
7520 # Commands used to finish a libtool library installation in a directory.
7523 # Same as above, but a single script fragment to be evaled but not shown.
7526 # Take the output of nm and produce a listing of raw symbols and C names.
7527 global_symbol_pipe
=""
7529 # Transform the output of nm in a proper C declaration
7530 global_symbol_to_cdecl
=""
7532 # Transform the output of nm in a C name address pair
7533 global_symbol_to_c_name_address
=""
7535 # This is the shared library runtime path variable.
7536 runpath_var
=LD_RUN_PATH
7538 # This is the shared library path variable.
7541 # Is shlibpath searched before the hard-coded library search path?
7542 shlibpath_overrides_runpath
=yes
7544 # How to hardcode a shared library path into an executable.
7545 hardcode_action
=immediate
7547 # Whether we should hardcode library paths into libraries.
7548 hardcode_into_libs
=no
7550 # Flag to hardcode $libdir into a binary during linking.
7551 # This must work even if $libdir does not exist.
7552 hardcode_libdir_flag_spec
="-L\$libdir"
7554 # If ld is used when linking, flag to hardcode $libdir into
7555 # a binary during linking. This must work even if $libdir does
7557 hardcode_libdir_flag_spec_ld
=""
7559 # Whether we need a single -rpath flag with a separated argument.
7560 hardcode_libdir_separator
=""
7562 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7566 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7570 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7571 # the resulting binary.
7572 hardcode_shlibpath_var
=unsupported
7574 # Set to yes if building a shared library automatically hardcodes DIR into the library
7575 # and all subsequent libraries and executables linked against it.
7576 hardcode_automatic
=no
7578 # Variables whose values should be saved in libtool wrapper scripts and
7579 # restored at relink time.
7580 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7582 # Whether libtool must link a program against all its dependency libraries.
7583 link_all_deplibs
=unknown
7585 # Compile-time system search path for libraries
7586 sys_lib_search_path_spec
=" /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/ /usr/lib/gcc/i686-pc-msys/2.95.3-1/ /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/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/i686-pc-msys/2.95.3-1/ /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib/"
7588 # Run-time system search path for libraries
7589 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
7591 # Fix the shell variable $srcfile for the compiler.
7594 # Set to yes if exported symbols are required.
7595 always_export_symbols
=no
7597 # The commands to list exported symbols.
7598 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"
7600 # The commands to extract the exported symbol list from a shared archive.
7601 extract_expsyms_cmds
=""
7603 # Symbols that should not be listed in the preloaded symbols.
7606 # Symbols that must always be exported.
7609 # ### END LIBTOOL TAG CONFIG: CXX
7611 # ### BEGIN LIBTOOL TAG CONFIG: F77
7613 # Libtool was configured on host D293LXD1:
7615 # Shell to use when invoking shell scripts.
7618 # Whether or not to build shared libraries.
7619 build_libtool_libs
=yes
7621 # Whether or not to build static libraries.
7624 # Whether or not to add -lc for building shared libraries.
7625 build_libtool_need_lc
=no
7627 # Whether or not to disallow shared libs when runtime libs are static
7628 allow_libtool_libs_with_static_runtimes
=yes
7630 # Whether or not to optimize for fast installation.
7631 fast_install
=needless
7635 host=i686-pc-mingw32
7639 build_alias
=i686-pc-mingw32
7640 build
=i686-pc-mingw32
7643 # An echo program that does not interpret backslashes.
7653 # LTCC compiler flags.
7656 # A language-specific compiler.
7659 # Is the compiler the GNU C compiler?
7663 EGREP
="/bin/grep -E"
7665 # The linker used to build libraries.
7666 LD
="/i686-pc-msys/bin/ld.exe"
7668 # Whether we need hard or soft links.
7671 # A BSD-compatible nm program.
7674 # A symbol stripping program
7677 # Used to examine libraries when file_magic_cmd begins "file"
7680 # Used on cygwin: DLL creation program.
7683 # Used on cygwin: object dumper.
7686 # Used on cygwin: assembler.
7689 # The name of the directory that contains temporary libtool files.
7692 # How to create reloadable object files.
7694 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7696 # How to pass a linker flag through the compiler.
7699 # Object file suffix (normally "o").
7702 # Old archive suffix (normally "a").
7705 # Shared library suffix (normally ".so").
7708 # Executable file suffix (normally "").
7711 # Additional compiler flags for building library objects.
7712 pic_flag
=" -DDLL_EXPORT"
7715 # What is the maximum length of a command?
7718 # Does compiler simultaneously support -c and -o options?
7721 # Must we lock files when doing compilation?
7724 # Do we need the lib prefix for modules?
7727 # Do we need a version for libraries?
7730 # Whether dlopen is supported.
7733 # Whether dlopen of programs is supported.
7736 # Whether dlopen of statically linked programs is supported.
7737 dlopen_self_static
=unknown
7739 # Compiler flag to prevent dynamic linking.
7742 # Compiler flag to turn off builtin functions.
7745 # Compiler flag to allow reflexive dlopens.
7746 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7748 # Compiler flag to generate shared objects directly from archives.
7749 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7751 # Compiler flag to generate thread-safe objects.
7752 thread_safe_flag_spec
=""
7754 # Library versioning type.
7755 version_type
=windows
7757 # Format of library name prefix.
7758 libname_spec
="lib\$name"
7760 # List of archive names. First name is the real one, the rest are links.
7761 # The last name is the one that the linker finds with -lNAME.
7762 library_names_spec
="\$libname.dll.a"
7764 # The coded name of the library, if different from the real name.
7765 soname_spec
="\${libname}\`echo \${release} | \$SED -e s/[.]/-/g\`\${versuffix}\${shared_ext}"
7767 # Commands used to build and install an old-style archive.
7769 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7770 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7771 old_postuninstall_cmds
=""
7773 # Create an old-style archive from a shared archive.
7774 old_archive_from_new_cmds
=""
7776 # Create a temporary old-style archive to link instead of a shared archive.
7777 old_archive_from_expsyms_cmds
=""
7779 # Commands used to build and install a shared archive.
7780 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
7781 archive_expsym_cmds
="if test \\\"x\\\`\$SED 1q \$export_symbols\\\`\\\" = xEXPORTS; then
7782 cp \$export_symbols \$output_objdir/\$soname.def;
7784 echo EXPORTS > \$output_objdir/\$soname.def;
7785 cat \$export_symbols >> \$output_objdir/\$soname.def;
7787 \$CC -shared \$output_objdir/\$soname.def \$libobjs \$deplibs \$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
7788 postinstall_cmds
="base_file=\\\`basename \\\${file}\\\`~
7789 dlpath=\\\`\$SHELL 2>&1 -c '. \$dir/'\\\${base_file}'i;echo \\\$dlname'\\\`~
7790 dldir=\$destdir/\\\`dirname \\\$dlpath\\\`~
7791 test -d \\\$dldir || mkdir -p \\\$dldir~
7792 \$install_prog \$dir/\$dlname \\\$dldir/\$dlname~
7793 chmod a+x \\\$dldir/\$dlname"
7794 postuninstall_cmds
="dldll=\\\`\$SHELL 2>&1 -c '. \$file; echo \\\$dlname'\\\`~
7795 dlpath=\$dir/\\\$dldll~
7798 # Commands used to build a loadable module (assumed same as above if empty)
7800 module_expsym_cmds
=""
7802 # Commands to strip libraries.
7803 old_striplib
="strip --strip-debug"
7804 striplib
="strip --strip-unneeded"
7806 # Dependencies to place before the objects being linked to create a
7810 # Dependencies to place after the objects being linked to create a
7814 # Dependencies to place before the objects being linked to create a
7818 # Dependencies to place after the objects being linked to create a
7822 # The library search path used internally by the compiler when linking
7824 compiler_lib_search_path
=""
7826 # Method to check whether dependent libraries are shared objects.
7827 deplibs_check_method
="file_magic file format pei*-i386(.*architecture: i386)?"
7829 # Command to use when deplibs_check_method == file_magic.
7830 file_magic_cmd
="\$OBJDUMP -f"
7832 # Flag that allows shared libraries with undefined symbols to be built.
7833 allow_undefined_flag
="unsupported"
7835 # Flag that forces no undefined symbols.
7836 no_undefined_flag
=""
7838 # Commands used to finish a libtool library installation in a directory.
7841 # Same as above, but a single script fragment to be evaled but not shown.
7844 # Take the output of nm and produce a listing of raw symbols and C names.
7845 global_symbol_pipe
=""
7847 # Transform the output of nm in a proper C declaration
7848 global_symbol_to_cdecl
=""
7850 # Transform the output of nm in a C name address pair
7851 global_symbol_to_c_name_address
=""
7853 # This is the shared library runtime path variable.
7854 runpath_var
=LD_RUN_PATH
7856 # This is the shared library path variable.
7859 # Is shlibpath searched before the hard-coded library search path?
7860 shlibpath_overrides_runpath
=yes
7862 # How to hardcode a shared library path into an executable.
7863 hardcode_action
=immediate
7865 # Whether we should hardcode library paths into libraries.
7866 hardcode_into_libs
=no
7868 # Flag to hardcode $libdir into a binary during linking.
7869 # This must work even if $libdir does not exist.
7870 hardcode_libdir_flag_spec
="-L\$libdir"
7872 # If ld is used when linking, flag to hardcode $libdir into
7873 # a binary during linking. This must work even if $libdir does
7875 hardcode_libdir_flag_spec_ld
=""
7877 # Whether we need a single -rpath flag with a separated argument.
7878 hardcode_libdir_separator
=""
7880 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7884 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7888 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7889 # the resulting binary.
7890 hardcode_shlibpath_var
=unsupported
7892 # Set to yes if building a shared library automatically hardcodes DIR into the library
7893 # and all subsequent libraries and executables linked against it.
7894 hardcode_automatic
=no
7896 # Variables whose values should be saved in libtool wrapper scripts and
7897 # restored at relink time.
7898 variables_saved_for_relink
="PATH PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7900 # Whether libtool must link a program against all its dependency libraries.
7901 link_all_deplibs
=unknown
7903 # Compile-time system search path for libraries
7904 sys_lib_search_path_spec
=" /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/ /usr/lib/gcc/i686-pc-msys/2.95.3-1/ /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/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/i686-pc-msys/2.95.3-1/ /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib/"
7906 # Run-time system search path for libraries
7907 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
7909 # Fix the shell variable $srcfile for the compiler.
7912 # Set to yes if exported symbols are required.
7913 always_export_symbols
=no
7915 # The commands to list exported symbols.
7916 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED -e '/^[BCDGRS][ ]/s/.*[ ]\\\\([^ ]*\\\\)/\\\\1 DATA/' -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > \$export_symbols"
7918 # The commands to extract the exported symbol list from a shared archive.
7919 extract_expsyms_cmds
=""
7921 # Symbols that should not be listed in the preloaded symbols.
7922 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
7924 # Symbols that must always be exported.
7927 # ### END LIBTOOL TAG CONFIG: F77