3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU spl 0.4.2)
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
10 # This file is part of GNU Libtool:
11 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # This program is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/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 thales:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs
=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc
=no
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes
=no
64 # Whether or not to optimize for fast installation.
69 host=x86_64-redhat-linux-gnu
74 build
=x86_64-redhat-linux-gnu
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?
96 gcc_dir
=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
97 gcc_ver
=`gcc -dumpversion`
102 # The linker used to build libraries.
103 LD
="/usr/bin/ld -m elf_x86_64"
105 # Whether we need hard or soft links.
108 # A BSD-compatible nm program.
111 # A symbol stripping program
114 # Used to examine libraries when file_magic_cmd begins "file"
117 # Used on cygwin: DLL creation program.
120 # Used on cygwin: object dumper.
123 # Used on cygwin: assembler.
126 # The name of the directory that contains temporary libtool files.
129 # How to create reloadable object files.
131 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
133 # How to pass a linker flag through the compiler.
136 # Object file suffix (normally "o").
139 # Old archive suffix (normally "a").
142 # Shared library suffix (normally ".so").
145 # Executable file suffix (normally "").
148 # Additional compiler flags for building library objects.
149 pic_flag
=" -fPIC -DPIC"
152 # What is the maximum length of a command?
155 # Does compiler simultaneously support -c and -o options?
158 # Must we lock files when doing compilation?
161 # Do we need the lib prefix for modules?
164 # Do we need a version for libraries?
167 # Whether dlopen is supported.
168 dlopen_support
=unknown
170 # Whether dlopen of programs is supported.
173 # Whether dlopen of statically linked programs is supported.
174 dlopen_self_static
=unknown
176 # Compiler flag to prevent dynamic linking.
177 link_static_flag
="-static"
179 # Compiler flag to turn off builtin functions.
180 no_builtin_flag
=" -fno-builtin"
182 # Compiler flag to allow reflexive dlopens.
183 export_dynamic_flag_spec
="\${wl}--export-dynamic"
185 # Compiler flag to generate shared objects directly from archives.
186 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
188 # Compiler flag to generate thread-safe objects.
189 thread_safe_flag_spec
=""
191 # Library versioning type.
194 # Format of library name prefix.
195 libname_spec
="lib\$name"
197 # List of archive names. First name is the real one, the rest are links.
198 # The last name is the one that the linker finds with -lNAME.
199 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
201 # The coded name of the library, if different from the real name.
202 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
204 # Commands used to build and install an old-style archive.
206 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
207 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
208 old_postuninstall_cmds
=""
210 # Create an old-style archive from a shared archive.
211 old_archive_from_new_cmds
=""
213 # Create a temporary old-style archive to link instead of a shared archive.
214 old_archive_from_expsyms_cmds
=""
216 # Commands used to build and install a shared archive.
217 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
218 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
219 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
220 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
221 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
223 postuninstall_cmds
=""
225 # Commands used to build a loadable module (assumed same as above if empty)
227 module_expsym_cmds
=""
229 # Commands to strip libraries.
230 old_striplib
="strip --strip-debug"
231 striplib
="strip --strip-unneeded"
233 # Dependencies to place before the objects being linked to create a
235 predep_objects
=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
237 # Dependencies to place after the objects being linked to create a
239 postdep_objects
=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
241 # Dependencies to place before the objects being linked to create a
245 # Dependencies to place after the objects being linked to create a
249 # The library search path used internally by the compiler when linking
251 compiler_lib_search_path
=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
253 # Method to check whether dependent libraries are shared objects.
254 deplibs_check_method
="pass_all"
256 # Command to use when deplibs_check_method == file_magic.
257 file_magic_cmd
="\$MAGIC_CMD"
259 # Flag that allows shared libraries with undefined symbols to be built.
260 allow_undefined_flag
=""
262 # Flag that forces no undefined symbols.
265 # Commands used to finish a libtool library installation in a directory.
266 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
268 # Same as above, but a single script fragment to be evaled but not shown.
271 # Take the output of nm and produce a listing of raw symbols and C names.
272 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
274 # Transform the output of nm in a proper C declaration
275 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
277 # Transform the output of nm in a C name address pair
278 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
280 # This is the shared library runtime path variable.
281 runpath_var
=LD_RUN_PATH
283 # This is the shared library path variable.
284 shlibpath_var
=LD_LIBRARY_PATH
286 # Is shlibpath searched before the hard-coded library search path?
287 shlibpath_overrides_runpath
=no
289 # How to hardcode a shared library path into an executable.
290 hardcode_action
=immediate
292 # Whether we should hardcode library paths into libraries.
293 hardcode_into_libs
=yes
295 # Flag to hardcode $libdir into a binary during linking.
296 # This must work even if $libdir does not exist.
297 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
299 # If ld is used when linking, flag to hardcode $libdir into
300 # a binary during linking. This must work even if $libdir does
302 hardcode_libdir_flag_spec_ld
=""
304 # Whether we need a single -rpath flag with a separated argument.
305 hardcode_libdir_separator
=""
307 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
311 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
315 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
316 # the resulting binary.
317 hardcode_shlibpath_var
=unsupported
319 # Set to yes if building a shared library automatically hardcodes DIR into the library
320 # and all subsequent libraries and executables linked against it.
321 hardcode_automatic
=no
323 # Variables whose values should be saved in libtool wrapper scripts and
324 # restored at relink time.
325 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
327 # Whether libtool must link a program against all its dependency libraries.
328 link_all_deplibs
=unknown
330 # Compile-time system search path for libraries
331 sys_lib_search_path_spec
=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
333 # Run-time system search path for libraries
334 sys_lib_dlsearch_path_spec
="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib "
336 # Fix the shell variable $srcfile for the compiler.
339 # Set to yes if exported symbols are required.
340 always_export_symbols
=no
342 # The commands to list exported symbols.
343 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
345 # The commands to extract the exported symbol list from a shared archive.
346 extract_expsyms_cmds
=""
348 # Symbols that should not be listed in the preloaded symbols.
349 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
351 # Symbols that must always be exported.
354 # ### END LIBTOOL CONFIG
356 # ltmain.sh - Provide generalized library-building support services.
357 # NOTE: Changing this file will not affect anything until you rerun configure.
359 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
360 # Free Software Foundation, Inc.
361 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
363 # This program is free software; you can redistribute it and/or modify
364 # it under the terms of the GNU General Public License as published by
365 # the Free Software Foundation; either version 2 of the License, or
366 # (at your option) any later version.
368 # This program is distributed in the hope that it will be useful, but
369 # WITHOUT ANY WARRANTY; without even the implied warranty of
370 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
371 # General Public License for more details.
373 # You should have received a copy of the GNU General Public License
374 # along with this program; if not, write to the Free Software
375 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
377 # As a special exception to the GNU General Public License, if you
378 # distribute this file as part of a program that contains a
379 # configuration script generated by Autoconf, you may include it under
380 # the same distribution terms that you use for the rest of that program.
384 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
385 # is ksh but when the shell is invoked as "sh" and the current value of
386 # the _XPG environment variable is not equal to 1 (one), the special
387 # positional parameter $0, within a function call, is the name of the
391 # The name of this program:
392 progname
=`echo "$progpath" | $SED $basename`
402 TIMESTAMP
=" (1.1220.2.365 2005/12/18 22:14:06)"
404 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
405 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then
408 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
409 # is contrary to our usage. Disable this feature.
410 alias -g '${1+"$@"}'='"$@"'
413 case `(set -o) 2>/dev/null` in *posix
*) set -o posix
;; esac
416 # Check that we have a working $echo.
417 if test "X$1" = X--no-reexec
; then
418 # Discard the --no-reexec flag, and continue.
420 elif test "X$1" = X--fallback-echo
; then
421 # Avoid inline document here, it may be left over
423 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
424 # Yippee, $echo works!
427 # Restart under the correct shell, and then maybe $echo will work.
428 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
431 if test "X$1" = X--fallback-echo
; then
432 # used as fallback echo
441 help="Try \`$progname --help' for more information."
442 magic
="%%%MAGIC variable%%%"
447 # Sed substitution that helps us do robust quoting. It backslashifies
448 # metacharacters that are still active within double-quoted strings.
449 Xsed
="${SED}"' -e 1s/^X//'
450 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
451 # test EBCDIC or ASCII
452 case `echo X|tr X '\101'` in
453 A
) # ASCII based system
454 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
456 NL2SP
='tr \015\012 \040\040'
458 *) # EBCDIC based system
460 NL2SP
='tr \r\n \100\100'
465 # Only set LANG and LC_ALL to C if already set.
466 # These must not be set unconditionally because not all systems understand
467 # e.g. LANG=C (notably SCO).
468 # We save the old values to restore during execute mode.
469 for lt_var
in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
471 eval "if test \"\${$lt_var+set}\" = set; then
472 save_$lt_var=\$$lt_var
478 # Make sure IFS has a sensible default
483 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
484 $echo "$modename: not configured to build any kind of library" 1>&2
485 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
500 lo2o
="s/\\.lo\$/.${objext}/"
501 o2lo
="s/\\.${objext}\$/.lo/"
505 #####################################
506 # Shell function definitions:
507 # This seems to be the best place for them
509 # func_mktempdir [string]
510 # Make a temporary directory that won't clash with other running
511 # libtool processes, and avoids race conditions if possible. If
512 # given, STRING is the basename for that directory.
515 my_template
="${TMPDIR-/tmp}/${1-$progname}"
517 if test "$run" = ":"; then
518 # Return a directory name, but don't create it in dry-run mode
519 my_tmpdir
="${my_template}-$$"
522 # If mktemp works, use that first and foremost
523 my_tmpdir
=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
525 if test ! -d "$my_tmpdir"; then
526 # Failing that, at least try and use $RANDOM to avoid a race
527 my_tmpdir
="${my_template}-${RANDOM-0}$$"
529 save_mktempdir_umask
=`umask`
532 umask $save_mktempdir_umask
535 # If we're not in dry-run mode, bomb out on failure
536 test -d "$my_tmpdir" ||
{
537 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
542 $echo "X$my_tmpdir" |
$Xsed
546 # func_win32_libid arg
547 # return the library type of file 'arg'
549 # Need a lot of goo to handle *both* DLLs and import libs
550 # Has to be a shell function in order to 'eat' the argument
551 # that is supplied when $file_magic_command is called.
554 win32_libid_type
="unknown"
555 win32_fileres
=`file -L $1 2>/dev/null`
556 case $win32_fileres in
557 *ar\ archive\ import\ library
*) # definitely import
558 win32_libid_type
="x86 archive import"
560 *ar\ archive
*) # could be an import, or static
561 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
562 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
563 win32_nmres
=`eval $NM -f posix -A $1 | \
564 $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
566 import
*) win32_libid_type
="x86 archive import";;
567 *) win32_libid_type
="x86 archive static";;
572 win32_libid_type
="x86 DLL"
574 *executable
*) # but shell scripts are "executable" too...
575 case $win32_fileres in
576 *MS\ Windows\ PE\ Intel
*)
577 win32_libid_type
="x86 DLL"
582 $echo $win32_libid_type
587 # Infer tagged configuration to use if any are available and
588 # if one wasn't chosen via the "--tag" command line option.
589 # Only attempt this if the compiler in the base compile
590 # command doesn't match the default compiler.
591 # arg is usually of the form 'gcc ...'
594 if test -n "$available_tags" && test -z "$tagname"; then
598 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
602 CC_quoted
="$CC_quoted $arg"
605 # Blanks in the command may have been stripped by the calling shell,
606 # but not from the CC environment variable when configure was run.
607 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*) ;;
608 # Blanks at the start of $base_compile will cause this to fail
609 # if we don't check for them as well.
611 for z
in $available_tags; do
612 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev
/null
; then
613 # Evaluate the configuration.
614 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
617 # Double-quote args containing other shell metacharacters.
619 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
623 CC_quoted
="$CC_quoted $arg"
626 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "* |
" $CC_quoted"* |
"$CC_quoted "* |
" `$echo $CC_quoted` "* |
"`$echo $CC_quoted` "*)
627 # The compiler in the base compile command matches
628 # the one in the tagged configuration.
629 # Assume this is the tagged configuration we want.
636 # If $tagname still isn't set, then no tagged configuration
637 # was found and let the user know that the "--tag" command
638 # line option must be used.
639 if test -z "$tagname"; then
640 $echo "$modename: unable to infer tagged configuration"
641 $echo "$modename: specify a tag with \`--tag'" 1>&2
644 # $echo "$modename: using $tagname tagged configuration"
652 # func_extract_an_archive dir oldlib
653 func_extract_an_archive
()
655 f_ex_an_ar_dir
="$1"; shift
656 f_ex_an_ar_oldlib
="$1"
658 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
659 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" ||
exit $?
660 if ($AR t
"$f_ex_an_ar_oldlib" |
sort |
sort -uc >/dev
/null
2>&1); then
663 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
668 # func_extract_archives gentop oldlib ...
669 func_extract_archives
()
671 my_gentop
="$1"; shift
679 $show "${rm}r $my_gentop"
680 $run ${rm}r
"$my_gentop"
681 $show "$mkdir $my_gentop"
682 $run $mkdir "$my_gentop"
684 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
688 for my_xlib
in $my_oldlibs; do
689 # Extract the objects.
691 [\\/]* |
[A-Za-z
]:[\\/]*) my_xabs
="$my_xlib" ;;
692 *) my_xabs
=`pwd`"/$my_xlib" ;;
694 my_xlib
=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
697 case " $extracted_archives " in
699 extracted_serial
=`expr $extracted_serial + 1`
700 my_xlib_u
=lt
$extracted_serial-$my_xlib ;;
704 extracted_archives
="$extracted_archives $my_xlib_u"
705 my_xdir
="$my_gentop/$my_xlib_u"
707 $show "${rm}r $my_xdir"
708 $run ${rm}r
"$my_xdir"
709 $show "$mkdir $my_xdir"
710 $run $mkdir "$my_xdir"
712 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
717 $show "Extracting $my_xabs"
718 # Do not bother doing anything if just a dry run
719 if test -z "$run"; then
720 darwin_orig_dir
=`pwd`
721 cd $my_xdir ||
exit $?
722 darwin_archive
=$my_xabs
724 darwin_base_archive
=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
725 darwin_arches
=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
726 if test -n "$darwin_arches"; then
727 darwin_arches
=`echo "$darwin_arches" | $SED -e 's/.*are://'`
729 $show "$darwin_base_archive has multiple architectures $darwin_arches"
730 for darwin_arch
in $darwin_arches ; do
731 mkdir
-p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
732 lipo
-thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
733 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
734 func_extract_an_archive
"`pwd`" "${darwin_base_archive}"
736 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
737 done # $darwin_arches
738 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
739 darwin_filelist
=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
742 for darwin_file
in $darwin_filelist; do
743 darwin_files
=`find unfat-$$ -name $darwin_file -print | $NL2SP`
744 lipo
-create -output "$darwin_file" $darwin_files
745 done # $darwin_filelist
747 cd "$darwin_orig_dir"
749 cd "$darwin_orig_dir"
750 func_extract_an_archive
"$my_xdir" "$my_xabs"
755 func_extract_an_archive
"$my_xdir" "$my_xabs"
758 my_oldobjs
="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
760 func_extract_archives_result
="$my_oldobjs"
762 # End of Shell function definitions
763 #####################################
766 eval std_shrext
=\"$shrext_cmds\"
770 # Parse our command line options once, thoroughly.
771 while test "$#" -gt 0
777 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
781 # If the previous option needs an argument, assign it.
782 if test -n "$prev"; then
785 execute_dlfiles
="$execute_dlfiles $arg"
789 preserve_args
="${preserve_args}=$arg"
791 # Check whether tagname contains only valid characters
794 $echo "$progname: invalid tag name: $tagname" 1>&2
801 # Don't test for the "default" C tag, as we know, it's there, but
802 # not specially marked.
805 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev
/null
; then
806 taglist
="$taglist $tagname"
807 # Evaluate the configuration.
808 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
810 $echo "$progname: ignoring unknown tag $tagname" 1>&2
825 # Have we seen a non-optional argument yet?
832 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
834 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
835 $echo "This is free software; see the source for copying conditions. There is NO"
836 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
841 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
842 # Now print the configurations for the tags.
843 for tagname
in $taglist; do
844 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
850 $echo "$progname: enabling shell trace mode"
852 preserve_args
="$preserve_args $arg"
861 if test "$build_libtool_libs" = yes; then
862 $echo "enable shared libraries"
864 $echo "disable shared libraries"
866 if test "$build_old_libs" = yes; then
867 $echo "enable static libraries"
869 $echo "disable static libraries"
874 --finish) mode
="finish" ;;
876 --mode) prevopt
="--mode" prev
=mode
;;
877 --mode=*) mode
="$optarg" ;;
879 --preserve-dup-deps) duplicate_deps
="yes" ;;
883 preserve_args
="$preserve_args $arg"
889 preserve_args
="$preserve_args --tag"
892 set tag
"$optarg" ${1+"$@"}
895 preserve_args
="$preserve_args --tag"
904 $echo "$modename: unrecognized option \`$arg'" 1>&2
916 if test -n "$prevopt"; then
917 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
922 case $disable_libs in
926 build_libtool_libs
=no
930 build_old_libs
=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
934 # If this variable is set in any of the actions, the command in it
935 # will be execed at the end. This prevents here-documents from being
936 # left over by shells.
939 if test -z "$show_help"; then
941 # Infer the operation mode.
942 if test -z "$mode"; then
943 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
944 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
946 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
958 *db |
*dbx |
*strace |
*truss
)
968 # If we have no mode, but dlfiles were specified, then do execute mode.
969 test -n "$execute_dlfiles" && mode
=execute
971 # Just use the default operation mode.
972 if test -z "$mode"; then
973 if test -n "$nonopt"; then
974 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
976 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
983 # Only execute mode is allowed to have -dlopen flags.
984 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
985 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
990 # Change the help message to a mode-specific one.
992 help="Try \`$modename --help --mode=$mode' for more information."
994 # These modes are in order of execution frequency so that they run quickly.
996 # libtool compile mode
998 modename
="$modename: compile"
999 # Get the compilation command and the source file.
1001 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
1012 # do not "continue". Instead, add this to base_compile
1024 # Accept any command-line options.
1027 if test -n "$libobj" ; then
1028 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
1035 -static |
-prefer-pic |
-prefer-non-pic)
1046 arg_mode
=arg
# the next one goes into the "base_compile" arg list
1047 continue # The current "srcfile" will either be retained or
1048 ;; # replaced later. I would guess that would be a bug.
1051 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1053 save_ifs
="$IFS"; IFS
=','
1054 for arg
in $args; do
1057 # Double-quote args containing other shell metacharacters.
1058 # Many Bourne shells cannot handle close brackets correctly
1059 # in scan sets, so we specify it separately.
1061 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1065 lastarg
="$lastarg $arg"
1068 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1070 # Add the arguments to base_compile.
1071 base_compile
="$base_compile $lastarg"
1076 # Accept the current argument as the source file.
1077 # The previous "srcfile" becomes the current argument.
1084 esac # case $arg_mode
1086 # Aesthetically quote the previous argument.
1087 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1090 # Double-quote args containing other shell metacharacters.
1091 # Many Bourne shells cannot handle close brackets correctly
1092 # in scan sets, and some SunOS ksh mistreat backslash-escaping
1093 # in scan sets (worked around with variable expansion),
1094 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1095 # at all, so we specify them separately.
1096 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1097 lastarg
="\"$lastarg\""
1101 base_compile
="$base_compile $lastarg"
1106 $echo "$modename: you must specify an argument for -Xcompile"
1110 $echo "$modename: you must specify a target with \`-o'" 1>&2
1114 # Get the name of the library object.
1115 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1119 # Recognize several different file suffixes.
1120 # If the user specifies -o file.o, it is replaced with file.lo
1130 *.class
) xform
=class
;;
1135 *.java
) xform
=java
;;
1139 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1142 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1144 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1149 func_infer_tag
$base_compile
1151 for arg
in $later; do
1170 qlibobj
=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1172 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1173 qlibobj
="\"$qlibobj\"" ;;
1175 test "X$libobj" != "X$qlibobj" \
1176 && $echo "X$libobj" |
grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1177 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1178 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1179 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1180 if test "X$xdir" = "X$obj"; then
1185 lobj
=${xdir}$objdir/$objname
1187 if test -z "$base_compile"; then
1188 $echo "$modename: you must specify a compilation command" 1>&2
1193 # Delete any leftover library objects.
1194 if test "$build_old_libs" = yes; then
1195 removelist
="$obj $lobj $libobj ${libobj}T"
1197 removelist
="$lobj $libobj ${libobj}T"
1200 $run $rm $removelist
1201 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1203 # On Cygwin there's no "real" PIC flag so we must build both object types
1205 cygwin
* | mingw
* | pw32
* | os2
*)
1209 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
1210 # non-PIC code in shared libraries is not supported
1214 # Calculate the filename of the output object if compiler does
1215 # not support -o with -c
1216 if test "$compiler_c_o" = no
; then
1217 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
1218 lockfile
="$output_obj.lock"
1219 removelist
="$removelist $output_obj $lockfile"
1220 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1227 # Lock this critical section if it is needed
1228 # We use this script file to make the link, it avoids creating a new file
1229 if test "$need_locks" = yes; then
1230 until $run ln "$progpath" "$lockfile" 2>/dev
/null
; do
1231 $show "Waiting for $lockfile to be removed"
1234 elif test "$need_locks" = warn
; then
1235 if test -f "$lockfile"; then
1237 *** ERROR, $lockfile exists and contains:
1238 `cat $lockfile 2>/dev/null`
1240 This indicates that another process is trying to use the same
1241 temporary object file, and libtool could not work around it because
1242 your compiler does not support \`-c' and \`-o' together. If you
1243 repeat this compilation, it may succeed, by chance, but you had better
1244 avoid parallel builds (make -j) in this platform, or get a better
1247 $run $rm $removelist
1250 $echo "$srcfile" > "$lockfile"
1253 if test -n "$fix_srcfile_path"; then
1254 eval srcfile
=\"$fix_srcfile_path\"
1256 qsrcfile
=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1258 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1259 qsrcfile
="\"$qsrcfile\"" ;;
1262 $run $rm "$libobj" "${libobj}T"
1264 # Create a libtool object file (analogous to a ".la" file),
1265 # but don't create it if we're doing a dry run.
1266 test -z "$run" && cat > ${libobj}T
<<EOF
1267 # $libobj - a libtool object file
1268 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1270 # Please DO NOT delete this file!
1271 # It is necessary for linking the library.
1273 # Name of the PIC object.
1276 # Only build a PIC object if we are building libtool libraries.
1277 if test "$build_libtool_libs" = yes; then
1278 # Without this assignment, base_compile gets emptied.
1279 fbsd_hideous_sh_bug
=$base_compile
1281 if test "$pic_mode" != no
; then
1282 command="$base_compile $qsrcfile $pic_flag"
1284 # Don't build PIC code
1285 command="$base_compile $qsrcfile"
1288 if test ! -d "${xdir}$objdir"; then
1289 $show "$mkdir ${xdir}$objdir"
1290 $run $mkdir ${xdir}$objdir
1292 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1297 if test -z "$output_obj"; then
1298 # Place PIC objects in $objdir
1299 command="$command -o $lobj"
1302 $run $rm "$lobj" "$output_obj"
1305 if $run eval "$command"; then :
1307 test -n "$output_obj" && $run $rm $removelist
1311 if test "$need_locks" = warn
&&
1312 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1314 *** ERROR, $lockfile contains:
1315 `cat $lockfile 2>/dev/null`
1317 but it should contain:
1320 This indicates that another process is trying to use the same
1321 temporary object file, and libtool could not work around it because
1322 your compiler does not support \`-c' and \`-o' together. If you
1323 repeat this compilation, it may succeed, by chance, but you had better
1324 avoid parallel builds (make -j) in this platform, or get a better
1327 $run $rm $removelist
1331 # Just move the object if needed, then go on to compile the next one
1332 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1333 $show "$mv $output_obj $lobj"
1334 if $run $mv $output_obj $lobj; then :
1337 $run $rm $removelist
1342 # Append the name of the PIC object to the libtool object file.
1343 test -z "$run" && cat >> ${libobj}T
<<EOF
1344 pic_object='$objdir/$objname'
1348 # Allow error messages only from the first compilation.
1349 if test "$suppress_opt" = yes; then
1350 suppress_output
=' >/dev/null 2>&1'
1353 # No PIC object so indicate it doesn't exist in the libtool
1355 test -z "$run" && cat >> ${libobj}T
<<EOF
1361 # Only build a position-dependent object if we build old libraries.
1362 if test "$build_old_libs" = yes; then
1363 if test "$pic_mode" != yes; then
1364 # Don't build PIC code
1365 command="$base_compile $qsrcfile"
1367 command="$base_compile $qsrcfile $pic_flag"
1369 if test "$compiler_c_o" = yes; then
1370 command="$command -o $obj"
1373 # Suppress compiler output if we already did a PIC compilation.
1374 command="$command$suppress_output"
1375 $run $rm "$obj" "$output_obj"
1377 if $run eval "$command"; then :
1379 $run $rm $removelist
1383 if test "$need_locks" = warn
&&
1384 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1386 *** ERROR, $lockfile contains:
1387 `cat $lockfile 2>/dev/null`
1389 but it should contain:
1392 This indicates that another process is trying to use the same
1393 temporary object file, and libtool could not work around it because
1394 your compiler does not support \`-c' and \`-o' together. If you
1395 repeat this compilation, it may succeed, by chance, but you had better
1396 avoid parallel builds (make -j) in this platform, or get a better
1399 $run $rm $removelist
1403 # Just move the object if needed
1404 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1405 $show "$mv $output_obj $obj"
1406 if $run $mv $output_obj $obj; then :
1409 $run $rm $removelist
1414 # Append the name of the non-PIC object the libtool object file.
1415 # Only append if the libtool object file exists.
1416 test -z "$run" && cat >> ${libobj}T
<<EOF
1417 # Name of the non-PIC object.
1418 non_pic_object='$objname'
1422 # Append the name of the non-PIC object the libtool object file.
1423 # Only append if the libtool object file exists.
1424 test -z "$run" && cat >> ${libobj}T
<<EOF
1425 # Name of the non-PIC object.
1431 $run $mv "${libobj}T" "${libobj}"
1433 # Unlock the critical section if it was locked
1434 if test "$need_locks" != no
; then
1435 $run $rm "$lockfile"
1443 modename
="$modename: link"
1445 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1446 # It is impossible to link a dll without this setting, and
1447 # we shouldn't force the makefile maintainer to figure out
1448 # which system we are compiling for in order to pass an extra
1449 # flag for every libtool invocation.
1450 # allow_undefined=no
1452 # FIXME: Unfortunately, there are problems with the above when trying
1453 # to make a dll which has undefined symbols, in which case not
1454 # even a static library is built. For now, we need to specify
1455 # -no-undefined on the libtool link line when we can be certain
1456 # that all symbols are satisfied, otherwise we get a static library.
1463 libtool_args
="$nonopt"
1464 base_compile
="$nonopt $@"
1465 compile_command
="$nonopt"
1466 finalize_command
="$nonopt"
1479 lib_search_path
=`pwd`
1488 export_symbols_regex
=
1496 notinst_path
= # paths that contain not-installed libtool libraries
1497 precious_files_regex
=
1498 prefer_static_libs
=no
1511 func_infer_tag
$base_compile
1513 # We need to know -static, to get the right output filenames.
1517 -all-static |
-static |
-static-libtool-libs)
1520 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1521 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1523 if test -n "$link_static_flag"; then
1524 dlopen_self
=$dlopen_self_static
1526 prefer_static_libs
=yes
1529 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1530 dlopen_self
=$dlopen_self_static
1532 prefer_static_libs
=built
1534 -static-libtool-libs)
1535 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1536 dlopen_self
=$dlopen_self_static
1538 prefer_static_libs
=yes
1541 build_libtool_libs
=no
1548 # See if our shared archives depend on static archives.
1549 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1551 # Go through the arguments, transforming them on the way.
1552 while test "$#" -gt 0; do
1556 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1557 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1561 libtool_args
="$libtool_args $qarg"
1563 # If the previous option needs an argument, assign it.
1564 if test -n "$prev"; then
1567 compile_command
="$compile_command @OUTPUT@"
1568 finalize_command
="$finalize_command @OUTPUT@"
1574 if test "$preload" = no
; then
1575 # Add the symbol object into the linking commands.
1576 compile_command
="$compile_command @SYMFILE@"
1577 finalize_command
="$finalize_command @SYMFILE@"
1581 *.la |
*.lo
) ;; # We handle these cases below.
1583 if test "$dlself" = no
; then
1591 if test "$prev" = dlprefiles
; then
1593 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1603 if test "$prev" = dlfiles
; then
1604 dlfiles
="$dlfiles $arg"
1606 dlprefiles
="$dlprefiles $arg"
1614 export_symbols
="$arg"
1615 if test ! -f "$arg"; then
1616 $echo "$modename: symbol file \`$arg' does not exist"
1623 export_symbols_regex
="$arg"
1628 inst_prefix_dir
="$arg"
1633 precious_files_regex
="$arg"
1643 if test -f "$arg"; then
1646 for fil
in `cat $save_arg`
1648 # moreargs="$moreargs $fil"
1650 # A libtool-controlled object.
1652 # Check to see that this really is a libtool object.
1653 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1658 # If there is no directory component, then add one.
1660 */* |
*\\*) .
$arg ;;
1664 if test -z "$pic_object" || \
1665 test -z "$non_pic_object" ||
1666 test "$pic_object" = none
&& \
1667 test "$non_pic_object" = none
; then
1668 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1672 # Extract subdirectory from the argument.
1673 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1674 if test "X$xdir" = "X$arg"; then
1680 if test "$pic_object" != none
; then
1681 # Prepend the subdirectory the object is found in.
1682 pic_object
="$xdir$pic_object"
1684 if test "$prev" = dlfiles
; then
1685 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1686 dlfiles
="$dlfiles $pic_object"
1690 # If libtool objects are unsupported, then we need to preload.
1695 # CHECK ME: I think I busted this. -Ossama
1696 if test "$prev" = dlprefiles
; then
1697 # Preload the old-style object.
1698 dlprefiles
="$dlprefiles $pic_object"
1703 libobjs
="$libobjs $pic_object"
1708 if test "$non_pic_object" != none
; then
1709 # Prepend the subdirectory the object is found in.
1710 non_pic_object
="$xdir$non_pic_object"
1712 # A standard non-PIC object
1713 non_pic_objects
="$non_pic_objects $non_pic_object"
1714 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1715 arg
="$non_pic_object"
1718 # If the PIC object exists, use it instead.
1719 # $xdir was prepended to $pic_object above.
1720 non_pic_object
="$pic_object"
1721 non_pic_objects
="$non_pic_objects $non_pic_object"
1724 # Only an error if not doing a dry-run.
1725 if test -z "$run"; then
1726 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1731 # Extract subdirectory from the argument.
1732 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1733 if test "X$xdir" = "X$arg"; then
1739 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1740 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1741 libobjs
="$libobjs $pic_object"
1742 non_pic_objects
="$non_pic_objects $non_pic_object"
1747 $echo "$modename: link input file \`$save_arg' does not exist"
1755 # We need an absolute path.
1757 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1759 $echo "$modename: only absolute run-paths are allowed" 1>&2
1763 if test "$prev" = rpath
; then
1766 *) rpath
="$rpath $arg" ;;
1771 *) xrpath
="$xrpath $arg" ;;
1778 compiler_flags
="$compiler_flags $qarg"
1780 compile_command
="$compile_command $qarg"
1781 finalize_command
="$finalize_command $qarg"
1785 linker_flags
="$linker_flags $qarg"
1786 compiler_flags
="$compiler_flags $wl$qarg"
1788 compile_command
="$compile_command $wl$qarg"
1789 finalize_command
="$finalize_command $wl$qarg"
1793 linker_flags
="$linker_flags $qarg"
1794 compiler_flags
="$compiler_flags $qarg"
1796 compile_command
="$compile_command $qarg"
1797 finalize_command
="$finalize_command $qarg"
1805 darwin_framework|darwin_framework_skip
)
1806 test "$prev" = "darwin_framework" && compiler_flags
="$compiler_flags $arg"
1807 compile_command
="$compile_command $arg"
1808 finalize_command
="$finalize_command $arg"
1813 eval "$prev=\"\$arg\""
1818 fi # test -n "$prev"
1824 if test -n "$link_static_flag"; then
1825 compile_command
="$compile_command $link_static_flag"
1826 finalize_command
="$finalize_command $link_static_flag"
1832 # FIXME: remove this flag sometime in the future.
1833 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1857 -export-symbols |
-export-symbols-regex)
1858 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1859 $echo "$modename: more than one -exported-symbols argument is not allowed"
1862 if test "X$arg" = "X-export-symbols"; then
1870 -framework|
-arch|
-isysroot)
1872 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1873 prev
=darwin_framework_skip
;;
1874 *) compiler_flags
="$compiler_flags $arg"
1875 prev
=darwin_framework
;;
1877 compile_command
="$compile_command $arg"
1878 finalize_command
="$finalize_command $arg"
1887 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1888 # so, if we see these flags be careful not to treat them like -L
1890 case $with_gcc/$host in
1891 no
/*-*-irix* |
/*-*-irix*)
1892 compile_command
="$compile_command $arg"
1893 finalize_command
="$finalize_command $arg"
1900 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1901 # We need an absolute path.
1903 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1905 absdir
=`cd "$dir" && pwd`
1906 if test -z "$absdir"; then
1907 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1909 notinst_path
="$notinst_path $dir"
1917 deplibs
="$deplibs -L$dir"
1918 lib_search_path
="$lib_search_path $dir"
1922 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1923 testbindir
=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1924 case :$dllsearchpath: in
1926 *) dllsearchpath
="$dllsearchpath:$dir";;
1928 case :$dllsearchpath: in
1929 *":$testbindir:"*) ;;
1930 *) dllsearchpath
="$dllsearchpath:$testbindir";;
1938 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1940 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-beos*)
1941 # These systems don't actually have a C or math library (as such)
1945 # These systems don't actually have a C library (as such)
1946 test "X$arg" = "X-lc" && continue
1948 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1949 # Do not include libc due to us having libc/libc_r.
1950 test "X$arg" = "X-lc" && continue
1952 *-*-rhapsody* |
*-*-darwin1.
[012])
1953 # Rhapsody C and math libraries are in the System framework
1954 deplibs
="$deplibs -framework System"
1957 *-*-sco3.2v5
* |
*-*-sco5v6*)
1958 # Causes problems with __ctype
1959 test "X$arg" = "X-lc" && continue
1961 *-*-sysv4.2uw2
* |
*-*-sysv5* |
*-*-unixware* |
*-*-OpenUNIX*)
1962 # Compiler inserts libc in the correct place for threads to work
1963 test "X$arg" = "X-lc" && continue
1966 elif test "X$arg" = "X-lc_r"; then
1968 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
1969 # Do not include libc_r directly, use -pthread flag.
1974 deplibs
="$deplibs $arg"
1978 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1979 # classes, name mangling, and exception handling.
1981 compile_command
="$compile_command $arg"
1982 compiler_flags
="$compiler_flags $arg"
1983 finalize_command
="$finalize_command $arg"
1988 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
1989 compiler_flags
="$compiler_flags $arg"
1990 compile_command
="$compile_command $arg"
1991 finalize_command
="$finalize_command $arg"
2000 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2001 # -r[0-9][0-9]* specifies the processor on the SGI compiler
2002 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2003 # +DA*, +DD* enable 64-bit mode on the HP compiler
2004 # -q* pass through compiler args for the IBM compiler
2005 # -m* pass through architecture-specific compiler args for GCC
2006 # -m*, -t[45]*, -txscale* pass through architecture-specific
2007 # compiler args for GCC
2008 # -pg pass through profiling flag for GCC
2009 # @file GCC response files
2010 -64|
-mips[0-9]|
-r[0-9][0-9]*|
-xarch=*|
-xtarget=*|
+DA
*|
+DD
*|
-q*|
-m*|
-pg| \
2011 -t[45]*|
-txscale*|@
*)
2013 # Unknown arguments in both finalize_command and compile_command need
2014 # to be aesthetically quoted because they are evaled later.
2015 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2017 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2021 compile_command
="$compile_command $arg"
2022 finalize_command
="$finalize_command $arg"
2023 compiler_flags
="$compiler_flags $arg"
2039 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
2040 # The PATH hackery in wrapper scripts is required on Windows
2041 # in order for the loader to find any dlls it needs.
2042 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2043 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2046 *) no_install
=yes ;;
2063 -precious-files-regex)
2084 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2085 # We need an absolute path.
2087 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
2089 $echo "$modename: only absolute run-paths are allowed" 1>&2
2095 *) xrpath
="$xrpath $dir" ;;
2100 -static |
-static-libtool-libs)
2101 # The effects of -static are defined in a previous loop.
2102 # We used to do the same as -all-static on platforms that
2103 # didn't have a PIC flag, but the assumption that the effects
2104 # would be equivalent was wrong. It would break on at least
2105 # Digital Unix and AIX.
2125 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2127 save_ifs
="$IFS"; IFS
=','
2128 for flag
in $args; do
2131 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2136 compiler_flags
="$compiler_flags $flag"
2139 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2143 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2145 save_ifs
="$IFS"; IFS
=','
2146 for flag
in $args; do
2149 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2154 compiler_flags
="$compiler_flags $wl$flag"
2155 linker_flags
="$linker_flags $flag"
2158 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
2176 # Some other compiler flag.
2178 # Unknown arguments in both finalize_command and compile_command need
2179 # to be aesthetically quoted because they are evaled later.
2180 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2182 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2189 # A standard object.
2194 # A libtool-controlled object.
2196 # Check to see that this really is a libtool object.
2197 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2202 # If there is no directory component, then add one.
2204 */* |
*\\*) .
$arg ;;
2208 if test -z "$pic_object" || \
2209 test -z "$non_pic_object" ||
2210 test "$pic_object" = none
&& \
2211 test "$non_pic_object" = none
; then
2212 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2216 # Extract subdirectory from the argument.
2217 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2218 if test "X$xdir" = "X$arg"; then
2224 if test "$pic_object" != none
; then
2225 # Prepend the subdirectory the object is found in.
2226 pic_object
="$xdir$pic_object"
2228 if test "$prev" = dlfiles
; then
2229 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2230 dlfiles
="$dlfiles $pic_object"
2234 # If libtool objects are unsupported, then we need to preload.
2239 # CHECK ME: I think I busted this. -Ossama
2240 if test "$prev" = dlprefiles
; then
2241 # Preload the old-style object.
2242 dlprefiles
="$dlprefiles $pic_object"
2247 libobjs
="$libobjs $pic_object"
2252 if test "$non_pic_object" != none
; then
2253 # Prepend the subdirectory the object is found in.
2254 non_pic_object
="$xdir$non_pic_object"
2256 # A standard non-PIC object
2257 non_pic_objects
="$non_pic_objects $non_pic_object"
2258 if test -z "$pic_object" ||
test "$pic_object" = none
; then
2259 arg
="$non_pic_object"
2262 # If the PIC object exists, use it instead.
2263 # $xdir was prepended to $pic_object above.
2264 non_pic_object
="$pic_object"
2265 non_pic_objects
="$non_pic_objects $non_pic_object"
2268 # Only an error if not doing a dry-run.
2269 if test -z "$run"; then
2270 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2275 # Extract subdirectory from the argument.
2276 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2277 if test "X$xdir" = "X$arg"; then
2283 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2284 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2285 libobjs
="$libobjs $pic_object"
2286 non_pic_objects
="$non_pic_objects $non_pic_object"
2293 deplibs
="$deplibs $arg"
2294 old_deplibs
="$old_deplibs $arg"
2299 # A libtool-controlled library.
2301 if test "$prev" = dlfiles
; then
2302 # This library was specified with -dlopen.
2303 dlfiles
="$dlfiles $arg"
2305 elif test "$prev" = dlprefiles
; then
2306 # The library was specified with -dlpreopen.
2307 dlprefiles
="$dlprefiles $arg"
2310 deplibs
="$deplibs $arg"
2315 # Some other compiler argument.
2317 # Unknown arguments in both finalize_command and compile_command need
2318 # to be aesthetically quoted because they are evaled later.
2319 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2321 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2328 # Now actually substitute the argument into the commands.
2329 if test -n "$arg"; then
2330 compile_command
="$compile_command $arg"
2331 finalize_command
="$finalize_command $arg"
2333 done # argument parsing loop
2335 if test -n "$prev"; then
2336 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2341 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2342 eval arg
=\"$export_dynamic_flag_spec\"
2343 compile_command
="$compile_command $arg"
2344 finalize_command
="$finalize_command $arg"
2348 # calculate the name of the file, without its directory
2349 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2350 libobjs_save
="$libobjs"
2352 if test -n "$shlibpath_var"; then
2353 # get the directories listed in $shlibpath_var
2354 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2358 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2359 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2361 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2362 if test "X$output_objdir" = "X$output"; then
2363 output_objdir
="$objdir"
2365 output_objdir
="$output_objdir/$objdir"
2367 # Create the object directory.
2368 if test ! -d "$output_objdir"; then
2369 $show "$mkdir $output_objdir"
2370 $run $mkdir $output_objdir
2372 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2377 # Determine the type of output
2380 $echo "$modename: you must specify an output file" 1>&2
2384 *.
$libext) linkmode
=oldlib
;;
2385 *.lo |
*.
$objext) linkmode
=obj
;;
2386 *.la
) linkmode
=lib
;;
2387 *) linkmode
=prog
;; # Anything else should be a program.
2391 *cygwin
* |
*mingw
* |
*pw32
*)
2392 # don't eliminate duplications in $postdeps and $predeps
2393 duplicate_compiler_generated_deps
=yes
2396 duplicate_compiler_generated_deps
=$duplicate_deps
2402 # Find all interdependent deplibs by searching for libraries
2403 # that are linked more than once (e.g. -la -lb -la)
2404 for deplib
in $deplibs; do
2405 if test "X$duplicate_deps" = "Xyes" ; then
2407 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2410 libs
="$libs $deplib"
2413 if test "$linkmode" = lib
; then
2414 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2416 # Compute libraries that are listed more than once in $predeps
2417 # $postdeps and mark them as special (i.e., whose duplicates are
2418 # not to be eliminated).
2420 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2421 for pre_post_dep
in $predeps $postdeps; do
2422 case "$pre_post_deps " in
2423 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2425 pre_post_deps
="$pre_post_deps $pre_post_dep"
2434 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2435 notinst_deplibs
= # not-installed libtool libraries
2439 for file in $dlfiles $dlprefiles; do
2443 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2455 passes
="conv scan dlopen dlpreopen link"
2460 for pass
in $passes; do
2461 if test "$linkmode,$pass" = "lib,link" ||
2462 test "$linkmode,$pass" = "prog,scan"; then
2466 if test "$linkmode" = prog
; then
2468 dlopen
) libs
="$dlfiles" ;;
2469 dlpreopen
) libs
="$dlprefiles" ;;
2470 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2473 if test "$pass" = dlopen
; then
2474 # Collect dlpreopened libraries
2475 save_deplibs
="$deplibs"
2478 for deplib
in $libs; do
2482 -mt|
-mthreads|
-kthread|
-Kthread|
-pthread|
-pthreads|
--thread-safe)
2483 if test "$linkmode,$pass" = "prog,link"; then
2484 compile_deplibs
="$deplib $compile_deplibs"
2485 finalize_deplibs
="$deplib $finalize_deplibs"
2487 compiler_flags
="$compiler_flags $deplib"
2492 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2493 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2496 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2497 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2498 for search_ext
in .la
$std_shrext .so .a
; do
2499 # Search the libtool library
2500 lib
="$searchdir/lib${name}${search_ext}"
2501 if test -f "$lib"; then
2502 if test "$search_ext" = ".la"; then
2511 if test "$found" != yes; then
2512 # deplib doesn't seem to be a libtool library
2513 if test "$linkmode,$pass" = "prog,link"; then
2514 compile_deplibs
="$deplib $compile_deplibs"
2515 finalize_deplibs
="$deplib $finalize_deplibs"
2517 deplibs
="$deplib $deplibs"
2518 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2521 else # deplib is a libtool library
2522 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2523 # We need to do some special things here, and not later.
2524 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2525 case " $predeps $postdeps " in
2527 if (${SED} -e '2q' $lib |
2528 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2532 */* |
*\\*) .
$lib ;;
2535 for l
in $old_library $library_names; do
2538 if test "X$ll" = "X$old_library" ; then # only static version available
2540 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2541 test "X$ladir" = "X$lib" && ladir
="."
2542 lib
=$ladir/$old_library
2543 if test "$linkmode,$pass" = "prog,link"; then
2544 compile_deplibs
="$deplib $compile_deplibs"
2545 finalize_deplibs
="$deplib $finalize_deplibs"
2547 deplibs
="$deplib $deplibs"
2548 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2562 deplibs
="$deplib $deplibs"
2563 test "$pass" = conv
&& continue
2564 newdependency_libs
="$deplib $newdependency_libs"
2565 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2568 if test "$pass" = conv
; then
2569 deplibs
="$deplib $deplibs"
2572 if test "$pass" = scan
; then
2573 deplibs
="$deplib $deplibs"
2575 compile_deplibs
="$deplib $compile_deplibs"
2576 finalize_deplibs
="$deplib $finalize_deplibs"
2578 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2581 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2587 if test "$pass" = link
; then
2588 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2589 # Make sure the xrpath contains only unique directories.
2592 *) xrpath
="$xrpath $dir" ;;
2595 deplibs
="$deplib $deplibs"
2598 *.la
) lib
="$deplib" ;;
2600 if test "$pass" = conv
; then
2601 deplibs
="$deplib $deplibs"
2607 case $deplibs_check_method in
2609 set dummy
$deplibs_check_method
2610 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2611 if eval $echo \"$deplib\" 2>/dev
/null \
2613 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
2621 if test "$valid_a_lib" != yes; then
2623 $echo "*** Warning: Trying to link with static lib archive $deplib."
2624 $echo "*** I have the capability to make that library automatically link in when"
2625 $echo "*** you link to this library. But I can only do this if you have a"
2626 $echo "*** shared version of the library, which you do not appear to have"
2627 $echo "*** because the file extensions .$libext of this argument makes me believe"
2628 $echo "*** that it is just a static archive that I should not used here."
2631 $echo "*** Warning: Linking the shared library $output against the"
2632 $echo "*** static library $deplib is not portable!"
2633 deplibs
="$deplib $deplibs"
2638 if test "$pass" != link
; then
2639 deplibs
="$deplib $deplibs"
2641 compile_deplibs
="$deplib $compile_deplibs"
2642 finalize_deplibs
="$deplib $finalize_deplibs"
2649 if test "$pass" = conv
; then
2650 deplibs
="$deplib $deplibs"
2651 elif test "$linkmode" = prog
; then
2652 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2653 # If there is no dlopen support or we're linking statically,
2654 # we need to preload.
2655 newdlprefiles
="$newdlprefiles $deplib"
2656 compile_deplibs
="$deplib $compile_deplibs"
2657 finalize_deplibs
="$deplib $finalize_deplibs"
2659 newdlfiles
="$newdlfiles $deplib"
2669 if test "$found" = yes ||
test -f "$lib"; then :
2671 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2675 # Check to see that this really is a libtool archive.
2676 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2678 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2682 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2683 test "X$ladir" = "X$lib" && ladir
="."
2691 # If the library was installed with an old release of libtool,
2692 # it will not redefine variables installed, or shouldnotlink
2700 */* |
*\\*) .
$lib ;;
2704 if test "$linkmode,$pass" = "lib,link" ||
2705 test "$linkmode,$pass" = "prog,scan" ||
2706 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2707 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2708 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2711 if test "$pass" = conv
; then
2712 # Only check for convenience libraries
2713 deplibs
="$lib $deplibs"
2714 if test -z "$libdir"; then
2715 if test -z "$old_library"; then
2716 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2719 # It is a libtool convenience library, so add in its objects.
2720 convenience
="$convenience $ladir/$objdir/$old_library"
2721 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2723 for deplib
in $dependency_libs; do
2724 deplibs
="$deplib $deplibs"
2725 if test "X$duplicate_deps" = "Xyes" ; then
2726 case "$tmp_libs " in
2727 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2730 tmp_libs
="$tmp_libs $deplib"
2732 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2733 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2740 # Get the name of the library we link against.
2742 for l
in $old_library $library_names; do
2745 if test -z "$linklib"; then
2746 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2750 # This library was specified with -dlopen.
2751 if test "$pass" = dlopen
; then
2752 if test -z "$libdir"; then
2753 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2756 if test -z "$dlname" ||
2757 test "$dlopen_support" != yes ||
2758 test "$build_libtool_libs" = no
; then
2759 # If there is no dlname, no dlopen support or we're linking
2760 # statically, we need to preload. We also need to preload any
2761 # dependent libraries so libltdl's deplib preloader doesn't
2762 # bomb out in the load deplibs phase.
2763 dlprefiles
="$dlprefiles $lib $dependency_libs"
2765 newdlfiles
="$newdlfiles $lib"
2770 # We need an absolute path.
2772 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2774 abs_ladir
=`cd "$ladir" && pwd`
2775 if test -z "$abs_ladir"; then
2776 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2777 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2782 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2784 # Find the relevant object directory and library name.
2785 if test "X$installed" = Xyes
; then
2786 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2787 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2795 test "X$hardcode_automatic" = Xyes
&& avoidtemprpath
=yes
2797 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2800 # Remove this search path later
2801 notinst_path
="$notinst_path $abs_ladir"
2803 dir
="$ladir/$objdir"
2804 absdir
="$abs_ladir/$objdir"
2805 # Remove this search path later
2806 notinst_path
="$notinst_path $abs_ladir"
2808 fi # $installed = yes
2809 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2811 # This library was specified with -dlpreopen.
2812 if test "$pass" = dlpreopen
; then
2813 if test -z "$libdir"; then
2814 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2817 # Prefer using a static library (so that no silly _DYNAMIC symbols
2818 # are required to link).
2819 if test -n "$old_library"; then
2820 newdlprefiles
="$newdlprefiles $dir/$old_library"
2821 # Otherwise, use the dlname, so that lt_dlopen finds it.
2822 elif test -n "$dlname"; then
2823 newdlprefiles
="$newdlprefiles $dir/$dlname"
2825 newdlprefiles
="$newdlprefiles $dir/$linklib"
2827 fi # $pass = dlpreopen
2829 if test -z "$libdir"; then
2830 # Link the convenience library
2831 if test "$linkmode" = lib
; then
2832 deplibs
="$dir/$old_library $deplibs"
2833 elif test "$linkmode,$pass" = "prog,link"; then
2834 compile_deplibs
="$dir/$old_library $compile_deplibs"
2835 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2837 deplibs
="$lib $deplibs" # used for prog,scan pass
2843 if test "$linkmode" = prog
&& test "$pass" != link
; then
2844 newlib_search_path
="$newlib_search_path $ladir"
2845 deplibs
="$lib $deplibs"
2848 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2849 test "$build_libtool_libs" = no
; then
2854 for deplib
in $dependency_libs; do
2856 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2858 # Need to link against all dependency_libs?
2859 if test "$linkalldeplibs" = yes; then
2860 deplibs
="$deplib $deplibs"
2862 # Need to hardcode shared library paths
2863 # or/and link against static libraries
2864 newdependency_libs
="$deplib $newdependency_libs"
2866 if test "X$duplicate_deps" = "Xyes" ; then
2867 case "$tmp_libs " in
2868 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2871 tmp_libs
="$tmp_libs $deplib"
2874 fi # $linkmode = prog...
2876 if test "$linkmode,$pass" = "prog,link"; then
2877 if test -n "$library_names" &&
2878 { { test "$prefer_static_libs" = no ||
2879 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2880 test -z "$old_library"; }; then
2881 # We need to hardcode the library path
2882 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2883 # Make sure the rpath contains only unique directories.
2884 case "$temp_rpath " in
2887 *) temp_rpath
="$temp_rpath $absdir" ;;
2891 # Hardcode the library path.
2892 # Skip directories that are in the system default run-time
2894 case " $sys_lib_dlsearch_path " in
2897 case "$compile_rpath " in
2899 *) compile_rpath
="$compile_rpath $absdir"
2903 case " $sys_lib_dlsearch_path " in
2906 case "$finalize_rpath " in
2908 *) finalize_rpath
="$finalize_rpath $libdir"
2912 fi # $linkmode,$pass = prog,link...
2914 if test "$alldeplibs" = yes &&
2915 { test "$deplibs_check_method" = pass_all ||
2916 { test "$build_libtool_libs" = yes &&
2917 test -n "$library_names"; }; }; then
2918 # We only need to search for static libraries
2923 link_static
=no
# Whether the deplib will be linked statically
2924 use_static_libs
=$prefer_static_libs
2925 if test "$use_static_libs" = built
&& test "$installed" = yes ; then
2928 if test -n "$library_names" &&
2929 { test "$use_static_libs" = no ||
test -z "$old_library"; }; then
2930 if test "$installed" = no
; then
2931 notinst_deplibs
="$notinst_deplibs $lib"
2934 # This is a shared library
2936 # Warn about portability, can't link against -module's on
2937 # some systems (darwin)
2938 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2940 if test "$linkmode" = prog
; then
2941 $echo "*** Warning: Linking the executable $output against the loadable module"
2943 $echo "*** Warning: Linking the shared library $output against the loadable module"
2945 $echo "*** $linklib is not portable!"
2947 if test "$linkmode" = lib
&&
2948 test "$hardcode_into_libs" = yes; then
2949 # Hardcode the library path.
2950 # Skip directories that are in the system default run-time
2952 case " $sys_lib_dlsearch_path " in
2955 case "$compile_rpath " in
2957 *) compile_rpath
="$compile_rpath $absdir"
2961 case " $sys_lib_dlsearch_path " in
2964 case "$finalize_rpath " in
2966 *) finalize_rpath
="$finalize_rpath $libdir"
2972 if test -n "$old_archive_from_expsyms_cmds"; then
2973 # figure out the soname
2974 set dummy
$library_names
2977 libname
=`eval \\$echo \"$libname_spec\"`
2978 # use dlname if we got it. it's perfectly good, no?
2979 if test -n "$dlname"; then
2981 elif test -n "$soname_spec"; then
2985 major
=`expr $current - $age`
2989 eval soname
=\"$soname_spec\"
2994 # Make a new name for the extract_expsyms_cmds to use
2996 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2997 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2999 # If the library has no export list, then create one now
3000 if test -f "$output_objdir/$soname-def"; then :
3002 $show "extracting exported symbol list from \`$soname'"
3003 save_ifs
="$IFS"; IFS
='~'
3004 cmds
=$extract_expsyms_cmds
3005 for cmd
in $cmds; do
3009 $run eval "$cmd" ||
exit $?
3015 if test -f "$output_objdir/$newlib"; then :; else
3016 $show "generating import library for \`$soname'"
3017 save_ifs
="$IFS"; IFS
='~'
3018 cmds
=$old_archive_from_expsyms_cmds
3019 for cmd
in $cmds; do
3023 $run eval "$cmd" ||
exit $?
3027 # make sure the library variables are pointing to the new library
3030 fi # test -n "$old_archive_from_expsyms_cmds"
3032 if test "$linkmode" = prog ||
test "$mode" != relink
; then
3037 case $hardcode_action in
3038 immediate | unsupported
)
3039 if test "$hardcode_direct" = no
; then
3042 *-*-sco3.2v5.0.
[024]*) add_dir
="-L$dir" ;;
3043 *-*-sysv4*uw2
*) add_dir
="-L$dir" ;;
3044 *-*-sysv5OpenUNIX* |
*-*-sysv5UnixWare7.
[01].
[10]* | \
3045 *-*-unixware7*) add_dir
="-L$dir" ;;
3047 # if the lib is a module then we can not link against
3048 # it, someone is ignoring the new warnings I added
3049 if /usr
/bin
/file -L $add 2> /dev
/null |
3050 $EGREP ": [^:]* bundle" >/dev
/null
; then
3051 $echo "** Warning, lib $linklib is a module, not a shared library"
3052 if test -z "$old_library" ; then
3054 $echo "** And there doesn't seem to be a static archive available"
3055 $echo "** The link will probably fail, sorry"
3057 add
="$dir/$old_library"
3061 elif test "$hardcode_minus_L" = no
; then
3063 *-*-sunos*) add_shlibpath
="$dir" ;;
3067 elif test "$hardcode_shlibpath_var" = no
; then
3068 add_shlibpath
="$dir"
3075 if test "$hardcode_direct" = yes; then
3077 elif test "$hardcode_minus_L" = yes; then
3079 # Try looking first in the location we're being installed to.
3080 if test -n "$inst_prefix_dir"; then
3083 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3088 elif test "$hardcode_shlibpath_var" = yes; then
3089 add_shlibpath
="$dir"
3098 if test "$lib_linked" != yes; then
3099 $echo "$modename: configuration error: unsupported hardcode properties"
3103 if test -n "$add_shlibpath"; then
3104 case :$compile_shlibpath: in
3105 *":$add_shlibpath:"*) ;;
3106 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
3109 if test "$linkmode" = prog
; then
3110 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
3111 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
3113 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3114 test -n "$add" && deplibs
="$add $deplibs"
3115 if test "$hardcode_direct" != yes && \
3116 test "$hardcode_minus_L" != yes && \
3117 test "$hardcode_shlibpath_var" = yes; then
3118 case :$finalize_shlibpath: in
3120 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3126 if test "$linkmode" = prog ||
test "$mode" = relink
; then
3130 # Finalize command for both is simple: just hardcode it.
3131 if test "$hardcode_direct" = yes; then
3132 add
="$libdir/$linklib"
3133 elif test "$hardcode_minus_L" = yes; then
3136 elif test "$hardcode_shlibpath_var" = yes; then
3137 case :$finalize_shlibpath: in
3139 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
3142 elif test "$hardcode_automatic" = yes; then
3143 if test -n "$inst_prefix_dir" &&
3144 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3145 add
="$inst_prefix_dir$libdir/$linklib"
3147 add
="$libdir/$linklib"
3150 # We cannot seem to hardcode it, guess we'll fake it.
3152 # Try looking first in the location we're being installed to.
3153 if test -n "$inst_prefix_dir"; then
3156 add_dir
="$add_dir -L$inst_prefix_dir$libdir"
3163 if test "$linkmode" = prog
; then
3164 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
3165 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
3167 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
3168 test -n "$add" && deplibs
="$add $deplibs"
3171 elif test "$linkmode" = prog
; then
3172 # Here we assume that one of hardcode_direct or hardcode_minus_L
3173 # is not unsupported. This is valid on all known static and
3175 if test "$hardcode_direct" != unsupported
; then
3176 test -n "$old_library" && linklib
="$old_library"
3177 compile_deplibs
="$dir/$linklib $compile_deplibs"
3178 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
3180 compile_deplibs
="-l$name -L$dir $compile_deplibs"
3181 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
3183 elif test "$build_libtool_libs" = yes; then
3184 # Not a shared library
3185 if test "$deplibs_check_method" != pass_all
; then
3186 # We're trying link a shared library against a static one
3187 # but the system doesn't support it.
3189 # Just print a warning and add the library to dependency_libs so
3190 # that the program can be linked against the static library.
3192 $echo "*** Warning: This system can not link to static lib archive $lib."
3193 $echo "*** I have the capability to make that library automatically link in when"
3194 $echo "*** you link to this library. But I can only do this if you have a"
3195 $echo "*** shared version of the library, which you do not appear to have."
3196 if test "$module" = yes; then
3197 $echo "*** But as you try to build a module library, libtool will still create "
3198 $echo "*** a static module, that should work as long as the dlopening application"
3199 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3200 if test -z "$global_symbol_pipe"; then
3202 $echo "*** However, this would only work if libtool was able to extract symbol"
3203 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3204 $echo "*** not find such a program. So, this module is probably useless."
3205 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3207 if test "$build_old_libs" = no
; then
3208 build_libtool_libs
=module
3211 build_libtool_libs
=no
3215 deplibs
="$dir/$old_library $deplibs"
3218 fi # link shared/static library?
3220 if test "$linkmode" = lib
; then
3221 if test -n "$dependency_libs" &&
3222 { test "$hardcode_into_libs" != yes ||
3223 test "$build_old_libs" = yes ||
3224 test "$link_static" = yes; }; then
3225 # Extract -R from dependency_libs
3227 for libdir
in $dependency_libs; do
3229 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3231 *" $temp_xrpath "*) ;;
3232 *) xrpath
="$xrpath $temp_xrpath";;
3234 *) temp_deplibs
="$temp_deplibs $libdir";;
3237 dependency_libs
="$temp_deplibs"
3240 newlib_search_path
="$newlib_search_path $absdir"
3241 # Link against this library
3242 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
3243 # ... and its dependency_libs
3245 for deplib
in $dependency_libs; do
3246 newdependency_libs
="$deplib $newdependency_libs"
3247 if test "X$duplicate_deps" = "Xyes" ; then
3248 case "$tmp_libs " in
3249 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
3252 tmp_libs
="$tmp_libs $deplib"
3255 if test "$link_all_deplibs" != no
; then
3256 # Add the search paths of all dependency libraries
3257 for deplib
in $dependency_libs; do
3259 -L*) path
="$deplib" ;;
3261 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3262 test "X$dir" = "X$deplib" && dir
="."
3263 # We need an absolute path.
3265 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
3267 absdir
=`cd "$dir" && pwd`
3268 if test -z "$absdir"; then
3269 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3274 if grep "^installed=no" $deplib > /dev
/null
; then
3275 path
="$absdir/$objdir"
3277 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3278 if test -z "$libdir"; then
3279 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3282 if test "$absdir" != "$libdir"; then
3283 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3290 # we do not want to link against static libs,
3291 # but need to link against shared
3292 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3293 if test -n "$deplibrary_names" ; then
3294 for tmp
in $deplibrary_names ; do
3297 if test -f "$path/$depdepl" ; then
3298 depdepl
="$path/$depdepl"
3300 # do not add paths which are already there
3301 case " $newlib_search_path " in
3303 *) newlib_search_path
="$newlib_search_path $path";;
3316 # Again, we only want to link against shared libraries
3317 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3318 for tmp
in $newlib_search_path ; do
3319 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3320 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3331 case " $deplibs " in
3333 *) deplibs
="$path $deplibs" ;;
3335 case " $deplibs " in
3337 *) deplibs
="$depdepl $deplibs" ;;
3340 fi # link_all_deplibs != no
3342 done # for deplib in $libs
3343 dependency_libs
="$newdependency_libs"
3344 if test "$pass" = dlpreopen
; then
3345 # Link the dlpreopened libraries before other libraries
3346 for deplib
in $save_deplibs; do
3347 deplibs
="$deplib $deplibs"
3350 if test "$pass" != dlopen
; then
3351 if test "$pass" != conv
; then
3352 # Make sure lib_search_path contains only unique directories.
3354 for dir
in $newlib_search_path; do
3355 case "$lib_search_path " in
3357 *) lib_search_path
="$lib_search_path $dir" ;;
3363 if test "$linkmode,$pass" != "prog,link"; then
3366 vars
="compile_deplibs finalize_deplibs"
3368 for var
in $vars dependency_libs
; do
3369 # Add libraries to $var in reverse order
3370 eval tmp_libs
=\"\$
$var\"
3372 for deplib
in $tmp_libs; do
3373 # FIXME: Pedantically, this is the right thing to do, so
3374 # that some nasty dependency loop isn't accidentally
3376 #new_libs="$deplib $new_libs"
3377 # Pragmatically, this seems to cause very few problems in
3380 -L*) new_libs
="$deplib $new_libs" ;;
3383 # And here is the reason: when a library appears more
3384 # than once as an explicit dependence of a library, or
3385 # is implicitly linked in more than once by the
3386 # compiler, it is considered special, and multiple
3387 # occurrences thereof are not removed. Compare this
3388 # with having the same library being listed as a
3389 # dependency of multiple other libraries: in this case,
3390 # we know (pedantically, we assume) the library does not
3391 # need to be listed more than once, so we keep only the
3392 # last copy. This is not always right, but it is rare
3393 # enough that we require users that really mean to play
3394 # such unportable linking tricks to link the library
3395 # using -Wl,-lname, so that libtool does not consider it
3396 # for duplicate removal.
3397 case " $specialdeplibs " in
3398 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3400 case " $new_libs " in
3402 *) new_libs
="$deplib $new_libs" ;;
3410 for deplib
in $new_libs; do
3413 case " $tmp_libs " in
3415 *) tmp_libs
="$tmp_libs $deplib" ;;
3418 *) tmp_libs
="$tmp_libs $deplib" ;;
3421 eval $var=\"$tmp_libs\"
3424 # Last step: remove runtime libs from dependency_libs
3425 # (they stay in deplibs)
3427 for i
in $dependency_libs ; do
3428 case " $predeps $postdeps $compiler_lib_search_path " in
3433 if test -n "$i" ; then
3434 tmp_libs
="$tmp_libs $i"
3437 dependency_libs
=$tmp_libs
3439 if test "$linkmode" = prog
; then
3440 dlfiles
="$newdlfiles"
3441 dlprefiles
="$newdlprefiles"
3446 if test -n "$deplibs"; then
3447 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3450 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3451 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3454 if test -n "$rpath"; then
3455 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3458 if test -n "$xrpath"; then
3459 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3462 if test -n "$vinfo"; then
3463 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3466 if test -n "$release"; then
3467 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3470 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3471 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3474 # Now set the variables for building old libraries.
3475 build_libtool_libs
=no
3477 objs
="$objs$old_deplibs"
3481 # Make sure we only generate libraries of the form `libNAME.la'.
3484 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3485 eval shared_ext
=\"$shrext_cmds\"
3486 eval libname
=\"$libname_spec\"
3489 if test "$module" = no
; then
3490 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3494 if test "$need_lib_prefix" != no
; then
3495 # Add the "lib" prefix for modules if required
3496 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3497 eval shared_ext
=\"$shrext_cmds\"
3498 eval libname
=\"$libname_spec\"
3500 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3505 if test -n "$objs"; then
3506 if test "$deplibs_check_method" != pass_all
; then
3507 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3511 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3512 $echo "*** objects $objs is not portable!"
3513 libobjs
="$libobjs $objs"
3517 if test "$dlself" != no
; then
3518 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3522 if test "$#" -gt 2; then
3523 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3528 if test -z "$rpath"; then
3529 if test "$build_libtool_libs" = yes; then
3530 # Building a libtool convenience library.
3531 # Some compilers have problems with a `.al' extension so
3532 # convenience libraries should have the same extension an
3533 # archive normally would.
3534 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3535 build_libtool_libs
=convenience
3539 if test -n "$vinfo"; then
3540 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3543 if test -n "$release"; then
3544 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3548 # Parse the version information argument.
3549 save_ifs
="$IFS"; IFS
=':'
3550 set dummy
$vinfo 0 0 0
3553 if test -n "$8"; then
3554 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3559 # convert absolute version numbers to libtool ages
3560 # this retains compatibility with .la files and attempts
3561 # to make the code below a bit more comprehensible
3563 case $vinfo_number in
3567 number_revision
="$4"
3569 # There are really only two kinds -- those that
3570 # use the current revision as the major version
3571 # and those that subtract age and use age as
3572 # a minor version. But, then there is irix
3573 # which has an extra 1 added just for fun
3575 case $version_type in
3576 darwin|linux|osf|windows|none
)
3577 current
=`expr $number_major + $number_minor`
3579 revision
="$number_revision"
3581 freebsd-aout|freebsd-elf|sunos
)
3582 current
="$number_major"
3583 revision
="$number_minor"
3587 current
=`expr $number_major + $number_minor - 1`
3589 revision
="$number_minor"
3600 # Check that each of the things are valid numbers.
3602 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]) ;;
3604 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3605 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3611 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]) ;;
3613 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3614 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
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: AGE \`$age' must be a nonnegative integer" 1>&2
3623 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3628 if test "$age" -gt "$current"; then
3629 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3630 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3634 # Calculate the version variables.
3638 case $version_type in
3642 # Like Linux, but with the current version available in
3643 # verstring for coding it into the library header
3644 major
=.
`expr $current - $age`
3645 versuffix
="$major.$age.$revision"
3646 # Darwin ld doesn't like 0 for these options...
3647 minor_current
=`expr $current + 1`
3648 verstring
="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3653 versuffix
=".$current.$revision";
3658 versuffix
=".$current";
3662 major
=`expr $current - $age + 1`
3664 case $version_type in
3665 nonstopux
) verstring_prefix
=nonstopux
;;
3666 *) verstring_prefix
=sgi
;;
3668 verstring
="$verstring_prefix$major.$revision"
3670 # Add in all the interfaces that we are compatible with.
3672 while test "$loop" -ne 0; do
3673 iface
=`expr $revision - $loop`
3674 loop
=`expr $loop - 1`
3675 verstring
="$verstring_prefix$major.$iface:$verstring"
3678 # Before this point, $major must not contain `.'.
3680 versuffix
="$major.$revision"
3684 major
=.
`expr $current - $age`
3685 versuffix
="$major.$age.$revision"
3689 major
=.
`expr $current - $age`
3690 versuffix
=".$current.$age.$revision"
3691 verstring
="$current.$age.$revision"
3693 # Add in all the interfaces that we are compatible with.
3695 while test "$loop" -ne 0; do
3696 iface
=`expr $current - $loop`
3697 loop
=`expr $loop - 1`
3698 verstring
="$verstring:${iface}.0"
3701 # Make executables depend on our current version.
3702 verstring
="$verstring:${current}.0"
3707 versuffix
=".$current.$revision"
3711 # Use '-' rather than '.', since we only want one
3712 # extension on DOS 8.3 filesystems.
3713 major
=`expr $current - $age`
3718 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3719 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3724 # Clear the version info if we defaulted, and they specified a release.
3725 if test -z "$vinfo" && test -n "$release"; then
3727 case $version_type in
3729 # we can't check for "0.0" in archive_cmds due to quoting
3730 # problems, so we reset it completely
3737 if test "$need_version" = no
; then
3744 # Remove version info from name if versioning should be avoided
3745 if test "$avoid_version" = yes && test "$need_version" = no
; then
3751 # Check to see if the archive will have undefined symbols.
3752 if test "$allow_undefined" = yes; then
3753 if test "$allow_undefined_flag" = unsupported
; then
3754 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3755 build_libtool_libs
=no
3759 # Don't allow undefined symbols.
3760 allow_undefined_flag
="$no_undefined_flag"
3764 if test "$mode" != relink
; then
3765 # Remove our outputs, but don't remove object files since they
3766 # may have been created when compiling PIC objects.
3768 tempremovelist
=`$echo "$output_objdir/*"`
3769 for p
in $tempremovelist; do
3773 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3774 if test "X$precious_files_regex" != "X"; then
3775 if echo $p |
$EGREP -e "$precious_files_regex" >/dev
/null
2>&1
3780 removelist
="$removelist $p"
3785 if test -n "$removelist"; then
3786 $show "${rm}r $removelist"
3787 $run ${rm}r
$removelist
3791 # Now set the variables for building old libraries.
3792 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3793 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3795 # Transform .lo files to .o files.
3796 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3799 # Eliminate all temporary directories.
3800 # for path in $notinst_path; do
3801 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3802 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3803 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3806 if test -n "$xrpath"; then
3807 # If the user specified any rpath flags, then add them.
3809 for libdir
in $xrpath; do
3810 temp_xrpath
="$temp_xrpath -R$libdir"
3811 case "$finalize_rpath " in
3813 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3816 if test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3817 dependency_libs
="$temp_xrpath $dependency_libs"
3821 # Make sure dlfiles contains only unique files that won't be dlpreopened
3822 old_dlfiles
="$dlfiles"
3824 for lib
in $old_dlfiles; do
3825 case " $dlprefiles $dlfiles " in
3827 *) dlfiles
="$dlfiles $lib" ;;
3831 # Make sure dlprefiles contains only unique files
3832 old_dlprefiles
="$dlprefiles"
3834 for lib
in $old_dlprefiles; do
3835 case "$dlprefiles " in
3837 *) dlprefiles
="$dlprefiles $lib" ;;
3841 if test "$build_libtool_libs" = yes; then
3842 if test -n "$rpath"; then
3844 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3845 # these systems don't actually have a c library (as such)!
3847 *-*-rhapsody* |
*-*-darwin1.
[012])
3848 # Rhapsody C library is in the System framework
3849 deplibs
="$deplibs -framework System"
3852 # Don't link with libc until the a.out ld.so is fixed.
3854 *-*-openbsd* |
*-*-freebsd* |
*-*-dragonfly*)
3855 # Do not include libc due to us having libc/libc_r.
3857 *-*-sco3.2v5
* |
*-*-sco5v6*)
3858 # Causes problems with __ctype
3860 *-*-sysv4.2uw2
* |
*-*-sysv5* |
*-*-unixware* |
*-*-OpenUNIX*)
3861 # Compiler inserts libc in the correct place for threads to work
3864 # Add libc to deplibs on all other systems if necessary.
3865 if test "$build_libtool_need_lc" = "yes"; then
3866 deplibs
="$deplibs -lc"
3872 # Transform deplibs into only deplibs that can be linked in shared.
3874 libname_save
=$libname
3875 release_save
=$release
3876 versuffix_save
=$versuffix
3878 # I'm not sure if I'm treating the release correctly. I think
3879 # release should show up in the -l (ie -lgmp5) so we don't want to
3880 # add it in twice. Is that correct?
3886 case $deplibs_check_method in
3888 # Don't check for shared/static. Everything works.
3889 # This might be a little naive. We might want to check
3890 # whether the library exists or not. But this is on
3891 # osf3 & osf4 and I'm not really sure... Just
3892 # implementing what was already the behavior.
3896 # This code stresses the "libraries are programs" paradigm to its
3897 # limits. Maybe even breaks it. We compile a program, linking it
3898 # against the deplibs as a proxy for the library. Then we can check
3899 # whether they linked in statically or dynamically with ldd.
3901 cat > conftest.c
<<EOF
3902 int main() { return 0; }
3905 if $LTCC $LTCFLAGS -o conftest conftest.c
$deplibs; then
3906 ldd_output
=`ldd conftest`
3907 for i
in $deplibs; do
3908 name
=`expr $i : '-l\(.*\)'`
3909 # If $name is empty we are operating on a -L argument.
3910 if test "$name" != "" && test "$name" != "0"; then
3911 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3912 case " $predeps $postdeps " in
3914 newdeplibs
="$newdeplibs $i"
3919 if test -n "$i" ; then
3920 libname
=`eval \\$echo \"$libname_spec\"`
3921 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3922 set dummy
$deplib_matches
3924 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3925 newdeplibs
="$newdeplibs $i"
3929 $echo "*** Warning: dynamic linker does not accept needed library $i."
3930 $echo "*** I have the capability to make that library automatically link in when"
3931 $echo "*** you link to this library. But I can only do this if you have a"
3932 $echo "*** shared version of the library, which I believe you do not have"
3933 $echo "*** because a test_compile did reveal that the linker did not use it for"
3934 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3938 newdeplibs
="$newdeplibs $i"
3942 # Error occurred in the first compile. Let's try to salvage
3943 # the situation: Compile a separate program for each library.
3944 for i
in $deplibs; do
3945 name
=`expr $i : '-l\(.*\)'`
3946 # If $name is empty we are operating on a -L argument.
3947 if test "$name" != "" && test "$name" != "0"; then
3949 if $LTCC $LTCFLAGS -o conftest conftest.c
$i; then
3950 ldd_output
=`ldd conftest`
3951 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3952 case " $predeps $postdeps " in
3954 newdeplibs
="$newdeplibs $i"
3959 if test -n "$i" ; then
3960 libname
=`eval \\$echo \"$libname_spec\"`
3961 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3962 set dummy
$deplib_matches
3964 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3965 newdeplibs
="$newdeplibs $i"
3969 $echo "*** Warning: dynamic linker does not accept needed library $i."
3970 $echo "*** I have the capability to make that library automatically link in when"
3971 $echo "*** you link to this library. But I can only do this if you have a"
3972 $echo "*** shared version of the library, which you do not appear to have"
3973 $echo "*** because a test_compile did reveal that the linker did not use this one"
3974 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3980 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3981 $echo "*** make it link in! You will probably need to install it or some"
3982 $echo "*** library that it depends on before this library will be fully"
3983 $echo "*** functional. Installing it before continuing would be even better."
3986 newdeplibs
="$newdeplibs $i"
3992 set dummy
$deplibs_check_method
3993 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3994 for a_deplib
in $deplibs; do
3995 name
=`expr $a_deplib : '-l\(.*\)'`
3996 # If $name is empty we are operating on a -L argument.
3997 if test "$name" != "" && test "$name" != "0"; then
3998 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3999 case " $predeps $postdeps " in
4001 newdeplibs
="$newdeplibs $a_deplib"
4006 if test -n "$a_deplib" ; then
4007 libname
=`eval \\$echo \"$libname_spec\"`
4008 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4009 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
4010 for potent_lib
in $potential_libs; do
4011 # Follow soft links.
4012 if ls -lLd "$potent_lib" 2>/dev
/null \
4013 |
grep " -> " >/dev
/null
; then
4016 # The statement above tries to avoid entering an
4017 # endless loop below, in case of cyclic links.
4018 # We might still enter an endless loop, since a link
4019 # loop can be closed while we follow links,
4021 potlib
="$potent_lib"
4022 while test -h "$potlib" 2>/dev
/null
; do
4023 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
4025 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
4026 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4029 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
4031 |
$EGREP "$file_magic_regex" > /dev
/null
; then
4032 newdeplibs
="$newdeplibs $a_deplib"
4039 if test -n "$a_deplib" ; then
4042 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4043 $echo "*** I have the capability to make that library automatically link in when"
4044 $echo "*** you link to this library. But I can only do this if you have a"
4045 $echo "*** shared version of the library, which you do not appear to have"
4046 $echo "*** because I did check the linker path looking for a file starting"
4047 if test -z "$potlib" ; then
4048 $echo "*** with $libname but no candidates were found. (...for file magic test)"
4050 $echo "*** with $libname and none of the candidates passed a file format test"
4051 $echo "*** using a file magic. Last file checked: $potlib"
4055 # Add a -L argument.
4056 newdeplibs
="$newdeplibs $a_deplib"
4058 done # Gone through all deplibs.
4061 set dummy
$deplibs_check_method
4062 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4063 for a_deplib
in $deplibs; do
4064 name
=`expr $a_deplib : '-l\(.*\)'`
4065 # If $name is empty we are operating on a -L argument.
4066 if test -n "$name" && test "$name" != "0"; then
4067 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4068 case " $predeps $postdeps " in
4070 newdeplibs
="$newdeplibs $a_deplib"
4075 if test -n "$a_deplib" ; then
4076 libname
=`eval \\$echo \"$libname_spec\"`
4077 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4078 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
4079 for potent_lib
in $potential_libs; do
4080 potlib
="$potent_lib" # see symlink-check above in file_magic test
4081 if eval $echo \"$potent_lib\" 2>/dev
/null \
4083 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
4084 newdeplibs
="$newdeplibs $a_deplib"
4091 if test -n "$a_deplib" ; then
4094 $echo "*** Warning: linker path does not have real file for library $a_deplib."
4095 $echo "*** I have the capability to make that library automatically link in when"
4096 $echo "*** you link to this library. But I can only do this if you have a"
4097 $echo "*** shared version of the library, which you do not appear to have"
4098 $echo "*** because I did check the linker path looking for a file starting"
4099 if test -z "$potlib" ; then
4100 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4102 $echo "*** with $libname and none of the candidates passed a file format test"
4103 $echo "*** using a regex pattern. Last file checked: $potlib"
4107 # Add a -L argument.
4108 newdeplibs
="$newdeplibs $a_deplib"
4110 done # Gone through all deplibs.
4114 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4115 -e 's/ -[LR][^ ]*//g'`
4116 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4117 for i
in $predeps $postdeps ; do
4118 # can't use Xsed below, because $i might contain '/'
4119 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4122 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
4123 |
grep .
>/dev
/null
; then
4125 if test "X$deplibs_check_method" = "Xnone"; then
4126 $echo "*** Warning: inter-library dependencies are not supported in this platform."
4128 $echo "*** Warning: inter-library dependencies are not known to be supported."
4130 $echo "*** All declared inter-library dependencies are being dropped."
4135 versuffix
=$versuffix_save
4137 release
=$release_save
4138 libname
=$libname_save
4142 *-*-rhapsody* |
*-*-darwin1.
[012])
4143 # On Rhapsody replace the C library is the System framework
4144 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4148 if test "$droppeddeps" = yes; then
4149 if test "$module" = yes; then
4151 $echo "*** Warning: libtool could not satisfy all declared inter-library"
4152 $echo "*** dependencies of module $libname. Therefore, libtool will create"
4153 $echo "*** a static module, that should work as long as the dlopening"
4154 $echo "*** application is linked with the -dlopen flag."
4155 if test -z "$global_symbol_pipe"; then
4157 $echo "*** However, this would only work if libtool was able to extract symbol"
4158 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4159 $echo "*** not find such a program. So, this module is probably useless."
4160 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4162 if test "$build_old_libs" = no
; then
4163 oldlibs
="$output_objdir/$libname.$libext"
4164 build_libtool_libs
=module
4167 build_libtool_libs
=no
4170 $echo "*** The inter-library dependencies that have been dropped here will be"
4171 $echo "*** automatically added whenever a program is linked with this library"
4172 $echo "*** or is declared to -dlopen it."
4174 if test "$allow_undefined" = no
; then
4176 $echo "*** Since this library must not contain undefined symbols,"
4177 $echo "*** because either the platform does not support them or"
4178 $echo "*** it was explicitly requested with -no-undefined,"
4179 $echo "*** libtool will only create a static version of it."
4180 if test "$build_old_libs" = no
; then
4181 oldlibs
="$output_objdir/$libname.$libext"
4182 build_libtool_libs
=module
4185 build_libtool_libs
=no
4190 # Done checking deplibs!
4195 # move library search paths that coincide with paths to not yet
4196 # installed libraries to the beginning of the library search list
4198 for path
in $notinst_path; do
4199 case " $new_libs " in
4200 *" -L$path/$objdir "*) ;;
4202 case " $deplibs " in
4203 *" -L$path/$objdir "*)
4204 new_libs
="$new_libs -L$path/$objdir" ;;
4209 for deplib
in $deplibs; do
4212 case " $new_libs " in
4214 *) new_libs
="$new_libs $deplib" ;;
4217 *) new_libs
="$new_libs $deplib" ;;
4223 # All the library-specific variables (install_libdir is set above).
4228 # Test again, we may have decided not to build it any more
4229 if test "$build_libtool_libs" = yes; then
4230 if test "$hardcode_into_libs" = yes; then
4231 # Hardcode the library paths
4234 rpath
="$finalize_rpath"
4235 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
4236 for libdir
in $rpath; do
4237 if test -n "$hardcode_libdir_flag_spec"; then
4238 if test -n "$hardcode_libdir_separator"; then
4239 if test -z "$hardcode_libdirs"; then
4240 hardcode_libdirs
="$libdir"
4242 # Just accumulate the unique libdirs.
4243 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4244 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4247 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4252 eval flag
=\"$hardcode_libdir_flag_spec\"
4253 dep_rpath
="$dep_rpath $flag"
4255 elif test -n "$runpath_var"; then
4256 case "$perm_rpath " in
4258 *) perm_rpath
="$perm_rpath $libdir" ;;
4262 # Substitute the hardcoded libdirs into the rpath.
4263 if test -n "$hardcode_libdir_separator" &&
4264 test -n "$hardcode_libdirs"; then
4265 libdir
="$hardcode_libdirs"
4266 if test -n "$hardcode_libdir_flag_spec_ld"; then
4267 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
4269 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
4272 if test -n "$runpath_var" && test -n "$perm_rpath"; then
4273 # We should set the runpath_var.
4275 for dir
in $perm_rpath; do
4278 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4280 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
4283 shlibpath
="$finalize_shlibpath"
4284 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
4285 if test -n "$shlibpath"; then
4286 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4289 # Get the real and link names of the library.
4290 eval shared_ext
=\"$shrext_cmds\"
4291 eval library_names
=\"$library_names_spec\"
4292 set dummy
$library_names
4296 if test -n "$soname_spec"; then
4297 eval soname
=\"$soname_spec\"
4301 if test -z "$dlname"; then
4305 lib
="$output_objdir/$realname"
4309 linknames
="$linknames $link"
4312 # Use standard objects if they are pic
4313 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4315 # Prepare the list of exported symbols
4316 if test -z "$export_symbols"; then
4317 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
4318 $show "generating symbol list for \`$libname.la'"
4319 export_symbols
="$output_objdir/$libname.exp"
4320 $run $rm $export_symbols
4321 cmds
=$export_symbols_cmds
4322 save_ifs
="$IFS"; IFS
='~'
4323 for cmd
in $cmds; do
4326 if len
=`expr "X$cmd" : ".*"` &&
4327 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4329 $run eval "$cmd" ||
exit $?
4330 skipped_export
=false
4332 # The command line is too long to execute in one step.
4333 $show "using reloadable object file for export list..."
4335 # Break out early, otherwise skipped_export may be
4336 # set to false by a later but shorter cmd.
4341 if test -n "$export_symbols_regex"; then
4342 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4343 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4344 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4345 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4350 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4351 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4355 for test_deplib
in $deplibs; do
4356 case " $convenience " in
4357 *" $test_deplib "*) ;;
4359 tmp_deplibs
="$tmp_deplibs $test_deplib"
4363 deplibs
="$tmp_deplibs"
4365 if test -n "$convenience"; then
4366 if test -n "$whole_archive_flag_spec"; then
4367 save_libobjs
=$libobjs
4368 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4370 gentop
="$output_objdir/${outputname}x"
4371 generated
="$generated $gentop"
4373 func_extract_archives
$gentop $convenience
4374 libobjs
="$libobjs $func_extract_archives_result"
4378 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4379 eval flag
=\"$thread_safe_flag_spec\"
4380 linker_flags
="$linker_flags $flag"
4383 # Make a backup of the uninstalled library when relinking
4384 if test "$mode" = relink
; then
4385 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4388 # Do each of the archive commands.
4389 if test "$module" = yes && test -n "$module_cmds" ; then
4390 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4391 eval test_cmds
=\"$module_expsym_cmds\"
4392 cmds
=$module_expsym_cmds
4394 eval test_cmds
=\"$module_cmds\"
4398 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4399 eval test_cmds
=\"$archive_expsym_cmds\"
4400 cmds
=$archive_expsym_cmds
4402 eval test_cmds
=\"$archive_cmds\"
4407 if test "X$skipped_export" != "X:" &&
4408 len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4409 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4412 # The command line is too long to link in one step, link piecewise.
4413 $echo "creating reloadable object files..."
4415 # Save the value of $output and $libobjs because we want to
4416 # use them later. If we have whole_archive_flag_spec, we
4417 # want to use save_libobjs as it was before
4418 # whole_archive_flag_spec was expanded, because we can't
4419 # assume the linker understands whole_archive_flag_spec.
4420 # This may have to be revisited, in case too many
4421 # convenience libraries get linked in and end up exceeding
4423 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4424 save_libobjs
=$libobjs
4427 output_la
=`$echo "X$output" | $Xsed -e "$basename"`
4429 # Clear the reloadable object creation command queue and
4430 # initialize k to one.
4437 output
=$output_objdir/$output_la-${k}.
$objext
4438 # Loop over the list of objects to be linked.
4439 for obj
in $save_libobjs
4441 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4442 if test "X$objlist" = X ||
4443 { len
=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4444 test "$len" -le "$max_cmd_len"; }; then
4445 objlist
="$objlist $obj"
4447 # The command $test_cmds is almost too long, add a
4448 # command to the queue.
4449 if test "$k" -eq 1 ; then
4450 # The first file doesn't have a previous command to add.
4451 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4453 # All subsequent reloadable object files will link in
4454 # the last one created.
4455 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4457 last_robj
=$output_objdir/$output_la-${k}.
$objext
4459 output
=$output_objdir/$output_la-${k}.
$objext
4464 # Handle the remaining objects by creating one last
4465 # reloadable object file. All subsequent reloadable object
4466 # files will link in the last one created.
4467 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4468 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4470 if ${skipped_export-false}; then
4471 $show "generating symbol list for \`$libname.la'"
4472 export_symbols
="$output_objdir/$libname.exp"
4473 $run $rm $export_symbols
4475 # Append the command to create the export file.
4476 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4479 # Set up a command to remove the reloadable object files
4480 # after they are used.
4482 while test "$i" -lt "$k"
4485 delfiles
="$delfiles $output_objdir/$output_la-${i}.$objext"
4488 $echo "creating a temporary reloadable object file: $output"
4490 # Loop through the commands generated above and execute them.
4491 save_ifs
="$IFS"; IFS
='~'
4492 for cmd
in $concat_cmds; do
4495 $run eval "$cmd" ||
exit $?
4500 # Restore the value of output.
4503 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4504 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4506 # Expand the library linking commands again to reset the
4507 # value of $libobjs for piecewise linking.
4509 # Do each of the archive commands.
4510 if test "$module" = yes && test -n "$module_cmds" ; then
4511 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4512 cmds
=$module_expsym_cmds
4517 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4518 cmds
=$archive_expsym_cmds
4524 # Append the command to remove the reloadable object files
4525 # to the just-reset $cmds.
4526 eval cmds
=\"\
$cmds~\
$rm $delfiles\"
4528 save_ifs
="$IFS"; IFS
='~'
4529 for cmd
in $cmds; do
4533 $run eval "$cmd" ||
{
4536 # Restore the uninstalled library and exit
4537 if test "$mode" = relink
; then
4538 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4546 # Restore the uninstalled library and exit
4547 if test "$mode" = relink
; then
4548 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4550 if test -n "$convenience"; then
4551 if test -z "$whole_archive_flag_spec"; then
4552 $show "${rm}r $gentop"
4553 $run ${rm}r
"$gentop"
4560 # Create links to the real library.
4561 for linkname
in $linknames; do
4562 if test "$realname" != "$linkname"; then
4563 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4564 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4568 # If -module or -export-dynamic was specified, set the dlname.
4569 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4570 # On all known operating systems, these are identical.
4577 if test -n "$deplibs"; then
4578 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4581 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4582 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4585 if test -n "$rpath"; then
4586 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4589 if test -n "$xrpath"; then
4590 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4593 if test -n "$vinfo"; then
4594 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4597 if test -n "$release"; then
4598 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4603 if test -n "$objs$old_deplibs"; then
4604 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4608 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4616 # Delete the old objects.
4617 $run $rm $obj $libobj
4619 # Objects from convenience libraries. This assumes
4620 # single-version convenience libraries. Whenever we create
4621 # different ones for PIC/non-PIC, this we'll have to duplicate
4625 # reload_cmds runs $LD directly, so let us get rid of
4626 # -Wl from whole_archive_flag_spec and hope we can get by with
4627 # turning comma into space..
4630 if test -n "$convenience"; then
4631 if test -n "$whole_archive_flag_spec"; then
4632 eval tmp_whole_archive_flags
=\"$whole_archive_flag_spec\"
4633 reload_conv_objs
=$reload_objs\
`$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4635 gentop
="$output_objdir/${obj}x"
4636 generated
="$generated $gentop"
4638 func_extract_archives
$gentop $convenience
4639 reload_conv_objs
="$reload_objs $func_extract_archives_result"
4643 # Create the old-style object.
4644 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
4648 save_ifs
="$IFS"; IFS
='~'
4649 for cmd
in $cmds; do
4653 $run eval "$cmd" ||
exit $?
4657 # Exit if we aren't doing a library object file.
4658 if test -z "$libobj"; then
4659 if test -n "$gentop"; then
4660 $show "${rm}r $gentop"
4667 if test "$build_libtool_libs" != yes; then
4668 if test -n "$gentop"; then
4669 $show "${rm}r $gentop"
4673 # Create an invalid libtool object if no PIC, so that we don't
4674 # accidentally link it into a program.
4675 # $show "echo timestamp > $libobj"
4676 # $run eval "echo timestamp > $libobj" || exit $?
4680 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4681 # Only do commands if we really have different PIC objects.
4682 reload_objs
="$libobjs $reload_conv_objs"
4685 save_ifs
="$IFS"; IFS
='~'
4686 for cmd
in $cmds; do
4690 $run eval "$cmd" ||
exit $?
4695 if test -n "$gentop"; then
4696 $show "${rm}r $gentop"
4705 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4707 if test -n "$vinfo"; then
4708 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4711 if test -n "$release"; then
4712 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4715 if test "$preload" = yes; then
4716 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4717 test "$dlopen_self_static" = unknown
; then
4718 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4723 *-*-rhapsody* |
*-*-darwin1.
[012])
4724 # On Rhapsody replace the C library is the System framework
4725 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4726 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4732 # Don't allow lazy linking, it breaks C++ global constructors
4733 if test "$tagname" = CXX
; then
4734 compile_command
="$compile_command ${wl}-bind_at_load"
4735 finalize_command
="$finalize_command ${wl}-bind_at_load"
4741 # move library search paths that coincide with paths to not yet
4742 # installed libraries to the beginning of the library search list
4744 for path
in $notinst_path; do
4745 case " $new_libs " in
4746 *" -L$path/$objdir "*) ;;
4748 case " $compile_deplibs " in
4749 *" -L$path/$objdir "*)
4750 new_libs
="$new_libs -L$path/$objdir" ;;
4755 for deplib
in $compile_deplibs; do
4758 case " $new_libs " in
4760 *) new_libs
="$new_libs $deplib" ;;
4763 *) new_libs
="$new_libs $deplib" ;;
4766 compile_deplibs
="$new_libs"
4769 compile_command
="$compile_command $compile_deplibs"
4770 finalize_command
="$finalize_command $finalize_deplibs"
4772 if test -n "$rpath$xrpath"; then
4773 # If the user specified any rpath flags, then add them.
4774 for libdir
in $rpath $xrpath; do
4775 # This is the magic to use -rpath.
4776 case "$finalize_rpath " in
4778 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4783 # Now hardcode the library paths
4786 for libdir
in $compile_rpath $finalize_rpath; do
4787 if test -n "$hardcode_libdir_flag_spec"; then
4788 if test -n "$hardcode_libdir_separator"; then
4789 if test -z "$hardcode_libdirs"; then
4790 hardcode_libdirs
="$libdir"
4792 # Just accumulate the unique libdirs.
4793 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4794 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4797 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4802 eval flag
=\"$hardcode_libdir_flag_spec\"
4803 rpath
="$rpath $flag"
4805 elif test -n "$runpath_var"; then
4806 case "$perm_rpath " in
4808 *) perm_rpath
="$perm_rpath $libdir" ;;
4812 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4813 testbindir
=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4814 case :$dllsearchpath: in
4816 *) dllsearchpath
="$dllsearchpath:$libdir";;
4818 case :$dllsearchpath: in
4819 *":$testbindir:"*) ;;
4820 *) dllsearchpath
="$dllsearchpath:$testbindir";;
4825 # Substitute the hardcoded libdirs into the rpath.
4826 if test -n "$hardcode_libdir_separator" &&
4827 test -n "$hardcode_libdirs"; then
4828 libdir
="$hardcode_libdirs"
4829 eval rpath
=\" $hardcode_libdir_flag_spec\"
4831 compile_rpath
="$rpath"
4835 for libdir
in $finalize_rpath; do
4836 if test -n "$hardcode_libdir_flag_spec"; then
4837 if test -n "$hardcode_libdir_separator"; then
4838 if test -z "$hardcode_libdirs"; then
4839 hardcode_libdirs
="$libdir"
4841 # Just accumulate the unique libdirs.
4842 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4843 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4846 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4851 eval flag
=\"$hardcode_libdir_flag_spec\"
4852 rpath
="$rpath $flag"
4854 elif test -n "$runpath_var"; then
4855 case "$finalize_perm_rpath " in
4857 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4861 # Substitute the hardcoded libdirs into the rpath.
4862 if test -n "$hardcode_libdir_separator" &&
4863 test -n "$hardcode_libdirs"; then
4864 libdir
="$hardcode_libdirs"
4865 eval rpath
=\" $hardcode_libdir_flag_spec\"
4867 finalize_rpath
="$rpath"
4869 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4870 # Transform all the library objects into standard objects.
4871 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4872 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4876 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4877 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4878 dlsyms
="${outputname}S.c"
4880 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4884 if test -n "$dlsyms"; then
4888 # Discover the nlist of each of the dlfiles.
4889 nlist
="$output_objdir/${outputname}.nm"
4891 $show "$rm $nlist ${nlist}S ${nlist}T"
4892 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4894 # Parse the name list into a source file.
4895 $show "creating $output_objdir/$dlsyms"
4897 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4898 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4899 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4905 /* Prevent the only kind of declaration conflicts we can make. */
4906 #define lt_preloaded_symbols some_other_symbol
4908 /* External symbol declarations for the compiler. */\
4911 if test "$dlself" = yes; then
4912 $show "generating symbol list for \`$output'"
4914 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4916 # Add our own program objects to the symbol list.
4917 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4918 for arg
in $progfiles; do
4919 $show "extracting global C symbols from \`$arg'"
4920 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4923 if test -n "$exclude_expsyms"; then
4924 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4925 $run eval '$mv "$nlist"T "$nlist"'
4928 if test -n "$export_symbols_regex"; then
4929 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4930 $run eval '$mv "$nlist"T "$nlist"'
4933 # Prepare the list of exported symbols
4934 if test -z "$export_symbols"; then
4935 export_symbols
="$output_objdir/$outputname.exp"
4936 $run $rm $export_symbols
4937 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4939 *cygwin
* |
*mingw
* )
4940 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4941 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4945 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4946 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4947 $run eval 'mv "$nlist"T "$nlist"'
4949 *cygwin
* |
*mingw
* )
4950 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4951 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4957 for arg
in $dlprefiles; do
4958 $show "extracting global C symbols from \`$arg'"
4959 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4960 $run eval '$echo ": $name " >> "$nlist"'
4961 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4964 if test -z "$run"; then
4965 # Make sure we have at least an empty file.
4966 test -f "$nlist" ||
: > "$nlist"
4968 if test -n "$exclude_expsyms"; then
4969 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4970 $mv "$nlist"T
"$nlist"
4973 # Try sorting and uniquifying the output.
4974 if grep -v "^: " < "$nlist" |
4975 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4980 uniq > "$nlist"S
; then
4983 grep -v "^: " < "$nlist" > "$nlist"S
4986 if test -f "$nlist"S
; then
4987 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4989 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4992 $echo >> "$output_objdir/$dlsyms" "\
4994 #undef lt_preloaded_symbols
4996 #if defined (__STDC__) && __STDC__
4997 # define lt_ptr void *
4999 # define lt_ptr char *
5003 /* The mapping between symbol names and symbols. */
5007 *cygwin
* |
*mingw
* )
5008 $echo >> "$output_objdir/$dlsyms" "\
5009 /* DATA imports from DLLs on WIN32 can't be const, because
5010 runtime relocations are performed -- see ld's documentation
5016 $echo >> "$output_objdir/$dlsyms" "\
5023 $echo >> "$output_objdir/$dlsyms" "\
5027 lt_preloaded_symbols[] =
5031 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5033 $echo >> "$output_objdir/$dlsyms" "\
5037 /* This works around a problem in FreeBSD linker */
5038 #ifdef FREEBSD_WORKAROUND
5039 static const void *lt_preloaded_setup() {
5040 return lt_preloaded_symbols;
5050 pic_flag_for_symtable
=
5052 # compiling the symbol table file with pic_flag works around
5053 # a FreeBSD bug that causes programs to crash when -lm is
5054 # linked before any other PIC object. But we must not use
5055 # pic_flag when linking with -static. The problem exists in
5056 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5057 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
5058 case "$compile_command " in
5060 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
5063 case "$compile_command " in
5065 *) pic_flag_for_symtable
=" $pic_flag";;
5069 # Now compile the dynamic symbol file.
5070 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5071 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
5073 # Clean up the generated files.
5074 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5075 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5077 # Transform the symbol file into the correct name.
5079 *cygwin
* |
*mingw
* )
5080 if test -f "$output_objdir/${outputname}.def" ; then
5081 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5082 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5084 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5085 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5089 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5090 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5095 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5100 # We keep going just in case the user didn't refer to
5101 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
5102 # really was required.
5104 # Nullify the symbol file.
5105 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5106 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5109 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
5110 # Replace the output file specification.
5111 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5112 link_command
="$compile_command$compile_rpath"
5114 # We have no uninstalled library dependencies, so finalize right now.
5115 $show "$link_command"
5116 $run eval "$link_command"
5119 # Delete the generated files.
5120 if test -n "$dlsyms"; then
5121 $show "$rm $output_objdir/${outputname}S.${objext}"
5122 $run $rm "$output_objdir/${outputname}S.${objext}"
5128 if test -n "$shlibpath_var"; then
5129 # We should set the shlibpath_var
5131 for dir
in $temp_rpath; do
5133 [\\/]* |
[A-Za-z
]:[\\/]*)
5138 # Relative path: add a thisdir entry.
5139 rpath
="$rpath\$thisdir/$dir:"
5146 if test -n "$compile_shlibpath$finalize_shlibpath"; then
5147 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5149 if test -n "$finalize_shlibpath"; then
5150 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5155 if test -n "$runpath_var"; then
5156 if test -n "$perm_rpath"; then
5157 # We should set the runpath_var.
5159 for dir
in $perm_rpath; do
5162 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
5164 if test -n "$finalize_perm_rpath"; then
5165 # We should set the runpath_var.
5167 for dir
in $finalize_perm_rpath; do
5170 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
5174 if test "$no_install" = yes; then
5175 # We don't need to create a wrapper script.
5176 link_command
="$compile_var$compile_command$compile_rpath"
5177 # Replace the output file specification.
5178 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5179 # Delete the old output file.
5181 # Link the executable and exit
5182 $show "$link_command"
5183 $run eval "$link_command" ||
exit $?
5187 if test "$hardcode_action" = relink
; then
5188 # Fast installation is not supported
5189 link_command
="$compile_var$compile_command$compile_rpath"
5190 relink_command
="$finalize_var$finalize_command$finalize_rpath"
5192 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5193 $echo "$modename: \`$output' will be relinked during installation" 1>&2
5195 if test "$fast_install" != no
; then
5196 link_command
="$finalize_var$compile_command$finalize_rpath"
5197 if test "$fast_install" = yes; then
5198 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5200 # fast_install is set to needless
5204 link_command
="$compile_var$compile_command$compile_rpath"
5205 relink_command
="$finalize_var$finalize_command$finalize_rpath"
5209 # Replace the output file specification.
5210 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5212 # Delete the old output files.
5213 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
5215 $show "$link_command"
5216 $run eval "$link_command" ||
exit $?
5218 # Now create the wrapper script.
5219 $show "creating $output"
5221 # Quote the relink command for shipping.
5222 if test -n "$relink_command"; then
5223 # Preserve any variables that may affect compiler behavior
5224 for var
in $variables_saved_for_relink; do
5225 if eval test -z \"\
${$var+set}\"; then
5226 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5227 elif eval var_value
=\$
$var; test -z "$var_value"; then
5228 relink_command
="$var=; export $var; $relink_command"
5230 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5231 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5234 relink_command
="(cd `pwd`; $relink_command)"
5235 relink_command
=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5238 # Quote $echo for shipping.
5239 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5241 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $progpath --fallback-echo";;
5242 *) qecho
="$SHELL `pwd`/$progpath --fallback-echo";;
5244 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5246 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5249 # Only actually do things if our run command is non-null.
5250 if test -z "$run"; then
5251 # win32 will think the script is a binary if it has
5252 # a .exe suffix, so we strip it off here.
5254 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
5256 # test for cygwin because mv fails w/o .exe extensions
5260 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5264 *cygwin
* |
*mingw
* )
5265 output_name
=`basename $output`
5266 output_path
=`dirname $output`
5267 cwrappersource
="$output_path/$objdir/lt-$output_name.c"
5268 cwrapper
="$output_path/$output_name.exe"
5269 $rm $cwrappersource $cwrapper
5270 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5272 cat > $cwrappersource <<EOF
5274 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5275 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5277 The $output program cannot be directly executed until all the libtool
5278 libraries that it depends on are installed.
5280 This wrapper executable should never be moved out of the build directory.
5281 If it is, it will not operate correctly.
5283 Currently, it simply execs the wrapper *script* "/bin/sh $output",
5284 but could eventually absorb all of the scripts functionality and
5285 exec $objdir/$outputname directly.
5288 cat >> $cwrappersource<<"EOF"
5297 #include <sys/stat.h>
5299 #if defined(PATH_MAX)
5300 # define LT_PATHMAX PATH_MAX
5301 #elif defined(MAXPATHLEN)
5302 # define LT_PATHMAX MAXPATHLEN
5304 # define LT_PATHMAX 1024
5307 #ifndef DIR_SEPARATOR
5308 # define DIR_SEPARATOR '/'
5309 # define PATH_SEPARATOR ':'
5312 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5314 # define HAVE_DOS_BASED_FILE_SYSTEM
5315 # ifndef DIR_SEPARATOR_2
5316 # define DIR_SEPARATOR_2 '\\'
5318 # ifndef PATH_SEPARATOR_2
5319 # define PATH_SEPARATOR_2 ';'
5323 #ifndef DIR_SEPARATOR_2
5324 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5325 #else /* DIR_SEPARATOR_2 */
5326 # define IS_DIR_SEPARATOR(ch) \
5327 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5328 #endif /* DIR_SEPARATOR_2 */
5330 #ifndef PATH_SEPARATOR_2
5331 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5332 #else /* PATH_SEPARATOR_2 */
5333 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5334 #endif /* PATH_SEPARATOR_2 */
5336 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5337 #define XFREE(stale) do { \
5338 if (stale) { free ((void *) stale); stale = 0; } \
5341 /* -DDEBUG is fairly common in CFLAGS. */
5343 #if defined DEBUGWRAPPER
5344 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5346 # define DEBUG(format, ...)
5349 const char *program_name = NULL;
5351 void * xmalloc (size_t num);
5352 char * xstrdup (const char *string);
5353 const char * base_name (const char *name);
5354 char * find_executable(const char *wrapper);
5355 int check_executable(const char *path);
5356 char * strendzap(char *str, const char *pat);
5357 void lt_fatal (const char *message, ...);
5360 main (int argc, char *argv[])
5365 program_name = (char *) xstrdup (base_name (argv[0]));
5366 DEBUG("(main) argv[0] : %s\n",argv[0]);
5367 DEBUG("(main) program_name : %s\n",program_name);
5368 newargz = XMALLOC(char *, argc+2);
5371 cat >> $cwrappersource <<EOF
5372 newargz[0] = (char *) xstrdup("$SHELL");
5375 cat >> $cwrappersource <<"EOF"
5376 newargz
[1] = find_executable
(argv
[0]);
5377 if (newargz
[1] == NULL
)
5378 lt_fatal
("Couldn't find %s", argv
[0]);
5379 DEBUG
("(main) found exe at : %s\n",newargz
[1]);
5380 /* we know the
script has the same name
, without the .exe
*/
5381 /* so
make sure newargz
[1] doesn
't end in .exe */
5382 strendzap(newargz[1],".exe");
5383 for (i = 1; i < argc; i++)
5384 newargz[i+1] = xstrdup(argv[i]);
5385 newargz[argc+1] = NULL;
5387 for (i=0; i<argc+1; i++)
5389 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5397 cat >> $cwrappersource <<EOF
5398 execv("$SHELL",(char const **)newargz);
5402 cat >> $cwrappersource <<EOF
5403 execv("$SHELL",newargz);
5408 cat >> $cwrappersource <<"EOF"
5413 xmalloc (size_t num)
5415 void * p = (void *) malloc (num);
5417 lt_fatal ("Memory exhausted");
5423 xstrdup (const char *string)
5425 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5430 base_name (const char *name)
5434 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5435 /* Skip over the disk name in MSDOS pathnames. */
5436 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5440 for (base = name; *name; name++)
5441 if (IS_DIR_SEPARATOR (*name))
5447 check_executable(const char * path)
5451 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5452 if ((!path) || (!*path))
5455 if ((stat (path, &st) >= 0) &&
5457 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5458 #if defined (S_IXOTH)
5459 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5461 #if defined (S_IXGRP)
5462 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5464 ((st.st_mode & S_IXUSR) == S_IXUSR))
5471 /* Searches for the full path of the wrapper. Returns
5472 newly allocated full path name if found, NULL otherwise */
5474 find_executable (const char* wrapper)
5479 /* static buffer for getcwd */
5480 char tmp[LT_PATHMAX + 1];
5484 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5486 if ((wrapper == NULL) || (*wrapper == '\
0'))
5489 /* Absolute path? */
5490 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5491 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5493 concat_name = xstrdup (wrapper);
5494 if (check_executable(concat_name))
5501 if (IS_DIR_SEPARATOR (wrapper[0]))
5503 concat_name = xstrdup (wrapper);
5504 if (check_executable(concat_name))
5508 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5512 for (p = wrapper; *p; p++)
5520 /* no slashes; search PATH */
5521 const char* path = getenv ("PATH");
5524 for (p = path; *p; p = p_next)
5528 for (q = p; *q; q++)
5529 if (IS_PATH_SEPARATOR(*q))
5532 p_next = (*q == '\
0' ? q : q + 1);
5535 /* empty path: current directory */
5536 if (getcwd (tmp, LT_PATHMAX) == NULL)
5537 lt_fatal ("getcwd failed");
5538 tmp_len = strlen(tmp);
5539 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5540 memcpy (concat_name, tmp, tmp_len);
5541 concat_name[tmp_len] = '/';
5542 strcpy (concat_name + tmp_len + 1, wrapper);
5546 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5547 memcpy (concat_name, p, p_len);
5548 concat_name[p_len] = '/';
5549 strcpy (concat_name + p_len + 1, wrapper);
5551 if (check_executable(concat_name))
5556 /* not found in PATH; assume curdir */
5558 /* Relative path | not found in path: prepend cwd */
5559 if (getcwd (tmp, LT_PATHMAX) == NULL)
5560 lt_fatal ("getcwd failed");
5561 tmp_len = strlen(tmp);
5562 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5563 memcpy (concat_name, tmp, tmp_len);
5564 concat_name[tmp_len] = '/';
5565 strcpy (concat_name + tmp_len + 1, wrapper);
5567 if (check_executable(concat_name))
5574 strendzap(char *str, const char *pat)
5578 assert(str != NULL);
5579 assert(pat != NULL);
5582 patlen = strlen(pat);
5586 str += len - patlen;
5587 if (strcmp(str, pat) == 0)
5594 lt_error_core (int exit_status, const char * mode,
5595 const char * message, va_list ap)
5597 fprintf (stderr, "%s: %s: ", program_name, mode);
5598 vfprintf (stderr, message, ap);
5599 fprintf (stderr, ".\n");
5601 if (exit_status >= 0)
5606 lt_fatal (const char *message, ...)
5609 va_start (ap, message);
5610 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5614 # we should really use a build-platform specific compiler
5615 # here, but OTOH, the wrappers (shell script and this C one)
5616 # are only useful if you want to execute the "real" binary.
5617 # Since the "real" binary is built for $host, then this
5618 # wrapper might as well be built for $host, too.
5619 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5623 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5628 # $output - temporary wrapper script for $objdir/$outputname
5629 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5631 # The $output program cannot be directly executed until all the libtool
5632 # libraries that it depends on are installed.
5634 # This wrapper script should never be moved out of the build directory.
5635 # If it is, it will not operate correctly.
5637 # Sed substitution that helps us do robust quoting. It backslashifies
5638 # metacharacters that are still active within double-quoted strings.
5639 Xsed='${SED} -e 1s
/^X
//'
5640 sed_quote_subst='$sed_quote_subst'
5642 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5643 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5646 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5647 # is contrary to our usage. Disable this feature.
5648 alias -g '\
${1+\"\$@\"}'='\"\$@
\"'
5649 setopt NO_GLOB_SUBST
5651 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5654 # The HP-UX ksh and POSIX shell print the target directory to stdout
5656 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5658 relink_command=\"$relink_command\"
5660 # This environment variable determines our operation mode.
5661 if test \"\$libtool_install_magic\" = \"$magic\"; then
5662 # install mode needs the following variable:
5663 notinst_deplibs='$notinst_deplibs'
5665 # When we are sourced in execute mode, \$file and \$echo are already set.
5666 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5669 # Make sure echo works.
5670 if test \"X\$1\" = X--no-reexec; then
5671 # Discard the --no-reexec flag, and continue.
5673 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X
\t'; then
5674 # Yippee, \$echo works!
5677 # Restart under the correct shell, and then maybe \$echo will work.
5678 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5684 # Find the directory that this script lives in.
5685 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's
%/[^
/]*$
%%'\`
5686 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5688 # Follow symbolic links until we get to the real thisdir.
5689 file=\`ls -ld \"\$file\" | ${SED} -n 's
/.
*-> //p
'\`
5690 while test -n \"\$file\"; do
5691 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's
%/[^
/]*\$
%%'\`
5693 # If there was a directory component, then change thisdir.
5694 if test \"x\$destdir\" != \"x\$file\"; then
5695 case \"\$destdir\" in
5696 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5697 *) thisdir=\"\$thisdir/\$destdir\" ;;
5701 file=\`\$echo \"X\$file\" | \$Xsed -e 's
%^.
*/%%'\`
5702 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's
/.
*-> //p
'\`
5705 # Try to get the absolute directory name.
5706 absdir=\`cd \"\$thisdir\" && pwd\`
5707 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5710 if test "$fast_install" = yes; then
5712 program=lt-'$outputname'$exeext
5713 progdir=\"\$thisdir/$objdir\"
5715 if test ! -f \"\$progdir/\$program\" || \\
5716 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5717 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5719 file=\"\$\$-\$program\"
5721 if test ! -d \"\$progdir\"; then
5722 $mkdir \"\$progdir\"
5724 $rm \"\$progdir/\$file\"
5729 # relink executable if necessary
5730 if test -n \"\$relink_command\"; then
5731 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5733 $echo \"\$relink_command_output\" >&2
5734 $rm \"\$progdir/\$file\"
5739 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5740 { $rm \"\$progdir/\$program\";
5741 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5742 $rm \"\$progdir/\$file\"
5746 program='$outputname'
5747 progdir=\"\$thisdir/$objdir\"
5753 if test -f \"\$progdir/\$program\"; then"
5755 # Export our shlibpath_var if we have one.
5756 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5758 # Add our own library path to $shlibpath_var
5759 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5761 # Some systems cannot cope with colon-terminated $shlibpath_var
5762 # The second colon is a workaround for a bug in BeOS R4 sed
5763 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's
/::*\$
//'\`
5765 export $shlibpath_var
5769 # fixup the dll searchpath if we need to.
5770 if test -n "$dllsearchpath"; then
5772 # Add the dll search path components to the executable PATH
5773 PATH=$dllsearchpath:\$PATH
5778 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5779 # Run the actual program with our arguments.
5782 # Backslashes separate directories on plain windows
5783 *-*-mingw | *-*-os2*)
5785 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5791 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5796 \$echo \"\$0: cannot exec \$program \$*\"
5800 # The program doesn't exist.
5801 \
$echo \"\
$0: error
: \\\
`\$progdir/\$program' does not exist\" 1>&2
5802 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5803 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5814 # See if we need to build an old-fashioned archive.
5815 for oldlib in $oldlibs; do
5817 if test "$build_libtool_libs" = convenience; then
5818 oldobjs="$libobjs_save"
5819 addlibs="$convenience"
5820 build_libtool_libs=no
5822 if test "$build_libtool_libs" = module; then
5823 oldobjs="$libobjs_save"
5824 build_libtool_libs=no
5826 oldobjs="$old_deplibs $non_pic_objects"
5828 addlibs="$old_convenience"
5831 if test -n "$addlibs"; then
5832 gentop="$output_objdir/${outputname}x"
5833 generated="$generated $gentop"
5835 func_extract_archives $gentop $addlibs
5836 oldobjs="$oldobjs $func_extract_archives_result"
5839 # Do each command in the archive commands.
5840 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5841 cmds=$old_archive_from_new_cmds
5843 # POSIX demands no paths to be encoded in archives. We have
5844 # to avoid creating archives with duplicate basenames if we
5845 # might have to extract them afterwards, e.g., when creating a
5846 # static archive out of a convenience library, or when linking
5847 # the entirety of a libtool archive into another (currently
5848 # not supported by libtool).
5849 if (for obj in $oldobjs
5851 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5852 done | sort | sort -uc >/dev/null 2>&1); then
5855 $echo "copying selected object files to avoid basename conflicts..."
5857 if test -z "$gentop"; then
5858 gentop="$output_objdir/${outputname}x"
5859 generated="$generated $gentop"
5861 $show "${rm}r $gentop"
5862 $run ${rm}r "$gentop"
5863 $show "$mkdir $gentop"
5864 $run $mkdir "$gentop"
5866 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5871 save_oldobjs=$oldobjs
5874 for obj in $save_oldobjs
5876 objbase=`$echo "X$obj" |
$Xsed -e 's%^.*/%%'`
5877 case " $oldobjs " in
5878 " ") oldobjs=$obj ;;
5881 # Make sure we don't pick an alternate name that also
5883 newobj=lt$counter-$objbase
5884 counter=`expr $counter + 1`
5885 case " $oldobjs " in
5886 *[\ /]"$newobj "*) ;;
5887 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5890 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5891 $run ln "$obj" "$gentop/$newobj" ||
5892 $run cp "$obj" "$gentop/$newobj"
5893 oldobjs="$oldobjs $gentop/$newobj"
5895 *) oldobjs="$oldobjs $obj" ;;
5900 eval cmds=\"$old_archive_cmds\"
5902 if len=`expr "X$cmds" : ".*"` &&
5903 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5904 cmds=$old_archive_cmds
5906 # the command line is too long to link in one step, link in parts
5907 $echo "using piecewise archive linking..."
5912 save_oldobjs=$oldobjs
5914 # Is there a better way of finding the last object in the list?
5915 for obj in $save_oldobjs
5919 for obj in $save_oldobjs
5921 oldobjs="$objlist $obj"
5922 objlist="$objlist $obj"
5923 eval test_cmds=\"$old_archive_cmds\"
5924 if len=`expr "X$test_cmds" : ".*" 2>/dev
/null
` &&
5925 test "$len" -le "$max_cmd_len"; then
5928 # the above command should be used before it gets too long
5930 if test "$obj" = "$last_oldobj" ; then
5933 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5934 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5940 if test "X$oldobjs" = "X" ; then
5941 eval cmds=\"\$concat_cmds\"
5943 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5947 save_ifs="$IFS"; IFS='~'
5948 for cmd in $cmds; do
5952 $run eval "$cmd" || exit $?
5957 if test -n "$generated"; then
5958 $show "${rm}r$generated"
5959 $run ${rm}r$generated
5962 # Now create the libtool archive.
5966 test "$build_old_libs" = yes && old_library="$libname.$libext"
5967 $show "creating $output"
5969 # Preserve any variables that may affect compiler behavior
5970 for var in $variables_saved_for_relink; do
5971 if eval test -z \"\${$var+set}\"; then
5972 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5973 elif eval var_value=\$$var; test -z "$var_value"; then
5974 relink_command="$var=; export $var; $relink_command"
5976 var_value=`$echo "X$var_value" |
$Xsed -e "$sed_quote_subst"`
5977 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5980 # Quote the link command for shipping.
5981 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5982 relink_command=`$echo "X$relink_command" |
$SP2NL |
$Xsed -e "$sed_quote_subst" |
$NL2SP`
5983 if test "$hardcode_automatic" = yes ; then
5988 # Only create the output if not a dry run.
5989 if test -z "$run"; then
5990 for installed in no yes; do
5991 if test "$installed" = yes; then
5992 if test -z "$install_libdir"; then
5995 output="$output_objdir/$outputname"i
5996 # Replace all uninstalled libtool libraries with the installed ones
5998 for deplib in $dependency_libs; do
6001 name=`$echo "X$deplib" |
$Xsed -e 's%^.*/%%'`
6002 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6003 if test -z "$libdir"; then
6004 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6007 newdependency_libs="$newdependency_libs $libdir/$name"
6009 *) newdependency_libs="$newdependency_libs $deplib" ;;
6012 dependency_libs="$newdependency_libs"
6014 for lib in $dlfiles; do
6015 name=`$echo "X$lib" | $Xsed -e 's
%^.
*/%%'`
6016 eval libdir=`${SED} -n -e 's
/^libdir
=\
(.
*\
)$
/\
1/p
' $lib`
6017 if test -z "$libdir"; then
6018 $echo "$modename: \`$lib' is not a valid libtool archive
" 1>&2
6021 newdlfiles="$newdlfiles $libdir/$name"
6023 dlfiles="$newdlfiles"
6025 for lib in $dlprefiles; do
6026 name=`$echo "X
$lib" | $Xsed -e 's%^.*/%%'`
6027 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6028 if test -z "$libdir"; then
6029 $echo "$modename: \
`$lib' is not a valid libtool archive" 1>&2
6032 newdlprefiles="$newdlprefiles $libdir/$name"
6034 dlprefiles="$newdlprefiles"
6037 for lib in $dlfiles; do
6039 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6040 *) abs=`pwd`"/$lib" ;;
6042 newdlfiles="$newdlfiles $abs"
6044 dlfiles="$newdlfiles"
6046 for lib in $dlprefiles; do
6048 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6049 *) abs=`pwd`"/$lib" ;;
6051 newdlprefiles="$newdlprefiles $abs"
6053 dlprefiles="$newdlprefiles"
6056 # place dlname in correct position for cygwin
6058 case $host,$output,$installed,$module,$dlname in
6059 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6062 # $outputname - a libtool library file
6063 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6065 # Please DO NOT delete this file!
6066 # It is necessary for linking the library.
6068 # The name that we can dlopen(3).
6071 # Names of this library.
6072 library_names='$library_names'
6074 # The name of the static archive.
6075 old_library='$old_library'
6077 # Libraries that this one depends upon.
6078 dependency_libs='$dependency_libs'
6080 # Version information for $libname.
6085 # Is this an already installed library?
6086 installed=$installed
6088 # Should we warn about portability when linking against -modules?
6089 shouldnotlink=$module
6091 # Files to dlopen/dlpreopen
6093 dlpreopen='$dlprefiles'
6095 # Directory that this library needs to be installed in:
6096 libdir='$install_libdir'"
6097 if test "$installed" = no && test "$need_relink" = yes; then
6099 relink_command=\"$relink_command\""
6104 # Do a symbolic link so that the libtool archive can be found in
6105 # LD_LIBRARY_PATH before the program is installed.
6106 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6107 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6113 # libtool install mode
6115 modename="$modename: install"
6117 # There may be an optional sh(1) argument at the beginning of
6118 # install_prog (especially on Windows NT).
6119 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6120 # Allow the use of GNU shtool's install command.
6121 $echo "X$nonopt" | grep shtool > /dev/null; then
6122 # Aesthetically quote it.
6123 arg=`$echo "X$nonopt" |
$Xsed -e "$sed_quote_subst"`
6125 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6129 install_prog="$arg "
6137 # The real first argument should be the name of the installation program.
6138 # Aesthetically quote it.
6139 arg=`$echo "X$arg" |
$Xsed -e "$sed_quote_subst"`
6141 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6145 install_prog="$install_prog$arg"
6147 # We need to accept at least all the BSD install flags.
6157 if test -n "$dest"; then
6158 files="$files $dest"
6166 case " $install_prog " in
6171 -g | -m | -o) prev=$arg ;;
6179 # If the previous option needed an argument, then skip it.
6180 if test -n "$prev"; then
6189 # Aesthetically quote the argument.
6190 arg=`$echo "X$arg" |
$Xsed -e "$sed_quote_subst"`
6192 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6196 install_prog="$install_prog $arg"
6199 if test -z "$install_prog"; then
6200 $echo "$modename: you must specify an install program" 1>&2
6205 if test -n "$prev"; then
6206 $echo "$modename: the \`$prev' option requires an argument" 1>&2
6211 if test -z "$files"; then
6212 if test -z "$dest"; then
6213 $echo "$modename: no file or destination specified" 1>&2
6215 $echo "$modename: you must specify a destination" 1>&2
6221 # Strip any trailing slash from the destination.
6222 dest=`$echo "X$dest" | $Xsed -e 's
%/$
%%'`
6224 # Check to see that the destination is a directory.
6225 test -d "$dest" && isdir=yes
6226 if test "$isdir" = yes; then
6230 destdir=`$echo "X$dest" | $Xsed -e 's
%/[^
/]*$
%%'`
6231 test "X$destdir" = "X$dest" && destdir=.
6232 destname=`$echo "X$dest" | $Xsed -e 's
%^.
*/%%'`
6234 # Not a directory, so check to see that there is only one file specified.
6236 if test "$#" -gt 2; then
6237 $echo "$modename: \`$dest' is not a directory
" 1>&2
6243 [\\/]* | [A-Za-z]:[\\/]*) ;;
6245 for file in $files; do
6249 $echo "$modename: \
`$destdir' must be an absolute directory name" 1>&2
6258 # This variable tells wrapper scripts just to set variables rather
6259 # than running their programs.
6260 libtool_install_magic="$magic"
6265 for file in $files; do
6267 # Do each installation.
6270 # Do the static libraries later.
6271 staticlibs="$staticlibs $file"
6275 # Check to see that this really is a libtool archive.
6276 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6278 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6286 # If there is no directory component, then add one.
6288 */* | *\\*) . $file ;;
6292 # Add the libdir to current_libdirs if it is the destination.
6293 if test "X$destdir" = "X$libdir"; then
6294 case "$current_libdirs " in
6296 *) current_libdirs="$current_libdirs $libdir" ;;
6299 # Note the libdir as a future libdir.
6300 case "$future_libdirs " in
6302 *) future_libdirs="$future_libdirs $libdir" ;;
6306 dir=`$echo "X$file" | $Xsed -e 's
%/[^
/]*$
%%'`/
6307 test "X$dir" = "X$file/" && dir=
6310 if test -n "$relink_command"; then
6311 # Determine the prefix the user has applied to our future dir.
6312 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6314 # Don't allow the user to place us outside of our expected
6315 # location b/c this prevents finding dependent libraries that
6316 # are installed to the same prefix.
6317 # At present, this check doesn't affect windows .dll's that
6318 # are installed into $libdir/../bin (currently, that works fine)
6319 # but it's something to keep an eye on.
6320 if test "$inst_prefix_dir" = "$destdir"; then
6321 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6325 if test -n "$inst_prefix_dir"; then
6326 # Stick the inst_prefix_dir data into the link command.
6327 relink_command
=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6329 relink_command
=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6332 $echo "$modename: warning: relinking \`$file'" 1>&2
6333 $show "$relink_command"
6334 if $run eval "$relink_command"; then :
6336 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6341 # See the names of the shared library.
6342 set dummy
$library_names
6343 if test -n "$2"; then
6349 test -n "$relink_command" && srcname
="$realname"T
6351 # Install the shared library and build the symlinks.
6352 $show "$install_prog $dir/$srcname $destdir/$realname"
6353 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
6354 if test -n "$stripme" && test -n "$striplib"; then
6355 $show "$striplib $destdir/$realname"
6356 $run eval "$striplib $destdir/$realname" ||
exit $?
6359 if test "$#" -gt 0; then
6360 # Delete the old symlinks, and create new ones.
6361 # Try `ln -sf' first, because the `ln' binary might depend on
6362 # the symlink we replace! Solaris /bin/ln does not understand -f,
6363 # so we also need to try rm && ln -s.
6366 if test "$linkname" != "$realname"; then
6367 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6368 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6373 # Do each command in the postinstall commands.
6374 lib
="$destdir/$realname"
6375 cmds
=$postinstall_cmds
6376 save_ifs
="$IFS"; IFS
='~'
6377 for cmd
in $cmds; do
6381 $run eval "$cmd" ||
{
6384 # Restore the uninstalled library and exit
6385 if test "$mode" = relink
; then
6386 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6395 # Install the pseudo-library for information purposes.
6396 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6397 instname
="$dir/$name"i
6398 $show "$install_prog $instname $destdir/$name"
6399 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
6401 # Maybe install the static library, too.
6402 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
6406 # Install (i.e. copy) a libtool object.
6408 # Figure out destination file name, if it wasn't already specified.
6409 if test -n "$destname"; then
6410 destfile
="$destdir/$destname"
6412 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6413 destfile
="$destdir/$destfile"
6416 # Deduce the name of the destination old-style object file.
6419 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6422 staticdest
="$destfile"
6426 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6432 # Install the libtool object if requested.
6433 if test -n "$destfile"; then
6434 $show "$install_prog $file $destfile"
6435 $run eval "$install_prog $file $destfile" ||
exit $?
6438 # Install the old object if enabled.
6439 if test "$build_old_libs" = yes; then
6440 # Deduce the name of the old-style object file.
6441 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
6443 $show "$install_prog $staticobj $staticdest"
6444 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
6450 # Figure out destination file name, if it wasn't already specified.
6451 if test -n "$destname"; then
6452 destfile
="$destdir/$destname"
6454 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6455 destfile
="$destdir/$destfile"
6458 # If the file is missing, and there is a .exe on the end, strip it
6459 # because it is most likely a libtool script we actually want to
6464 if test ! -f "$file"; then
6465 file=`$echo $file|${SED} 's,.exe$,,'`
6471 # Do a test to see if this is really a libtool program.
6474 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
6480 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
6484 # Note that it is not necessary on cygwin/mingw to append a dot to
6485 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6486 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6487 # `FILE.' does not work on cygwin managed mounts.
6489 # If there is no directory component, then add one.
6491 */* |
*\\*) .
${wrapper} ;;
6492 *) . .
/${wrapper} ;;
6495 # Check the variables that should have been set.
6496 if test -z "$notinst_deplibs"; then
6497 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6502 for lib
in $notinst_deplibs; do
6503 # Check to see that each library is installed.
6505 if test -f "$lib"; then
6506 # If there is no directory component, then add one.
6508 */* |
*\\*) .
$lib ;;
6512 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6513 if test -n "$libdir" && test ! -f "$libfile"; then
6514 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6520 # Note that it is not necessary on cygwin/mingw to append a dot to
6521 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6522 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6523 # `FILE.' does not work on cygwin managed mounts.
6525 # If there is no directory component, then add one.
6527 */* |
*\\*) .
${wrapper} ;;
6528 *) . .
/${wrapper} ;;
6532 if test "$fast_install" = no
&& test -n "$relink_command"; then
6533 if test "$finalize" = yes && test -z "$run"; then
6534 tmpdir
=`func_mktempdir`
6535 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6536 outputname
="$tmpdir/$file"
6537 # Replace the output file specification.
6538 relink_command
=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6540 $show "$relink_command"
6541 if $run eval "$relink_command"; then :
6543 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6549 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6552 # Install the binary that we compiled earlier.
6553 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6557 # remove .exe since cygwin /usr/bin/install will append another
6559 case $install_prog,$host in
6560 */usr
/bin
/install*,*cygwin
*)
6561 case $file:$destfile in
6566 destfile
=$destfile.exe
6569 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6574 $show "$install_prog$stripme $file $destfile"
6575 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6576 test -n "$outputname" && ${rm}r
"$tmpdir"
6581 for file in $staticlibs; do
6582 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6584 # Set up the ranlib parameters.
6585 oldlib
="$destdir/$name"
6587 $show "$install_prog $file $oldlib"
6588 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6590 if test -n "$stripme" && test -n "$old_striplib"; then
6591 $show "$old_striplib $oldlib"
6592 $run eval "$old_striplib $oldlib" ||
exit $?
6595 # Do each command in the postinstall commands.
6596 cmds
=$old_postinstall_cmds
6597 save_ifs
="$IFS"; IFS
='~'
6598 for cmd
in $cmds; do
6602 $run eval "$cmd" ||
exit $?
6607 if test -n "$future_libdirs"; then
6608 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6611 if test -n "$current_libdirs"; then
6612 # Maybe just do a dry run.
6613 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6614 exec_cmd
='$SHELL $progpath $preserve_args --finish$current_libdirs'
6620 # libtool finish mode
6622 modename
="$modename: finish"
6626 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6629 libdirs
="$libdirs $dir"
6632 for libdir
in $libdirs; do
6633 if test -n "$finish_cmds"; then
6634 # Do each command in the finish commands.
6636 save_ifs
="$IFS"; IFS
='~'
6637 for cmd
in $cmds; do
6641 $run eval "$cmd" || admincmds
="$admincmds
6646 if test -n "$finish_eval"; then
6647 # Do the single finish_eval.
6648 eval cmds
=\"$finish_eval\"
6649 $run eval "$cmds" || admincmds
="$admincmds
6655 # Exit here if they wanted silent mode.
6656 test "$show" = : && exit $EXIT_SUCCESS
6658 $echo "X----------------------------------------------------------------------" |
$Xsed
6659 $echo "Libraries have been installed in:"
6660 for libdir
in $libdirs; do
6664 $echo "If you ever happen to want to link against installed libraries"
6665 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6666 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6667 $echo "flag during linking and do at least one of the following:"
6668 if test -n "$shlibpath_var"; then
6669 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6670 $echo " during execution"
6672 if test -n "$runpath_var"; then
6673 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6674 $echo " during linking"
6676 if test -n "$hardcode_libdir_flag_spec"; then
6678 eval flag
=\"$hardcode_libdir_flag_spec\"
6680 $echo " - use the \`$flag' linker flag"
6682 if test -n "$admincmds"; then
6683 $echo " - have your system administrator run these commands:$admincmds"
6685 if test -f /etc
/ld.so.conf
; then
6686 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6689 $echo "See any operating system documentation about shared libraries for"
6690 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6691 $echo "X----------------------------------------------------------------------" |
$Xsed
6695 # libtool execute mode
6697 modename
="$modename: execute"
6699 # The first argument is the command name.
6701 if test -z "$cmd"; then
6702 $echo "$modename: you must specify a COMMAND" 1>&2
6707 # Handle -dlopen flags immediately.
6708 for file in $execute_dlfiles; do
6709 if test ! -f "$file"; then
6710 $echo "$modename: \`$file' is not a file" 1>&2
6718 # Check to see that this really is a libtool archive.
6719 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6721 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6726 # Read the libtool library.
6730 # If there is no directory component, then add one.
6732 */* |
*\\*) .
$file ;;
6736 # Skip this library if it cannot be dlopened.
6737 if test -z "$dlname"; then
6738 # Warn if it was a shared library.
6739 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6743 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6744 test "X$dir" = "X$file" && dir
=.
6746 if test -f "$dir/$objdir/$dlname"; then
6749 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6755 # Just add the directory containing the .lo file.
6756 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6757 test "X$dir" = "X$file" && dir
=.
6761 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6766 # Get the absolute pathname.
6767 absdir
=`cd "$dir" && pwd`
6768 test -n "$absdir" && dir
="$absdir"
6770 # Now add the directory to shlibpath_var.
6771 if eval "test -z \"\$$shlibpath_var\""; then
6772 eval "$shlibpath_var=\"\$dir\""
6774 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6778 # This variable tells wrapper scripts just to set shlibpath_var
6779 # rather than running their programs.
6780 libtool_execute_magic
="$magic"
6782 # Check if any of the arguments is a wrapper script.
6789 # Do a test to see if this is really a libtool program.
6790 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6791 # If there is no directory component, then add one.
6793 */* |
*\\*) .
$file ;;
6797 # Transform arg to wrapped name.
6798 file="$progdir/$program"
6802 # Quote arguments (to preserve shell metacharacters).
6803 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6804 args
="$args \"$file\""
6807 if test -z "$run"; then
6808 if test -n "$shlibpath_var"; then
6809 # Export the shlibpath_var.
6810 eval "export $shlibpath_var"
6813 # Restore saved environment variables
6814 for lt_var
in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6816 eval "if test \"\${save_$lt_var+set}\" = set; then
6817 $lt_var=\$save_$lt_var; export $lt_var
6824 # Now prepare to actually exec the command.
6825 exec_cmd
="\$cmd$args"
6827 # Display what would be done.
6828 if test -n "$shlibpath_var"; then
6829 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6830 $echo "export $shlibpath_var"
6837 # libtool clean and uninstall mode
6839 modename
="$modename: $mode"
6845 # This variable tells wrapper scripts just to set variables rather
6846 # than running their programs.
6847 libtool_install_magic
="$magic"
6852 -f) rm="$rm $arg"; rmforce
=yes ;;
6853 -*) rm="$rm $arg" ;;
6854 *) files
="$files $arg" ;;
6858 if test -z "$rm"; then
6859 $echo "$modename: you must specify an RM program" 1>&2
6866 origobjdir
="$objdir"
6867 for file in $files; do
6868 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6869 if test "X$dir" = "X$file"; then
6871 objdir
="$origobjdir"
6873 objdir
="$dir/$origobjdir"
6875 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6876 test "$mode" = uninstall
&& objdir
="$dir"
6878 # Remember objdir for removal later, being careful to avoid duplicates
6879 if test "$mode" = clean
; then
6882 *) rmdirs
="$rmdirs $objdir" ;;
6886 # Don't error if the file doesn't exist and rm -f was used.
6887 if (test -L "$file") >/dev
/null
2>&1 \
6888 ||
(test -h "$file") >/dev
/null
2>&1 \
6889 ||
test -f "$file"; then
6891 elif test -d "$file"; then
6894 elif test "$rmforce" = yes; then
6902 # Possibly a libtool archive, so verify it.
6903 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6906 # Delete the libtool libraries and symlinks.
6907 for n
in $library_names; do
6908 rmfiles
="$rmfiles $objdir/$n"
6910 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6914 case " $library_names " in
6915 # " " in the beginning catches empty $dlname
6917 *) rmfiles
="$rmfiles $objdir/$dlname" ;;
6919 test -n "$libdir" && rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6922 if test -n "$library_names"; then
6923 # Do each command in the postuninstall commands.
6924 cmds
=$postuninstall_cmds
6925 save_ifs
="$IFS"; IFS
='~'
6926 for cmd
in $cmds; do
6931 if test "$?" -ne 0 && test "$rmforce" != yes; then
6938 if test -n "$old_library"; then
6939 # Do each command in the old_postuninstall commands.
6940 cmds
=$old_postuninstall_cmds
6941 save_ifs
="$IFS"; IFS
='~'
6942 for cmd
in $cmds; do
6947 if test "$?" -ne 0 && test "$rmforce" != yes; then
6953 # FIXME: should reinstall the best remaining shared library.
6960 # Possibly a libtool object, so verify it.
6961 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6966 # Add PIC object to the list of files to remove.
6967 if test -n "$pic_object" \
6968 && test "$pic_object" != none
; then
6969 rmfiles
="$rmfiles $dir/$pic_object"
6972 # Add non-PIC object to the list of files to remove.
6973 if test -n "$non_pic_object" \
6974 && test "$non_pic_object" != none
; then
6975 rmfiles
="$rmfiles $dir/$non_pic_object"
6981 if test "$mode" = clean
; then
6985 file=`$echo $file|${SED} 's,.exe$,,'`
6986 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6987 # $file with .exe has already been added to rmfiles,
6988 # add $file without .exe
6989 rmfiles
="$rmfiles $file"
6992 # Do a test to see if this is a libtool program.
6993 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6997 # note $name still contains .exe if it was in $file originally
6998 # as does the version of $file that was added into $rmfiles
6999 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7000 if test "$fast_install" = yes && test -n "$relink_command"; then
7001 rmfiles
="$rmfiles $objdir/lt-$name"
7003 if test "X$noexename" != "X$name" ; then
7004 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
7010 $show "$rm $rmfiles"
7011 $run $rm $rmfiles || exit_status
=1
7013 objdir
="$origobjdir"
7015 # Try to remove the ${objdir}s in the directories where we deleted files
7016 for dir
in $rmdirs; do
7017 if test -d "$dir"; then
7019 $run rmdir $dir >/dev
/null
2>&1
7027 $echo "$modename: you must specify a MODE" 1>&2
7028 $echo "$generic_help" 1>&2
7033 if test -z "$exec_cmd"; then
7034 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7035 $echo "$generic_help" 1>&2
7038 fi # test -z "$show_help"
7040 if test -n "$exec_cmd"; then
7045 # We need to display help for each of the modes.
7048 "Usage: $modename [OPTION]... [MODE-ARG]...
7050 Provide generalized library-building support services.
7052 --config show all configuration variables
7053 --debug enable verbose shell tracing
7054 -n, --dry-run display commands without modifying any files
7055 --features display basic configuration information and exit
7056 --finish same as \`--mode=finish'
7057 --help display this help message and exit
7058 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
7059 --quiet same as \`--silent'
7060 --silent don't print informational messages
7061 --tag=TAG use configuration variables from tag TAG
7062 --version print version information
7064 MODE must be one of the following:
7066 clean remove files from the build directory
7067 compile compile a source file into a libtool object
7068 execute automatically set library path, then run a program
7069 finish complete the installation of libtool libraries
7070 install install libraries or executables
7071 link create a library or an executable
7072 uninstall remove libraries from an installed directory
7074 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
7075 a more detailed description of MODE.
7077 Report bugs to <bug-libtool@gnu.org>."
7083 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7085 Remove files from the build directory.
7087 RM is the name of the program to use to delete files associated with each FILE
7088 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7091 If FILE is a libtool library, object or program, all the files associated
7092 with it are deleted. Otherwise, only FILE itself is deleted using RM."
7097 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7099 Compile a source file into a libtool library object.
7101 This mode accepts the following additional options:
7103 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
7104 -prefer-pic try to building PIC objects only
7105 -prefer-non-pic try to building non-PIC objects only
7106 -static always build a \`.o' file suitable for static linking
7108 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7109 from the given SOURCEFILE.
7111 The output file name is determined by removing the directory component from
7112 SOURCEFILE, then substituting the C source code suffix \`.c' with the
7113 library object suffix, \`.lo'."
7118 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7120 Automatically set library path, then run a program.
7122 This mode accepts the following additional options:
7124 -dlopen FILE add the directory containing FILE to the library path
7126 This mode sets the library path environment variable according to \`-dlopen'
7129 If any of the ARGS are libtool executable wrappers, then they are translated
7130 into their corresponding uninstalled binary, and any of their required library
7131 directories are added to the library path.
7133 Then, COMMAND is executed, with ARGS as arguments."
7138 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7140 Complete the installation of libtool libraries.
7142 Each LIBDIR is a directory that contains libtool libraries.
7144 The commands that this mode executes may require superuser privileges. Use
7145 the \`--dry-run' option if you just want to see what would be executed."
7150 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7152 Install executables or libraries.
7154 INSTALL-COMMAND is the installation command. The first component should be
7155 either the \`install' or \`cp' program.
7157 The rest of the components are interpreted as arguments to that command (only
7158 BSD-compatible install options are recognized)."
7163 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7165 Link object files or libraries together to form another library, or to
7166 create an executable program.
7168 LINK-COMMAND is a command using the C compiler that you would use to create
7169 a program from several object files.
7171 The following components of LINK-COMMAND are treated specially:
7173 -all-static do not do any dynamic linking at all
7174 -avoid-version do not add a version suffix if possible
7175 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
7176 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
7177 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7178 -export-symbols SYMFILE
7179 try to export only the symbols listed in SYMFILE
7180 -export-symbols-regex REGEX
7181 try to export only the symbols matching REGEX
7182 -LLIBDIR search LIBDIR for required installed libraries
7183 -lNAME OUTPUT-FILE requires the installed library libNAME
7184 -module build a library that can dlopened
7185 -no-fast-install disable the fast-install mode
7186 -no-install link a not-installable executable
7187 -no-undefined declare that a library does not refer to external symbols
7188 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
7189 -objectlist FILE Use a list of object files found in FILE to specify objects
7190 -precious-files-regex REGEX
7191 don't remove output files matching REGEX
7192 -release RELEASE specify package release information
7193 -rpath LIBDIR the created library will eventually be installed in LIBDIR
7194 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
7195 -static do not do any dynamic linking of uninstalled libtool libraries
7196 -static-libtool-libs
7197 do not do any dynamic linking of libtool libraries
7198 -version-info CURRENT[:REVISION[:AGE]]
7199 specify library version info [each variable defaults to 0]
7201 All other options (arguments beginning with \`-') are ignored.
7203 Every other argument is treated as a filename. Files ending in \`.la' are
7204 treated as uninstalled libtool libraries, other files are standard or library
7207 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7208 only library objects (\`.lo' files) may be specified, and \`-rpath' is
7209 required, except when creating a convenience library.
7211 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7212 using \`ar' and \`ranlib', or on Windows using \`lib'.
7214 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7215 is created, otherwise an executable program is created."
7220 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7222 Remove libraries from an installation directory.
7224 RM is the name of the program to use to delete files associated with each FILE
7225 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7228 If FILE is a libtool library, all the files associated with it are deleted.
7229 Otherwise, only FILE itself is deleted using RM."
7233 $echo "$modename: invalid operation mode \`$mode'" 1>&2
7240 $echo "Try \`$modename --help' for more information about other modes."
7244 # The TAGs below are defined such that we never get into a situation
7245 # in which we disable both kinds of libraries. Given conflicting
7246 # choices, we go for a static library, that is the most portable,
7247 # since we can't tell whether shared libraries were disabled because
7248 # the user asked for that or because the platform doesn't support
7249 # them. This is particularly important on AIX, because we don't
7250 # support having both static and shared libraries enabled at the same
7251 # time on that platform, so we default to a shared-only configuration.
7252 # If a disable-shared tag is given, we'll fallback to a static-only
7253 # configuration. But we'll never go from static-only to shared-only.
7255 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7257 # ### END LIBTOOL TAG CONFIG: disable-shared
7259 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
7261 # ### END LIBTOOL TAG CONFIG: disable-static
7267 # ### BEGIN LIBTOOL TAG CONFIG: CXX
7269 # Libtool was configured on host thales:
7271 # Shell to use when invoking shell scripts.
7274 # Whether or not to build shared libraries.
7275 build_libtool_libs
=yes
7277 # Whether or not to build static libraries.
7280 # Whether or not to add -lc for building shared libraries.
7281 build_libtool_need_lc
=no
7283 # Whether or not to disallow shared libs when runtime libs are static
7284 allow_libtool_libs_with_static_runtimes
=no
7286 # Whether or not to optimize for fast installation.
7291 host=x86_64-redhat-linux-gnu
7296 build
=x86_64-redhat-linux-gnu
7299 # An echo program that does not interpret backslashes.
7309 # LTCC compiler flags.
7312 # A language-specific compiler.
7315 # Is the compiler the GNU C compiler?
7318 gcc_dir
=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
7319 gcc_ver
=`gcc -dumpversion`
7324 # The linker used to build libraries.
7325 LD
="/usr/bin/ld -m elf_x86_64"
7327 # Whether we need hard or soft links.
7330 # A BSD-compatible nm program.
7333 # A symbol stripping program
7336 # Used to examine libraries when file_magic_cmd begins "file"
7339 # Used on cygwin: DLL creation program.
7342 # Used on cygwin: object dumper.
7345 # Used on cygwin: assembler.
7348 # The name of the directory that contains temporary libtool files.
7351 # How to create reloadable object files.
7353 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7355 # How to pass a linker flag through the compiler.
7358 # Object file suffix (normally "o").
7361 # Old archive suffix (normally "a").
7364 # Shared library suffix (normally ".so").
7367 # Executable file suffix (normally "").
7370 # Additional compiler flags for building library objects.
7371 pic_flag
=" -fPIC -DPIC"
7374 # What is the maximum length of a command?
7377 # Does compiler simultaneously support -c and -o options?
7380 # Must we lock files when doing compilation?
7383 # Do we need the lib prefix for modules?
7386 # Do we need a version for libraries?
7389 # Whether dlopen is supported.
7390 dlopen_support
=unknown
7392 # Whether dlopen of programs is supported.
7395 # Whether dlopen of statically linked programs is supported.
7396 dlopen_self_static
=unknown
7398 # Compiler flag to prevent dynamic linking.
7399 link_static_flag
="-static"
7401 # Compiler flag to turn off builtin functions.
7402 no_builtin_flag
=" -fno-builtin"
7404 # Compiler flag to allow reflexive dlopens.
7405 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7407 # Compiler flag to generate shared objects directly from archives.
7408 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7410 # Compiler flag to generate thread-safe objects.
7411 thread_safe_flag_spec
=""
7413 # Library versioning type.
7416 # Format of library name prefix.
7417 libname_spec
="lib\$name"
7419 # List of archive names. First name is the real one, the rest are links.
7420 # The last name is the one that the linker finds with -lNAME.
7421 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7423 # The coded name of the library, if different from the real name.
7424 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
7426 # Commands used to build and install an old-style archive.
7428 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7429 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7430 old_postuninstall_cmds
=""
7432 # Create an old-style archive from a shared archive.
7433 old_archive_from_new_cmds
=""
7435 # Create a temporary old-style archive to link instead of a shared archive.
7436 old_archive_from_expsyms_cmds
=""
7438 # Commands used to build and install a shared archive.
7439 archive_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7440 archive_expsym_cmds
="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
7442 postuninstall_cmds
=""
7444 # Commands used to build a loadable module (assumed same as above if empty)
7446 module_expsym_cmds
=""
7448 # Commands to strip libraries.
7449 old_striplib
="strip --strip-debug"
7450 striplib
="strip --strip-unneeded"
7452 # Dependencies to place before the objects being linked to create a
7454 predep_objects
=`echo "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7456 # Dependencies to place after the objects being linked to create a
7458 postdep_objects
=`echo "/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7460 # Dependencies to place before the objects being linked to create a
7464 # Dependencies to place after the objects being linked to create a
7466 postdeps
="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7468 # The library search path used internally by the compiler when linking
7470 compiler_lib_search_path
=`echo "-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7472 # Method to check whether dependent libraries are shared objects.
7473 deplibs_check_method
="pass_all"
7475 # Command to use when deplibs_check_method == file_magic.
7476 file_magic_cmd
="\$MAGIC_CMD"
7478 # Flag that allows shared libraries with undefined symbols to be built.
7479 allow_undefined_flag
=""
7481 # Flag that forces no undefined symbols.
7482 no_undefined_flag
=""
7484 # Commands used to finish a libtool library installation in a directory.
7485 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7487 # Same as above, but a single script fragment to be evaled but not shown.
7490 # Take the output of nm and produce a listing of raw symbols and C names.
7491 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7493 # Transform the output of nm in a proper C declaration
7494 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7496 # Transform the output of nm in a C name address pair
7497 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7499 # This is the shared library runtime path variable.
7500 runpath_var
=LD_RUN_PATH
7502 # This is the shared library path variable.
7503 shlibpath_var
=LD_LIBRARY_PATH
7505 # Is shlibpath searched before the hard-coded library search path?
7506 shlibpath_overrides_runpath
=no
7508 # How to hardcode a shared library path into an executable.
7509 hardcode_action
=immediate
7511 # Whether we should hardcode library paths into libraries.
7512 hardcode_into_libs
=yes
7514 # Flag to hardcode $libdir into a binary during linking.
7515 # This must work even if $libdir does not exist.
7516 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
7518 # If ld is used when linking, flag to hardcode $libdir into
7519 # a binary during linking. This must work even if $libdir does
7521 hardcode_libdir_flag_spec_ld
=""
7523 # Whether we need a single -rpath flag with a separated argument.
7524 hardcode_libdir_separator
=""
7526 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7530 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7534 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7535 # the resulting binary.
7536 hardcode_shlibpath_var
=unsupported
7538 # Set to yes if building a shared library automatically hardcodes DIR into the library
7539 # and all subsequent libraries and executables linked against it.
7540 hardcode_automatic
=no
7542 # Variables whose values should be saved in libtool wrapper scripts and
7543 # restored at relink time.
7544 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7546 # Whether libtool must link a program against all its dependency libraries.
7547 link_all_deplibs
=unknown
7549 # Compile-time system search path for libraries
7550 sys_lib_search_path_spec
=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7552 # Run-time system search path for libraries
7553 sys_lib_dlsearch_path_spec
="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib "
7555 # Fix the shell variable $srcfile for the compiler.
7558 # Set to yes if exported symbols are required.
7559 always_export_symbols
=no
7561 # The commands to list exported symbols.
7562 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7564 # The commands to extract the exported symbol list from a shared archive.
7565 extract_expsyms_cmds
=""
7567 # Symbols that should not be listed in the preloaded symbols.
7570 # Symbols that must always be exported.
7573 # ### END LIBTOOL TAG CONFIG: CXX
7575 # ### BEGIN LIBTOOL TAG CONFIG: F77
7577 # Libtool was configured on host thales:
7579 # Shell to use when invoking shell scripts.
7582 # Whether or not to build shared libraries.
7583 build_libtool_libs
=yes
7585 # Whether or not to build static libraries.
7588 # Whether or not to add -lc for building shared libraries.
7589 build_libtool_need_lc
=no
7591 # Whether or not to disallow shared libs when runtime libs are static
7592 allow_libtool_libs_with_static_runtimes
=no
7594 # Whether or not to optimize for fast installation.
7599 host=x86_64-redhat-linux-gnu
7604 build
=x86_64-redhat-linux-gnu
7607 # An echo program that does not interpret backslashes.
7617 # LTCC compiler flags.
7620 # A language-specific compiler.
7623 # Is the compiler the GNU C compiler?
7626 gcc_dir
=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
7627 gcc_ver
=`gcc -dumpversion`
7632 # The linker used to build libraries.
7633 LD
="/usr/bin/ld -m elf_x86_64"
7635 # Whether we need hard or soft links.
7638 # A BSD-compatible nm program.
7641 # A symbol stripping program
7644 # Used to examine libraries when file_magic_cmd begins "file"
7647 # Used on cygwin: DLL creation program.
7650 # Used on cygwin: object dumper.
7653 # Used on cygwin: assembler.
7656 # The name of the directory that contains temporary libtool files.
7659 # How to create reloadable object files.
7661 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
7663 # How to pass a linker flag through the compiler.
7666 # Object file suffix (normally "o").
7669 # Old archive suffix (normally "a").
7672 # Shared library suffix (normally ".so").
7675 # Executable file suffix (normally "").
7678 # Additional compiler flags for building library objects.
7682 # What is the maximum length of a command?
7685 # Does compiler simultaneously support -c and -o options?
7688 # Must we lock files when doing compilation?
7691 # Do we need the lib prefix for modules?
7694 # Do we need a version for libraries?
7697 # Whether dlopen is supported.
7698 dlopen_support
=unknown
7700 # Whether dlopen of programs is supported.
7703 # Whether dlopen of statically linked programs is supported.
7704 dlopen_self_static
=unknown
7706 # Compiler flag to prevent dynamic linking.
7707 link_static_flag
="-static"
7709 # Compiler flag to turn off builtin functions.
7712 # Compiler flag to allow reflexive dlopens.
7713 export_dynamic_flag_spec
="\${wl}--export-dynamic"
7715 # Compiler flag to generate shared objects directly from archives.
7716 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7718 # Compiler flag to generate thread-safe objects.
7719 thread_safe_flag_spec
=""
7721 # Library versioning type.
7724 # Format of library name prefix.
7725 libname_spec
="lib\$name"
7727 # List of archive names. First name is the real one, the rest are links.
7728 # The last name is the one that the linker finds with -lNAME.
7729 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7731 # The coded name of the library, if different from the real name.
7732 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
7734 # Commands used to build and install an old-style archive.
7736 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7737 old_postinstall_cmds
="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7738 old_postuninstall_cmds
=""
7740 # Create an old-style archive from a shared archive.
7741 old_archive_from_new_cmds
=""
7743 # Create a temporary old-style archive to link instead of a shared archive.
7744 old_archive_from_expsyms_cmds
=""
7746 # Commands used to build and install a shared archive.
7747 archive_cmds
="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7748 archive_expsym_cmds
="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
7749 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
7750 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
7751 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
7753 postuninstall_cmds
=""
7755 # Commands used to build a loadable module (assumed same as above if empty)
7757 module_expsym_cmds
=""
7759 # Commands to strip libraries.
7760 old_striplib
="strip --strip-debug"
7761 striplib
="strip --strip-unneeded"
7763 # Dependencies to place before the objects being linked to create a
7765 predep_objects
=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7767 # Dependencies to place after the objects being linked to create a
7769 postdep_objects
=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7771 # Dependencies to place before the objects being linked to create a
7775 # Dependencies to place after the objects being linked to create a
7779 # The library search path used internally by the compiler when linking
7781 compiler_lib_search_path
=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7783 # Method to check whether dependent libraries are shared objects.
7784 deplibs_check_method
="pass_all"
7786 # Command to use when deplibs_check_method == file_magic.
7787 file_magic_cmd
="\$MAGIC_CMD"
7789 # Flag that allows shared libraries with undefined symbols to be built.
7790 allow_undefined_flag
=""
7792 # Flag that forces no undefined symbols.
7793 no_undefined_flag
=""
7795 # Commands used to finish a libtool library installation in a directory.
7796 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7798 # Same as above, but a single script fragment to be evaled but not shown.
7801 # Take the output of nm and produce a listing of raw symbols and C names.
7802 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7804 # Transform the output of nm in a proper C declaration
7805 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7807 # Transform the output of nm in a C name address pair
7808 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7810 # This is the shared library runtime path variable.
7811 runpath_var
=LD_RUN_PATH
7813 # This is the shared library path variable.
7814 shlibpath_var
=LD_LIBRARY_PATH
7816 # Is shlibpath searched before the hard-coded library search path?
7817 shlibpath_overrides_runpath
=no
7819 # How to hardcode a shared library path into an executable.
7820 hardcode_action
=immediate
7822 # Whether we should hardcode library paths into libraries.
7823 hardcode_into_libs
=yes
7825 # Flag to hardcode $libdir into a binary during linking.
7826 # This must work even if $libdir does not exist.
7827 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
7829 # If ld is used when linking, flag to hardcode $libdir into
7830 # a binary during linking. This must work even if $libdir does
7832 hardcode_libdir_flag_spec_ld
=""
7834 # Whether we need a single -rpath flag with a separated argument.
7835 hardcode_libdir_separator
=""
7837 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7841 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7845 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7846 # the resulting binary.
7847 hardcode_shlibpath_var
=unsupported
7849 # Set to yes if building a shared library automatically hardcodes DIR into the library
7850 # and all subsequent libraries and executables linked against it.
7851 hardcode_automatic
=no
7853 # Variables whose values should be saved in libtool wrapper scripts and
7854 # restored at relink time.
7855 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7857 # Whether libtool must link a program against all its dependency libraries.
7858 link_all_deplibs
=unknown
7860 # Compile-time system search path for libraries
7861 sys_lib_search_path_spec
=`echo "/lib64 /usr/lib64 /usr/local/lib64" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
7863 # Run-time system search path for libraries
7864 sys_lib_dlsearch_path_spec
="/lib64 /usr/lib64 /usr/lib64/R/lib /usr/lib64/atlas /usr/lib64/ldapotp /usr/lib64/openmpi/1.2.6-gcc /usr/lib64/mvapich/0.9.9-1760.19chaos/gnu/gen2/lib/shared /usr/lib64/mysql /usr/lib64/octave-3.0.1 /usr/lib64/qt-3.3/lib "
7866 # Fix the shell variable $srcfile for the compiler.
7869 # Set to yes if exported symbols are required.
7870 always_export_symbols
=no
7872 # The commands to list exported symbols.
7873 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7875 # The commands to extract the exported symbol list from a shared archive.
7876 extract_expsyms_cmds
=""
7878 # Symbols that should not be listed in the preloaded symbols.
7879 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
7881 # Symbols that must always be exported.
7884 # ### END LIBTOOL TAG CONFIG: F77