3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU )
5 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
10 # This file is part of GNU Libtool:
11 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
18 # This program is distributed in the hope that it will be useful, but
19 # WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 # General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
33 SED="/usr/athena/bin/sed"
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed="/usr/athena/bin/sed -e s/^X//"
38 # The HP-UX ksh and POSIX shell print the target directory to stdout
40 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
42 # The names of the tagged configurations supported by this script.
43 available_tags=" CXX F77"
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host this-too-shall-pass.mit.edu:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc=yes
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes=no
64 # Whether or not to optimize for fast installation.
69 host=sparc-sun-solaris2.10
71 # An echo program that does not interpret backslashes.
81 # A language-specific compiler.
84 # Is the compiler the GNU C compiler?
90 # The linker used to build libraries.
93 # Whether we need hard or soft links.
96 # A BSD-compatible nm program.
97 NM="/usr/ccs/bin/nm -p"
99 # A symbol stripping program
102 # Used to examine libraries when file_magic_cmd begins "file"
105 # Used on cygwin: DLL creation program.
108 # Used on cygwin: object dumper.
111 # Used on cygwin: assembler.
114 # The name of the directory that contains temporary libtool files.
117 # How to create reloadable object files.
119 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
121 # How to pass a linker flag through the compiler.
124 # Object file suffix (normally "o").
127 # Old archive suffix (normally "a").
130 # Shared library suffix (normally ".so").
133 # Executable file suffix (normally "").
136 # Additional compiler flags for building library objects.
137 pic_flag=" -fPIC -DPIC"
140 # What is the maximum length of a command?
143 # Does compiler simultaneously support -c and -o options?
146 # Must we lock files when doing compilation ?
149 # Do we need the lib prefix for modules?
152 # Do we need a version for libraries?
155 # Whether dlopen is supported.
156 dlopen_support=unknown
158 # Whether dlopen of programs is supported.
161 # Whether dlopen of statically linked programs is supported.
162 dlopen_self_static=unknown
164 # Compiler flag to prevent dynamic linking.
165 link_static_flag="-static"
167 # Compiler flag to turn off builtin functions.
168 no_builtin_flag=" -fno-builtin"
170 # Compiler flag to allow reflexive dlopens.
171 export_dynamic_flag_spec=""
173 # Compiler flag to generate shared objects directly from archives.
174 whole_archive_flag_spec="-z allextract\$convenience -z defaultextract"
176 # Compiler flag to generate thread-safe objects.
177 thread_safe_flag_spec=""
179 # Library versioning type.
182 # Format of library name prefix.
183 libname_spec="lib\$name"
185 # List of archive names. First name is the real one, the rest are links.
186 # The last name is the one that the linker finds with -lNAME.
187 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
189 # The coded name of the library, if different from the real name.
190 soname_spec="\${libname}\${release}\${shared_ext}\$major"
192 # Commands used to build and install an old-style archive.
194 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
196 old_postuninstall_cmds=""
198 # Create an old-style archive from a shared archive.
199 old_archive_from_new_cmds=""
201 # Create a temporary old-style archive to link instead of a shared archive.
202 old_archive_from_expsyms_cmds=""
204 # Commands used to build and install a shared archive.
205 archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags"
206 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
207 \$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp"
208 postinstall_cmds="chmod +x \$lib"
209 postuninstall_cmds=""
211 # Commands used to build a loadable module (assumed same as above if empty)
213 module_expsym_cmds=""
215 # Commands to strip libraries.
219 # Dependencies to place before the objects being linked to create a
223 # Dependencies to place after the objects being linked to create a
227 # Dependencies to place before the objects being linked to create a
231 # Dependencies to place after the objects being linked to create a
235 # The library search path used internally by the compiler when linking
237 compiler_lib_search_path=""
239 # Method to check whether dependent libraries are shared objects.
240 deplibs_check_method="pass_all"
242 # Command to use when deplibs_check_method == file_magic.
243 file_magic_cmd="\$MAGIC_CMD"
245 # Flag that allows shared libraries with undefined symbols to be built.
246 allow_undefined_flag=""
248 # Flag that forces no undefined symbols.
249 no_undefined_flag=" -z text"
251 # Commands used to finish a libtool library installation in a directory.
254 # Same as above, but a single script fragment to be evaled but not shown.
257 # Take the output of nm and produce a listing of raw symbols and C names.
258 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
260 # Transform the output of nm in a proper C declaration
261 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
263 # Transform the output of nm in a C name address pair
264 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
266 # This is the shared library runtime path variable.
269 # This is the shared library path variable.
270 shlibpath_var=LD_LIBRARY_PATH
272 # Is shlibpath searched before the hard-coded library search path?
273 shlibpath_overrides_runpath=yes
275 # How to hardcode a shared library path into an executable.
276 hardcode_action=immediate
278 # Whether we should hardcode library paths into libraries.
279 hardcode_into_libs=yes
281 # Flag to hardcode $libdir into a binary during linking.
282 # This must work even if $libdir does not exist.
283 hardcode_libdir_flag_spec="-R\$libdir"
285 # If ld is used when linking, flag to hardcode $libdir into
286 # a binary during linking. This must work even if $libdir does
288 hardcode_libdir_flag_spec_ld=""
290 # Whether we need a single -rpath flag with a separated argument.
291 hardcode_libdir_separator=""
293 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
297 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
301 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
302 # the resulting binary.
303 hardcode_shlibpath_var=no
305 # Set to yes if building a shared library automatically hardcodes DIR into the library
306 # and all subsequent libraries and executables linked against it.
307 hardcode_automatic=no
309 # Variables whose values should be saved in libtool wrapper scripts and
310 # restored at relink time.
311 variables_saved_for_relink="PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
313 # Whether libtool must link a program against all its dependency libraries.
316 # Compile-time system search path for libraries
317 sys_lib_search_path_spec=" /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/ /usr/lib/gcc/sparc-sun-solaris2.10/3.4.3/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/lib/sparc-sun-solaris2.10/3.4.3/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/lib/ /usr/ccs/lib/sparc-sun-solaris2.10/3.4.3/ /usr/ccs/lib/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../sparc-sun-solaris2.10/3.4.3/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../ /lib/sparc-sun-solaris2.10/3.4.3/ /lib/ /usr/lib/sparc-sun-solaris2.10/3.4.3/ /usr/lib/"
319 # Run-time system search path for libraries
320 sys_lib_dlsearch_path_spec="/lib /usr/lib"
322 # Fix the shell variable $srcfile for the compiler.
325 # Set to yes if exported symbols are required.
326 always_export_symbols=no
328 # The commands to list exported symbols.
329 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
331 # The commands to extract the exported symbol list from a shared archive.
332 extract_expsyms_cmds=""
334 # Symbols that should not be listed in the preloaded symbols.
335 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
337 # Symbols that must always be exported.
340 # ### END LIBTOOL CONFIG
342 # ltmain.sh - Provide generalized library-building support services.
343 # NOTE: Changing this file will not affect anything until you rerun configure.
345 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
346 # Free Software Foundation, Inc.
347 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
349 # This program is free software; you can redistribute it and/or modify
350 # it under the terms of the GNU General Public License as published by
351 # the Free Software Foundation; either version 2 of the License, or
352 # (at your option) any later version.
354 # This program is distributed in the hope that it will be useful, but
355 # WITHOUT ANY WARRANTY; without even the implied warranty of
356 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
357 # General Public License for more details.
359 # You should have received a copy of the GNU General Public License
360 # along with this program; if not, write to the Free Software
361 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
363 # As a special exception to the GNU General Public License, if you
364 # distribute this file as part of a program that contains a
365 # configuration script generated by Autoconf, you may include it under
366 # the same distribution terms that you use for the rest of that program.
370 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
371 # is ksh but when the shell is invoked as "sh" and the current value of
372 # the _XPG environment variable is not equal to 1 (one), the special
373 # positional parameter $0, within a function call, is the name of the
377 # RH: define SED for historic ltconfig's generated by Libtool 1.3
378 [ -z "$SED" ] && SED=sed
380 # The name of this program:
381 progname=`echo "$progpath" | $SED $basename`
391 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
395 # Check that we have a working $echo.
396 if test "X$1" = X--no-reexec; then
397 # Discard the --no-reexec flag, and continue.
399 elif test "X$1" = X--fallback-echo; then
400 # Avoid inline document here, it may be left over
402 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
403 # Yippee, $echo works!
406 # Restart under the correct shell, and then maybe $echo will work.
407 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
410 if test "X$1" = X--fallback-echo; then
411 # used as fallback echo
420 help="Try \`$progname --help' for more information."
421 magic="%%%MAGIC variable%%%"
426 # Sed substitution that helps us do robust quoting. It backslashifies
427 # metacharacters that are still active within double-quoted strings.
428 Xsed="${SED}"' -e 1s/^X//'
429 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
430 # test EBCDIC or ASCII
431 case `echo A|tr A '\301'` in
432 A) # EBCDIC based system
433 SP2NL="tr '\100' '\n'"
434 NL2SP="tr '\r\n' '\100\100'"
436 *) # Assume ASCII based system
437 SP2NL="tr '\040' '\012'"
438 NL2SP="tr '\015\012' '\040\040'"
443 # Only set LANG and LC_ALL to C if already set.
444 # These must not be set unconditionally because not all systems understand
445 # e.g. LANG=C (notably SCO).
446 # We save the old values to restore during execute mode.
447 if test "${LC_ALL+set}" = set; then
448 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
450 if test "${LANG+set}" = set; then
451 save_LANG="$LANG"; LANG=C; export LANG
454 # Make sure IFS has a sensible default
458 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
459 $echo "$modename: not configured to build any kind of library" 1>&2
460 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
473 lo2o="s/\\.lo\$/.${objext}/"
474 o2lo="s/\\.${objext}\$/.lo/"
476 #####################################
477 # Shell function definitions:
478 # This seems to be the best place for them
480 # func_win32_libid arg
481 # return the library type of file 'arg'
483 # Need a lot of goo to handle *both* DLLs and import libs
484 # Has to be a shell function in order to 'eat' the argument
485 # that is supplied when $file_magic_command is called.
486 func_win32_libid () {
487 win32_libid_type="unknown"
488 win32_fileres=`file -L $1 2>/dev/null`
489 case $win32_fileres in
490 *ar\ archive\ import\ library*) # definitely import
491 win32_libid_type="x86 archive import"
493 *ar\ archive*) # could be an import, or static
494 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
495 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
496 win32_nmres=`eval $NM -f posix -A $1 | \
497 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
498 if test "X$win32_nmres" = "Ximport" ; then
499 win32_libid_type="x86 archive import"
501 win32_libid_type="x86 archive static"
506 win32_libid_type="x86 DLL"
508 *executable*) # but shell scripts are "executable" too...
509 case $win32_fileres in
510 *MS\ Windows\ PE\ Intel*)
511 win32_libid_type="x86 DLL"
516 $echo $win32_libid_type
521 # Infer tagged configuration to use if any are available and
522 # if one wasn't chosen via the "--tag" command line option.
523 # Only attempt this if the compiler in the base compile
524 # command doesn't match the default compiler.
525 # arg is usually of the form 'gcc ...'
527 if test -n "$available_tags" && test -z "$tagname"; then
531 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
535 CC_quoted="$CC_quoted $arg"
538 # Blanks in the command may have been stripped by the calling shell,
539 # but not from the CC environment variable when configure was run.
540 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
541 # Blanks at the start of $base_compile will cause this to fail
542 # if we don't check for them as well.
544 for z in $available_tags; do
545 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
546 # Evaluate the configuration.
547 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
550 # Double-quote args containing other shell metacharacters.
552 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
556 CC_quoted="$CC_quoted $arg"
559 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
560 # The compiler in the base compile command matches
561 # the one in the tagged configuration.
562 # Assume this is the tagged configuration we want.
569 # If $tagname still isn't set, then no tagged configuration
570 # was found and let the user know that the "--tag" command
571 # line option must be used.
572 if test -z "$tagname"; then
573 $echo "$modename: unable to infer tagged configuration"
574 $echo "$modename: specify a tag with \`--tag'" 1>&2
577 # $echo "$modename: using $tagname tagged configuration"
583 # End of Shell function definitions
584 #####################################
587 eval std_shrext=\"$shrext_cmds\"
589 # Parse our command line options once, thoroughly.
590 while test "$#" -gt 0
596 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
600 # If the previous option needs an argument, assign it.
601 if test -n "$prev"; then
604 execute_dlfiles="$execute_dlfiles $arg"
608 preserve_args="${preserve_args}=$arg"
610 # Check whether tagname contains only valid characters
613 $echo "$progname: invalid tag name: $tagname" 1>&2
620 # Don't test for the "default" C tag, as we know, it's there, but
621 # not specially marked.
624 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
625 taglist="$taglist $tagname"
626 # Evaluate the configuration.
627 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
629 $echo "$progname: ignoring unknown tag $tagname" 1>&2
644 # Have we seen a non-optional argument yet?
651 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
653 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
654 $echo "This is free software; see the source for copying conditions. There is NO"
655 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
660 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
661 # Now print the configurations for the tags.
662 for tagname in $taglist; do
663 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
669 $echo "$progname: enabling shell trace mode"
671 preserve_args="$preserve_args $arg"
680 if test "$build_libtool_libs" = yes; then
681 $echo "enable shared libraries"
683 $echo "disable shared libraries"
685 if test "$build_old_libs" = yes; then
686 $echo "enable static libraries"
688 $echo "disable static libraries"
693 --finish) mode="finish" ;;
695 --mode) prevopt="--mode" prev=mode ;;
696 --mode=*) mode="$optarg" ;;
698 --preserve-dup-deps) duplicate_deps="yes" ;;
702 preserve_args="$preserve_args $arg"
705 --tag) prevopt="--tag" prev=tag ;;
707 set tag "$optarg" ${1+"$@"}
710 preserve_args="$preserve_args --tag"
719 $echo "$modename: unrecognized option \`$arg'" 1>&2
731 if test -n "$prevopt"; then
732 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
737 # If this variable is set in any of the actions, the command in it
738 # will be execed at the end. This prevents here-documents from being
739 # left over by shells.
742 if test -z "$show_help"; then
744 # Infer the operation mode.
745 if test -z "$mode"; then
746 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
747 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
749 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
761 *db | *dbx | *strace | *truss)
771 # If we have no mode, but dlfiles were specified, then do execute mode.
772 test -n "$execute_dlfiles" && mode=execute
774 # Just use the default operation mode.
775 if test -z "$mode"; then
776 if test -n "$nonopt"; then
777 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
779 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
786 # Only execute mode is allowed to have -dlopen flags.
787 if test -n "$execute_dlfiles" && test "$mode" != execute; then
788 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
793 # Change the help message to a mode-specific one.
795 help="Try \`$modename --help --mode=$mode' for more information."
797 # These modes are in order of execution frequency so that they run quickly.
799 # libtool compile mode
801 modename="$modename: compile"
802 # Get the compilation command and the source file.
804 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
815 # do not "continue". Instead, add this to base_compile
827 # Accept any command-line options.
830 if test -n "$libobj" ; then
831 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
838 -static | -prefer-pic | -prefer-non-pic)
849 arg_mode=arg # the next one goes into the "base_compile" arg list
850 continue # The current "srcfile" will either be retained or
851 ;; # replaced later. I would guess that would be a bug.
854 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
856 save_ifs="$IFS"; IFS=','
860 # Double-quote args containing other shell metacharacters.
861 # Many Bourne shells cannot handle close brackets correctly
862 # in scan sets, so we specify it separately.
864 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
868 lastarg="$lastarg $arg"
871 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
873 # Add the arguments to base_compile.
874 base_compile="$base_compile $lastarg"
879 # Accept the current argument as the source file.
880 # The previous "srcfile" becomes the current argument.
887 esac # case $arg_mode
889 # Aesthetically quote the previous argument.
890 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
893 # Double-quote args containing other shell metacharacters.
894 # Many Bourne shells cannot handle close brackets correctly
895 # in scan sets, so we specify it separately.
896 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
897 lastarg="\"$lastarg\""
901 base_compile="$base_compile $lastarg"
906 $echo "$modename: you must specify an argument for -Xcompile"
910 $echo "$modename: you must specify a target with \`-o'" 1>&2
914 # Get the name of the library object.
915 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
919 # Recognize several different file suffixes.
920 # If the user specifies -o file.o, it is replaced with file.lo
930 *.class) xform=class ;;
935 *.java) xform=java ;;
938 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
941 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
943 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
948 func_infer_tag $base_compile
950 for arg in $later; do
969 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
970 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
971 if test "X$xdir" = "X$obj"; then
976 lobj=${xdir}$objdir/$objname
978 if test -z "$base_compile"; then
979 $echo "$modename: you must specify a compilation command" 1>&2
984 # Delete any leftover library objects.
985 if test "$build_old_libs" = yes; then
986 removelist="$obj $lobj $libobj ${libobj}T"
988 removelist="$lobj $libobj ${libobj}T"
992 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
994 # On Cygwin there's no "real" PIC flag so we must build both object types
996 cygwin* | mingw* | pw32* | os2*)
1000 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1001 # non-PIC code in shared libraries is not supported
1005 # Calculate the filename of the output object if compiler does
1006 # not support -o with -c
1007 if test "$compiler_c_o" = no; then
1008 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1009 lockfile="$output_obj.lock"
1010 removelist="$removelist $output_obj $lockfile"
1011 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1018 # Lock this critical section if it is needed
1019 # We use this script file to make the link, it avoids creating a new file
1020 if test "$need_locks" = yes; then
1021 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
1022 $show "Waiting for $lockfile to be removed"
1025 elif test "$need_locks" = warn; then
1026 if test -f "$lockfile"; then
1028 *** ERROR, $lockfile exists and contains:
1029 `cat $lockfile 2>/dev/null`
1031 This indicates that another process is trying to use the same
1032 temporary object file, and libtool could not work around it because
1033 your compiler does not support \`-c' and \`-o' together. If you
1034 repeat this compilation, it may succeed, by chance, but you had better
1035 avoid parallel builds (make -j) in this platform, or get a better
1038 $run $rm $removelist
1041 $echo $srcfile > "$lockfile"
1044 if test -n "$fix_srcfile_path"; then
1045 eval srcfile=\"$fix_srcfile_path\"
1048 $run $rm "$libobj" "${libobj}T"
1050 # Create a libtool object file (analogous to a ".la" file),
1051 # but don't create it if we're doing a dry run.
1052 test -z "$run" && cat > ${libobj}T <<EOF
1053 # $libobj - a libtool object file
1054 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1056 # Please DO NOT delete this file!
1057 # It is necessary for linking the library.
1059 # Name of the PIC object.
1062 # Only build a PIC object if we are building libtool libraries.
1063 if test "$build_libtool_libs" = yes; then
1064 # Without this assignment, base_compile gets emptied.
1065 fbsd_hideous_sh_bug=$base_compile
1067 if test "$pic_mode" != no; then
1068 command="$base_compile $srcfile $pic_flag"
1070 # Don't build PIC code
1071 command="$base_compile $srcfile"
1074 if test ! -d "${xdir}$objdir"; then
1075 $show "$mkdir ${xdir}$objdir"
1076 $run $mkdir ${xdir}$objdir
1078 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1083 if test -z "$output_obj"; then
1084 # Place PIC objects in $objdir
1085 command="$command -o $lobj"
1088 $run $rm "$lobj" "$output_obj"
1091 if $run eval "$command"; then :
1093 test -n "$output_obj" && $run $rm $removelist
1097 if test "$need_locks" = warn &&
1098 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1100 *** ERROR, $lockfile contains:
1101 `cat $lockfile 2>/dev/null`
1103 but it should contain:
1106 This indicates that another process is trying to use the same
1107 temporary object file, and libtool could not work around it because
1108 your compiler does not support \`-c' and \`-o' together. If you
1109 repeat this compilation, it may succeed, by chance, but you had better
1110 avoid parallel builds (make -j) in this platform, or get a better
1113 $run $rm $removelist
1117 # Just move the object if needed, then go on to compile the next one
1118 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1119 $show "$mv $output_obj $lobj"
1120 if $run $mv $output_obj $lobj; then :
1123 $run $rm $removelist
1128 # Append the name of the PIC object to the libtool object file.
1129 test -z "$run" && cat >> ${libobj}T <<EOF
1130 pic_object='$objdir/$objname'
1134 # Allow error messages only from the first compilation.
1135 if test "$suppress_opt" = yes; then
1136 suppress_output=' >/dev/null 2>&1'
1139 # No PIC object so indicate it doesn't exist in the libtool
1141 test -z "$run" && cat >> ${libobj}T <<EOF
1147 # Only build a position-dependent object if we build old libraries.
1148 if test "$build_old_libs" = yes; then
1149 if test "$pic_mode" != yes; then
1150 # Don't build PIC code
1151 command="$base_compile $srcfile"
1153 command="$base_compile $srcfile $pic_flag"
1155 if test "$compiler_c_o" = yes; then
1156 command="$command -o $obj"
1159 # Suppress compiler output if we already did a PIC compilation.
1160 command="$command$suppress_output"
1161 $run $rm "$obj" "$output_obj"
1163 if $run eval "$command"; then :
1165 $run $rm $removelist
1169 if test "$need_locks" = warn &&
1170 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1172 *** ERROR, $lockfile contains:
1173 `cat $lockfile 2>/dev/null`
1175 but it should contain:
1178 This indicates that another process is trying to use the same
1179 temporary object file, and libtool could not work around it because
1180 your compiler does not support \`-c' and \`-o' together. If you
1181 repeat this compilation, it may succeed, by chance, but you had better
1182 avoid parallel builds (make -j) in this platform, or get a better
1185 $run $rm $removelist
1189 # Just move the object if needed
1190 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1191 $show "$mv $output_obj $obj"
1192 if $run $mv $output_obj $obj; then :
1195 $run $rm $removelist
1200 # Append the name of the non-PIC object the libtool object file.
1201 # Only append if the libtool object file exists.
1202 test -z "$run" && cat >> ${libobj}T <<EOF
1203 # Name of the non-PIC object.
1204 non_pic_object='$objname'
1208 # Append the name of the non-PIC object the libtool object file.
1209 # Only append if the libtool object file exists.
1210 test -z "$run" && cat >> ${libobj}T <<EOF
1211 # Name of the non-PIC object.
1217 $run $mv "${libobj}T" "${libobj}"
1219 # Unlock the critical section if it was locked
1220 if test "$need_locks" != no; then
1221 $run $rm "$lockfile"
1229 modename="$modename: link"
1231 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1232 # It is impossible to link a dll without this setting, and
1233 # we shouldn't force the makefile maintainer to figure out
1234 # which system we are compiling for in order to pass an extra
1235 # flag for every libtool invocation.
1236 # allow_undefined=no
1238 # FIXME: Unfortunately, there are problems with the above when trying
1239 # to make a dll which has undefined symbols, in which case not
1240 # even a static library is built. For now, we need to specify
1241 # -no-undefined on the libtool link line when we can be certain
1242 # that all symbols are satisfied, otherwise we get a static library.
1249 libtool_args="$nonopt"
1250 base_compile="$nonopt $@"
1251 compile_command="$nonopt"
1252 finalize_command="$nonopt"
1265 lib_search_path=`pwd`
1274 export_symbols_regex=
1282 precious_files_regex=
1283 prefer_static_libs=no
1296 func_infer_tag $base_compile
1298 # We need to know -static, to get the right output filenames.
1302 -all-static | -static)
1303 if test "X$arg" = "X-all-static"; then
1304 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1305 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1307 if test -n "$link_static_flag"; then
1308 dlopen_self=$dlopen_self_static
1311 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1312 dlopen_self=$dlopen_self_static
1315 build_libtool_libs=no
1317 prefer_static_libs=yes
1323 # See if our shared archives depend on static archives.
1324 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1326 # Go through the arguments, transforming them on the way.
1327 while test "$#" -gt 0; do
1331 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1332 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1336 libtool_args="$libtool_args $qarg"
1338 # If the previous option needs an argument, assign it.
1339 if test -n "$prev"; then
1342 compile_command="$compile_command @OUTPUT@"
1343 finalize_command="$finalize_command @OUTPUT@"
1349 if test "$preload" = no; then
1350 # Add the symbol object into the linking commands.
1351 compile_command="$compile_command @SYMFILE@"
1352 finalize_command="$finalize_command @SYMFILE@"
1356 *.la | *.lo) ;; # We handle these cases below.
1358 if test "$dlself" = no; then
1366 if test "$prev" = dlprefiles; then
1368 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1378 if test "$prev" = dlfiles; then
1379 dlfiles="$dlfiles $arg"
1381 dlprefiles="$dlprefiles $arg"
1389 export_symbols="$arg"
1390 if test ! -f "$arg"; then
1391 $echo "$modename: symbol file \`$arg' does not exist"
1398 export_symbols_regex="$arg"
1403 inst_prefix_dir="$arg"
1408 precious_files_regex="$arg"
1418 if test -f "$arg"; then
1421 for fil in `cat $save_arg`
1423 # moreargs="$moreargs $fil"
1425 # A libtool-controlled object.
1427 # Check to see that this really is a libtool object.
1428 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1433 # If there is no directory component, then add one.
1435 */* | *\\*) . $arg ;;
1439 if test -z "$pic_object" || \
1440 test -z "$non_pic_object" ||
1441 test "$pic_object" = none && \
1442 test "$non_pic_object" = none; then
1443 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1447 # Extract subdirectory from the argument.
1448 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1449 if test "X$xdir" = "X$arg"; then
1455 if test "$pic_object" != none; then
1456 # Prepend the subdirectory the object is found in.
1457 pic_object="$xdir$pic_object"
1459 if test "$prev" = dlfiles; then
1460 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1461 dlfiles="$dlfiles $pic_object"
1465 # If libtool objects are unsupported, then we need to preload.
1470 # CHECK ME: I think I busted this. -Ossama
1471 if test "$prev" = dlprefiles; then
1472 # Preload the old-style object.
1473 dlprefiles="$dlprefiles $pic_object"
1478 libobjs="$libobjs $pic_object"
1483 if test "$non_pic_object" != none; then
1484 # Prepend the subdirectory the object is found in.
1485 non_pic_object="$xdir$non_pic_object"
1487 # A standard non-PIC object
1488 non_pic_objects="$non_pic_objects $non_pic_object"
1489 if test -z "$pic_object" || test "$pic_object" = none ; then
1490 arg="$non_pic_object"
1494 # Only an error if not doing a dry-run.
1495 if test -z "$run"; then
1496 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1501 # Extract subdirectory from the argument.
1502 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1503 if test "X$xdir" = "X$arg"; then
1509 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1510 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1511 libobjs="$libobjs $pic_object"
1512 non_pic_objects="$non_pic_objects $non_pic_object"
1517 $echo "$modename: link input file \`$save_arg' does not exist"
1525 # We need an absolute path.
1527 [\\/]* | [A-Za-z]:[\\/]*) ;;
1529 $echo "$modename: only absolute run-paths are allowed" 1>&2
1533 if test "$prev" = rpath; then
1536 *) rpath="$rpath $arg" ;;
1541 *) xrpath="$xrpath $arg" ;;
1548 compiler_flags="$compiler_flags $qarg"
1550 compile_command="$compile_command $qarg"
1551 finalize_command="$finalize_command $qarg"
1555 linker_flags="$linker_flags $qarg"
1556 compiler_flags="$compiler_flags $wl$qarg"
1558 compile_command="$compile_command $wl$qarg"
1559 finalize_command="$finalize_command $wl$qarg"
1563 linker_flags="$linker_flags $qarg"
1564 compiler_flags="$compiler_flags $qarg"
1566 compile_command="$compile_command $qarg"
1567 finalize_command="$finalize_command $qarg"
1576 eval "$prev=\"\$arg\""
1581 fi # test -n "$prev"
1587 if test -n "$link_static_flag"; then
1588 compile_command="$compile_command $link_static_flag"
1589 finalize_command="$finalize_command $link_static_flag"
1595 # FIXME: remove this flag sometime in the future.
1596 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1620 -export-symbols | -export-symbols-regex)
1621 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1622 $echo "$modename: more than one -exported-symbols argument is not allowed"
1625 if test "X$arg" = "X-export-symbols"; then
1638 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1639 # so, if we see these flags be careful not to treat them like -L
1641 case $with_gcc/$host in
1642 no/*-*-irix* | /*-*-irix*)
1643 compile_command="$compile_command $arg"
1644 finalize_command="$finalize_command $arg"
1651 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1652 # We need an absolute path.
1654 [\\/]* | [A-Za-z]:[\\/]*) ;;
1656 absdir=`cd "$dir" && pwd`
1657 if test -z "$absdir"; then
1658 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1667 deplibs="$deplibs -L$dir"
1668 lib_search_path="$lib_search_path $dir"
1672 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1673 case :$dllsearchpath: in
1675 *) dllsearchpath="$dllsearchpath:$dir";;
1683 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1685 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1686 # These systems don't actually have a C or math library (as such)
1689 *-*-mingw* | *-*-os2*)
1690 # These systems don't actually have a C library (as such)
1691 test "X$arg" = "X-lc" && continue
1693 *-*-openbsd* | *-*-freebsd*)
1694 # Do not include libc due to us having libc/libc_r.
1695 test "X$arg" = "X-lc" && continue
1697 *-*-rhapsody* | *-*-darwin1.[012])
1698 # Rhapsody C and math libraries are in the System framework
1699 deplibs="$deplibs -framework System"
1702 elif test "X$arg" = "X-lc_r"; then
1704 *-*-openbsd* | *-*-freebsd*)
1705 # Do not include libc_r directly, use -pthread flag.
1710 deplibs="$deplibs $arg"
1714 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1715 deplibs="$deplibs $arg"
1724 # gcc -m* arguments should be passed to the linker via $compiler_flags
1725 # in order to pass architecture information to the linker
1726 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1727 # but this is not reliable with gcc because gcc may use -mfoo to
1728 # select a different linker, different libraries, etc, while
1729 # -Wl,-mfoo simply passes -mfoo to the linker.
1731 # Unknown arguments in both finalize_command and compile_command need
1732 # to be aesthetically quoted because they are evaled later.
1733 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1735 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1739 compile_command="$compile_command $arg"
1740 finalize_command="$finalize_command $arg"
1741 if test "$with_gcc" = "yes" ; then
1742 compiler_flags="$compiler_flags $arg"
1759 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1760 # The PATH hackery in wrapper scripts is required on Windows
1761 # in order for the loader to find any dlls it needs.
1762 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1763 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1766 *) no_install=yes ;;
1783 -precious-files-regex)
1804 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1805 # We need an absolute path.
1807 [\\/]* | [A-Za-z]:[\\/]*) ;;
1809 $echo "$modename: only absolute run-paths are allowed" 1>&2
1815 *) xrpath="$xrpath $dir" ;;
1821 # The effects of -static are defined in a previous loop.
1822 # We used to do the same as -all-static on platforms that
1823 # didn't have a PIC flag, but the assumption that the effects
1824 # would be equivalent was wrong. It would break on at least
1825 # Digital Unix and AIX.
1845 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1847 save_ifs="$IFS"; IFS=','
1848 for flag in $args; do
1851 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1856 compiler_flags="$compiler_flags $flag"
1859 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1863 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1865 save_ifs="$IFS"; IFS=','
1866 for flag in $args; do
1869 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1874 compiler_flags="$compiler_flags $wl$flag"
1875 linker_flags="$linker_flags $flag"
1878 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1896 # Some other compiler flag.
1898 # Unknown arguments in both finalize_command and compile_command need
1899 # to be aesthetically quoted because they are evaled later.
1900 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1902 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1909 # A standard object.
1914 # A libtool-controlled object.
1916 # Check to see that this really is a libtool object.
1917 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1922 # If there is no directory component, then add one.
1924 */* | *\\*) . $arg ;;
1928 if test -z "$pic_object" || \
1929 test -z "$non_pic_object" ||
1930 test "$pic_object" = none && \
1931 test "$non_pic_object" = none; then
1932 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1936 # Extract subdirectory from the argument.
1937 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1938 if test "X$xdir" = "X$arg"; then
1944 if test "$pic_object" != none; then
1945 # Prepend the subdirectory the object is found in.
1946 pic_object="$xdir$pic_object"
1948 if test "$prev" = dlfiles; then
1949 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1950 dlfiles="$dlfiles $pic_object"
1954 # If libtool objects are unsupported, then we need to preload.
1959 # CHECK ME: I think I busted this. -Ossama
1960 if test "$prev" = dlprefiles; then
1961 # Preload the old-style object.
1962 dlprefiles="$dlprefiles $pic_object"
1967 libobjs="$libobjs $pic_object"
1972 if test "$non_pic_object" != none; then
1973 # Prepend the subdirectory the object is found in.
1974 non_pic_object="$xdir$non_pic_object"
1976 # A standard non-PIC object
1977 non_pic_objects="$non_pic_objects $non_pic_object"
1978 if test -z "$pic_object" || test "$pic_object" = none ; then
1979 arg="$non_pic_object"
1983 # Only an error if not doing a dry-run.
1984 if test -z "$run"; then
1985 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1990 # Extract subdirectory from the argument.
1991 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1992 if test "X$xdir" = "X$arg"; then
1998 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1999 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2000 libobjs="$libobjs $pic_object"
2001 non_pic_objects="$non_pic_objects $non_pic_object"
2008 deplibs="$deplibs $arg"
2009 old_deplibs="$old_deplibs $arg"
2014 # A libtool-controlled library.
2016 if test "$prev" = dlfiles; then
2017 # This library was specified with -dlopen.
2018 dlfiles="$dlfiles $arg"
2020 elif test "$prev" = dlprefiles; then
2021 # The library was specified with -dlpreopen.
2022 dlprefiles="$dlprefiles $arg"
2025 deplibs="$deplibs $arg"
2030 # Some other compiler argument.
2032 # Unknown arguments in both finalize_command and compile_command need
2033 # to be aesthetically quoted because they are evaled later.
2034 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2036 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2043 # Now actually substitute the argument into the commands.
2044 if test -n "$arg"; then
2045 compile_command="$compile_command $arg"
2046 finalize_command="$finalize_command $arg"
2048 done # argument parsing loop
2050 if test -n "$prev"; then
2051 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2056 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2057 eval arg=\"$export_dynamic_flag_spec\"
2058 compile_command="$compile_command $arg"
2059 finalize_command="$finalize_command $arg"
2063 # calculate the name of the file, without its directory
2064 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2065 libobjs_save="$libobjs"
2067 if test -n "$shlibpath_var"; then
2068 # get the directories listed in $shlibpath_var
2069 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2073 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2074 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2076 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2077 if test "X$output_objdir" = "X$output"; then
2078 output_objdir="$objdir"
2080 output_objdir="$output_objdir/$objdir"
2082 # Create the object directory.
2083 if test ! -d "$output_objdir"; then
2084 $show "$mkdir $output_objdir"
2085 $run $mkdir $output_objdir
2087 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2092 # Determine the type of output
2095 $echo "$modename: you must specify an output file" 1>&2
2099 *.$libext) linkmode=oldlib ;;
2100 *.lo | *.$objext) linkmode=obj ;;
2101 *.la) linkmode=lib ;;
2102 *) linkmode=prog ;; # Anything else should be a program.
2106 *cygwin* | *mingw* | *pw32*)
2107 # don't eliminate duplications in $postdeps and $predeps
2108 duplicate_compiler_generated_deps=yes
2111 duplicate_compiler_generated_deps=$duplicate_deps
2117 # Find all interdependent deplibs by searching for libraries
2118 # that are linked more than once (e.g. -la -lb -la)
2119 for deplib in $deplibs; do
2120 if test "X$duplicate_deps" = "Xyes" ; then
2122 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2125 libs="$libs $deplib"
2128 if test "$linkmode" = lib; then
2129 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2131 # Compute libraries that are listed more than once in $predeps
2132 # $postdeps and mark them as special (i.e., whose duplicates are
2133 # not to be eliminated).
2135 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2136 for pre_post_dep in $predeps $postdeps; do
2137 case "$pre_post_deps " in
2138 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2140 pre_post_deps="$pre_post_deps $pre_post_dep"
2149 need_relink=no # whether we're linking any uninstalled libtool libraries
2150 notinst_deplibs= # not-installed libtool libraries
2151 notinst_path= # paths that contain not-installed libtool libraries
2155 for file in $dlfiles $dlprefiles; do
2159 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2171 passes="conv scan dlopen dlpreopen link"
2176 for pass in $passes; do
2177 if test "$linkmode,$pass" = "lib,link" ||
2178 test "$linkmode,$pass" = "prog,scan"; then
2182 if test "$linkmode" = prog; then
2184 dlopen) libs="$dlfiles" ;;
2185 dlpreopen) libs="$dlprefiles" ;;
2186 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2189 if test "$pass" = dlopen; then
2190 # Collect dlpreopened libraries
2191 save_deplibs="$deplibs"
2194 for deplib in $libs; do
2198 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2199 if test "$linkmode,$pass" = "prog,link"; then
2200 compile_deplibs="$deplib $compile_deplibs"
2201 finalize_deplibs="$deplib $finalize_deplibs"
2203 deplibs="$deplib $deplibs"
2208 if test "$linkmode" != lib && test "$linkmode" != prog; then
2209 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2212 if test "$pass" = conv; then
2213 deplibs="$deplib $deplibs"
2216 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2217 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2218 for search_ext in .la $std_shrext .so .a; do
2219 # Search the libtool library
2220 lib="$searchdir/lib${name}${search_ext}"
2221 if test -f "$lib"; then
2222 if test "$search_ext" = ".la"; then
2231 if test "$found" != yes; then
2232 # deplib doesn't seem to be a libtool library
2233 if test "$linkmode,$pass" = "prog,link"; then
2234 compile_deplibs="$deplib $compile_deplibs"
2235 finalize_deplibs="$deplib $finalize_deplibs"
2237 deplibs="$deplib $deplibs"
2238 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2241 else # deplib is a libtool library
2242 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2243 # We need to do some special things here, and not later.
2244 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2245 case " $predeps $postdeps " in
2247 if (${SED} -e '2q' $lib |
2248 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2252 */* | *\\*) . $lib ;;
2255 for l in $old_library $library_names; do
2258 if test "X$ll" = "X$old_library" ; then # only static version available
2260 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2261 test "X$ladir" = "X$lib" && ladir="."
2262 lib=$ladir/$old_library
2263 if test "$linkmode,$pass" = "prog,link"; then
2264 compile_deplibs="$deplib $compile_deplibs"
2265 finalize_deplibs="$deplib $finalize_deplibs"
2267 deplibs="$deplib $deplibs"
2268 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2282 deplibs="$deplib $deplibs"
2283 test "$pass" = conv && continue
2284 newdependency_libs="$deplib $newdependency_libs"
2285 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2288 if test "$pass" = conv; then
2289 deplibs="$deplib $deplibs"
2292 if test "$pass" = scan; then
2293 deplibs="$deplib $deplibs"
2295 compile_deplibs="$deplib $compile_deplibs"
2296 finalize_deplibs="$deplib $finalize_deplibs"
2298 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2301 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2307 if test "$pass" = link; then
2308 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2309 # Make sure the xrpath contains only unique directories.
2312 *) xrpath="$xrpath $dir" ;;
2315 deplibs="$deplib $deplibs"
2318 *.la) lib="$deplib" ;;
2320 if test "$pass" = conv; then
2321 deplibs="$deplib $deplibs"
2326 if test "$deplibs_check_method" != pass_all; then
2328 $echo "*** Warning: Trying to link with static lib archive $deplib."
2329 $echo "*** I have the capability to make that library automatically link in when"
2330 $echo "*** you link to this library. But I can only do this if you have a"
2331 $echo "*** shared version of the library, which you do not appear to have"
2332 $echo "*** because the file extensions .$libext of this argument makes me believe"
2333 $echo "*** that it is just a static archive that I should not used here."
2336 $echo "*** Warning: Linking the shared library $output against the"
2337 $echo "*** static library $deplib is not portable!"
2338 deplibs="$deplib $deplibs"
2343 if test "$pass" != link; then
2344 deplibs="$deplib $deplibs"
2346 compile_deplibs="$deplib $compile_deplibs"
2347 finalize_deplibs="$deplib $finalize_deplibs"
2354 if test "$pass" = conv; then
2355 deplibs="$deplib $deplibs"
2356 elif test "$linkmode" = prog; then
2357 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2358 # If there is no dlopen support or we're linking statically,
2359 # we need to preload.
2360 newdlprefiles="$newdlprefiles $deplib"
2361 compile_deplibs="$deplib $compile_deplibs"
2362 finalize_deplibs="$deplib $finalize_deplibs"
2364 newdlfiles="$newdlfiles $deplib"
2374 if test "$found" = yes || test -f "$lib"; then :
2376 $echo "$modename: cannot find the library \`$lib'" 1>&2
2380 # Check to see that this really is a libtool archive.
2381 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2383 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2387 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2388 test "X$ladir" = "X$lib" && ladir="."
2396 # If the library was installed with an old release of libtool,
2397 # it will not redefine variables installed, or shouldnotlink
2403 */* | *\\*) . $lib ;;
2407 if test "$linkmode,$pass" = "lib,link" ||
2408 test "$linkmode,$pass" = "prog,scan" ||
2409 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2410 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2411 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2414 if test "$pass" = conv; then
2415 # Only check for convenience libraries
2416 deplibs="$lib $deplibs"
2417 if test -z "$libdir"; then
2418 if test -z "$old_library"; then
2419 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2422 # It is a libtool convenience library, so add in its objects.
2423 convenience="$convenience $ladir/$objdir/$old_library"
2424 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2426 for deplib in $dependency_libs; do
2427 deplibs="$deplib $deplibs"
2428 if test "X$duplicate_deps" = "Xyes" ; then
2429 case "$tmp_libs " in
2430 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2433 tmp_libs="$tmp_libs $deplib"
2435 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2436 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2443 # Get the name of the library we link against.
2445 for l in $old_library $library_names; do
2448 if test -z "$linklib"; then
2449 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2453 # This library was specified with -dlopen.
2454 if test "$pass" = dlopen; then
2455 if test -z "$libdir"; then
2456 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2459 if test -z "$dlname" ||
2460 test "$dlopen_support" != yes ||
2461 test "$build_libtool_libs" = no; then
2462 # If there is no dlname, no dlopen support or we're linking
2463 # statically, we need to preload. We also need to preload any
2464 # dependent libraries so libltdl's deplib preloader doesn't
2465 # bomb out in the load deplibs phase.
2466 dlprefiles="$dlprefiles $lib $dependency_libs"
2468 newdlfiles="$newdlfiles $lib"
2473 # We need an absolute path.
2475 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2477 abs_ladir=`cd "$ladir" && pwd`
2478 if test -z "$abs_ladir"; then
2479 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2480 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2485 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2487 # Find the relevant object directory and library name.
2488 if test "X$installed" = Xyes; then
2489 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2490 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2499 dir="$ladir/$objdir"
2500 absdir="$abs_ladir/$objdir"
2501 # Remove this search path later
2502 notinst_path="$notinst_path $abs_ladir"
2503 fi # $installed = yes
2504 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2506 # This library was specified with -dlpreopen.
2507 if test "$pass" = dlpreopen; then
2508 if test -z "$libdir"; then
2509 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2512 # Prefer using a static library (so that no silly _DYNAMIC symbols
2513 # are required to link).
2514 if test -n "$old_library"; then
2515 newdlprefiles="$newdlprefiles $dir/$old_library"
2516 # Otherwise, use the dlname, so that lt_dlopen finds it.
2517 elif test -n "$dlname"; then
2518 newdlprefiles="$newdlprefiles $dir/$dlname"
2520 newdlprefiles="$newdlprefiles $dir/$linklib"
2522 fi # $pass = dlpreopen
2524 if test -z "$libdir"; then
2525 # Link the convenience library
2526 if test "$linkmode" = lib; then
2527 deplibs="$dir/$old_library $deplibs"
2528 elif test "$linkmode,$pass" = "prog,link"; then
2529 compile_deplibs="$dir/$old_library $compile_deplibs"
2530 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2532 deplibs="$lib $deplibs" # used for prog,scan pass
2538 if test "$linkmode" = prog && test "$pass" != link; then
2539 newlib_search_path="$newlib_search_path $ladir"
2540 deplibs="$lib $deplibs"
2543 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2544 test "$build_libtool_libs" = no; then
2549 for deplib in $dependency_libs; do
2551 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2553 # Need to link against all dependency_libs?
2554 if test "$linkalldeplibs" = yes; then
2555 deplibs="$deplib $deplibs"
2557 # Need to hardcode shared library paths
2558 # or/and link against static libraries
2559 newdependency_libs="$deplib $newdependency_libs"
2561 if test "X$duplicate_deps" = "Xyes" ; then
2562 case "$tmp_libs " in
2563 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2566 tmp_libs="$tmp_libs $deplib"
2569 fi # $linkmode = prog...
2571 if test "$linkmode,$pass" = "prog,link"; then
2572 if test -n "$library_names" &&
2573 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2574 # We need to hardcode the library path
2575 if test -n "$shlibpath_var"; then
2576 # Make sure the rpath contains only unique directories.
2577 case "$temp_rpath " in
2580 *) temp_rpath="$temp_rpath $dir" ;;
2584 # Hardcode the library path.
2585 # Skip directories that are in the system default run-time
2587 case " $sys_lib_dlsearch_path " in
2590 case "$compile_rpath " in
2592 *) compile_rpath="$compile_rpath $absdir"
2596 case " $sys_lib_dlsearch_path " in
2599 case "$finalize_rpath " in
2601 *) finalize_rpath="$finalize_rpath $libdir"
2605 fi # $linkmode,$pass = prog,link...
2607 if test "$alldeplibs" = yes &&
2608 { test "$deplibs_check_method" = pass_all ||
2609 { test "$build_libtool_libs" = yes &&
2610 test -n "$library_names"; }; }; then
2611 # We only need to search for static libraries
2616 link_static=no # Whether the deplib will be linked statically
2617 if test -n "$library_names" &&
2618 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2619 if test "$installed" = no; then
2620 notinst_deplibs="$notinst_deplibs $lib"
2623 # This is a shared library
2625 # Warn about portability, can't link against -module's on
2626 # some systems (darwin)
2627 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2629 if test "$linkmode" = prog; then
2630 $echo "*** Warning: Linking the executable $output against the loadable module"
2632 $echo "*** Warning: Linking the shared library $output against the loadable module"
2634 $echo "*** $linklib is not portable!"
2636 if test "$linkmode" = lib &&
2637 test "$hardcode_into_libs" = yes; then
2638 # Hardcode the library path.
2639 # Skip directories that are in the system default run-time
2641 case " $sys_lib_dlsearch_path " in
2644 case "$compile_rpath " in
2646 *) compile_rpath="$compile_rpath $absdir"
2650 case " $sys_lib_dlsearch_path " in
2653 case "$finalize_rpath " in
2655 *) finalize_rpath="$finalize_rpath $libdir"
2661 if test -n "$old_archive_from_expsyms_cmds"; then
2662 # figure out the soname
2663 set dummy $library_names
2666 libname=`eval \\$echo \"$libname_spec\"`
2667 # use dlname if we got it. it's perfectly good, no?
2668 if test -n "$dlname"; then
2670 elif test -n "$soname_spec"; then
2674 major=`expr $current - $age`
2678 eval soname=\"$soname_spec\"
2683 # Make a new name for the extract_expsyms_cmds to use
2685 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2686 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2688 # If the library has no export list, then create one now
2689 if test -f "$output_objdir/$soname-def"; then :
2691 $show "extracting exported symbol list from \`$soname'"
2692 save_ifs="$IFS"; IFS='~'
2693 cmds=$extract_expsyms_cmds
2694 for cmd in $cmds; do
2698 $run eval "$cmd" || exit $?
2704 if test -f "$output_objdir/$newlib"; then :; else
2705 $show "generating import library for \`$soname'"
2706 save_ifs="$IFS"; IFS='~'
2707 cmds=$old_archive_from_expsyms_cmds
2708 for cmd in $cmds; do
2712 $run eval "$cmd" || exit $?
2716 # make sure the library variables are pointing to the new library
2719 fi # test -n "$old_archive_from_expsyms_cmds"
2721 if test "$linkmode" = prog || test "$mode" != relink; then
2726 case $hardcode_action in
2727 immediate | unsupported)
2728 if test "$hardcode_direct" = no; then
2731 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
2733 # if the lib is a module then we can not link against
2734 # it, someone is ignoring the new warnings I added
2735 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
2736 $echo "** Warning, lib $linklib is a module, not a shared library"
2737 if test -z "$old_library" ; then
2739 $echo "** And there doesn't seem to be a static archive available"
2740 $echo "** The link will probably fail, sorry"
2742 add="$dir/$old_library"
2746 elif test "$hardcode_minus_L" = no; then
2748 *-*-sunos*) add_shlibpath="$dir" ;;
2752 elif test "$hardcode_shlibpath_var" = no; then
2753 add_shlibpath="$dir"
2760 if test "$hardcode_direct" = yes; then
2762 elif test "$hardcode_minus_L" = yes; then
2764 # Try looking first in the location we're being installed to.
2765 if test -n "$inst_prefix_dir"; then
2768 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2773 elif test "$hardcode_shlibpath_var" = yes; then
2774 add_shlibpath="$dir"
2783 if test "$lib_linked" != yes; then
2784 $echo "$modename: configuration error: unsupported hardcode properties"
2788 if test -n "$add_shlibpath"; then
2789 case :$compile_shlibpath: in
2790 *":$add_shlibpath:"*) ;;
2791 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2794 if test "$linkmode" = prog; then
2795 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2796 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2798 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2799 test -n "$add" && deplibs="$add $deplibs"
2800 if test "$hardcode_direct" != yes && \
2801 test "$hardcode_minus_L" != yes && \
2802 test "$hardcode_shlibpath_var" = yes; then
2803 case :$finalize_shlibpath: in
2805 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2811 if test "$linkmode" = prog || test "$mode" = relink; then
2815 # Finalize command for both is simple: just hardcode it.
2816 if test "$hardcode_direct" = yes; then
2817 add="$libdir/$linklib"
2818 elif test "$hardcode_minus_L" = yes; then
2821 elif test "$hardcode_shlibpath_var" = yes; then
2822 case :$finalize_shlibpath: in
2824 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2827 elif test "$hardcode_automatic" = yes; then
2828 if test -n "$inst_prefix_dir" &&
2829 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2830 add="$inst_prefix_dir$libdir/$linklib"
2832 add="$libdir/$linklib"
2835 # We cannot seem to hardcode it, guess we'll fake it.
2837 # Try looking first in the location we're being installed to.
2838 if test -n "$inst_prefix_dir"; then
2841 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2848 if test "$linkmode" = prog; then
2849 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2850 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2852 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2853 test -n "$add" && deplibs="$add $deplibs"
2856 elif test "$linkmode" = prog; then
2857 # Here we assume that one of hardcode_direct or hardcode_minus_L
2858 # is not unsupported. This is valid on all known static and
2860 if test "$hardcode_direct" != unsupported; then
2861 test -n "$old_library" && linklib="$old_library"
2862 compile_deplibs="$dir/$linklib $compile_deplibs"
2863 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2865 compile_deplibs="-l$name -L$dir $compile_deplibs"
2866 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2868 elif test "$build_libtool_libs" = yes; then
2869 # Not a shared library
2870 if test "$deplibs_check_method" != pass_all; then
2871 # We're trying link a shared library against a static one
2872 # but the system doesn't support it.
2874 # Just print a warning and add the library to dependency_libs so
2875 # that the program can be linked against the static library.
2877 $echo "*** Warning: This system can not link to static lib archive $lib."
2878 $echo "*** I have the capability to make that library automatically link in when"
2879 $echo "*** you link to this library. But I can only do this if you have a"
2880 $echo "*** shared version of the library, which you do not appear to have."
2881 if test "$module" = yes; then
2882 $echo "*** But as you try to build a module library, libtool will still create "
2883 $echo "*** a static module, that should work as long as the dlopening application"
2884 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2885 if test -z "$global_symbol_pipe"; then
2887 $echo "*** However, this would only work if libtool was able to extract symbol"
2888 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2889 $echo "*** not find such a program. So, this module is probably useless."
2890 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2892 if test "$build_old_libs" = no; then
2893 build_libtool_libs=module
2896 build_libtool_libs=no
2900 convenience="$convenience $dir/$old_library"
2901 old_convenience="$old_convenience $dir/$old_library"
2902 deplibs="$dir/$old_library $deplibs"
2905 fi # link shared/static library?
2907 if test "$linkmode" = lib; then
2908 if test -n "$dependency_libs" &&
2909 { test "$hardcode_into_libs" != yes ||
2910 test "$build_old_libs" = yes ||
2911 test "$link_static" = yes; }; then
2912 # Extract -R from dependency_libs
2914 for libdir in $dependency_libs; do
2916 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2918 *" $temp_xrpath "*) ;;
2919 *) xrpath="$xrpath $temp_xrpath";;
2921 *) temp_deplibs="$temp_deplibs $libdir";;
2924 dependency_libs="$temp_deplibs"
2927 newlib_search_path="$newlib_search_path $absdir"
2928 # Link against this library
2929 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2930 # ... and its dependency_libs
2932 for deplib in $dependency_libs; do
2933 newdependency_libs="$deplib $newdependency_libs"
2934 if test "X$duplicate_deps" = "Xyes" ; then
2935 case "$tmp_libs " in
2936 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2939 tmp_libs="$tmp_libs $deplib"
2942 if test "$link_all_deplibs" != no; then
2943 # Add the search paths of all dependency libraries
2944 for deplib in $dependency_libs; do
2946 -L*) path="$deplib" ;;
2948 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2949 test "X$dir" = "X$deplib" && dir="."
2950 # We need an absolute path.
2952 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2954 absdir=`cd "$dir" && pwd`
2955 if test -z "$absdir"; then
2956 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2961 if grep "^installed=no" $deplib > /dev/null; then
2962 path="$absdir/$objdir"
2964 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2965 if test -z "$libdir"; then
2966 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2969 if test "$absdir" != "$libdir"; then
2970 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2977 # we do not want to link against static libs,
2978 # but need to link against shared
2979 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2980 if test -n "$deplibrary_names" ; then
2981 for tmp in $deplibrary_names ; do
2984 if test -f "$path/$depdepl" ; then
2985 depdepl="$path/$depdepl"
2987 # do not add paths which are already there
2988 case " $newlib_search_path " in
2990 *) newlib_search_path="$newlib_search_path $path";;
3003 # Again, we only want to link against shared libraries
3004 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3005 for tmp in $newlib_search_path ; do
3006 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3007 eval depdepl="$tmp/lib$tmp_libs.dylib"
3018 case " $deplibs " in
3020 *) deplibs="$depdepl $deplibs" ;;
3022 case " $deplibs " in
3024 *) deplibs="$deplibs $path" ;;
3027 fi # link_all_deplibs != no
3029 done # for deplib in $libs
3030 dependency_libs="$newdependency_libs"
3031 if test "$pass" = dlpreopen; then
3032 # Link the dlpreopened libraries before other libraries
3033 for deplib in $save_deplibs; do
3034 deplibs="$deplib $deplibs"
3037 if test "$pass" != dlopen; then
3038 if test "$pass" != conv; then
3039 # Make sure lib_search_path contains only unique directories.
3041 for dir in $newlib_search_path; do
3042 case "$lib_search_path " in
3044 *) lib_search_path="$lib_search_path $dir" ;;
3050 if test "$linkmode,$pass" != "prog,link"; then
3053 vars="compile_deplibs finalize_deplibs"
3055 for var in $vars dependency_libs; do
3056 # Add libraries to $var in reverse order
3057 eval tmp_libs=\"\$$var\"
3059 for deplib in $tmp_libs; do
3060 # FIXME: Pedantically, this is the right thing to do, so
3061 # that some nasty dependency loop isn't accidentally
3063 #new_libs="$deplib $new_libs"
3064 # Pragmatically, this seems to cause very few problems in
3067 -L*) new_libs="$deplib $new_libs" ;;
3070 # And here is the reason: when a library appears more
3071 # than once as an explicit dependence of a library, or
3072 # is implicitly linked in more than once by the
3073 # compiler, it is considered special, and multiple
3074 # occurrences thereof are not removed. Compare this
3075 # with having the same library being listed as a
3076 # dependency of multiple other libraries: in this case,
3077 # we know (pedantically, we assume) the library does not
3078 # need to be listed more than once, so we keep only the
3079 # last copy. This is not always right, but it is rare
3080 # enough that we require users that really mean to play
3081 # such unportable linking tricks to link the library
3082 # using -Wl,-lname, so that libtool does not consider it
3083 # for duplicate removal.
3084 case " $specialdeplibs " in
3085 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3087 case " $new_libs " in
3089 *) new_libs="$deplib $new_libs" ;;
3097 for deplib in $new_libs; do
3100 case " $tmp_libs " in
3102 *) tmp_libs="$tmp_libs $deplib" ;;
3105 *) tmp_libs="$tmp_libs $deplib" ;;
3108 eval $var=\"$tmp_libs\"
3111 # Last step: remove runtime libs from dependency_libs
3112 # (they stay in deplibs)
3114 for i in $dependency_libs ; do
3115 case " $predeps $postdeps $compiler_lib_search_path " in
3120 if test -n "$i" ; then
3121 tmp_libs="$tmp_libs $i"
3124 dependency_libs=$tmp_libs
3126 if test "$linkmode" = prog; then
3127 dlfiles="$newdlfiles"
3128 dlprefiles="$newdlprefiles"
3133 if test -n "$deplibs"; then
3134 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3137 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3138 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3141 if test -n "$rpath"; then
3142 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3145 if test -n "$xrpath"; then
3146 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3149 if test -n "$vinfo"; then
3150 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3153 if test -n "$release"; then
3154 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3157 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3158 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3161 # Now set the variables for building old libraries.
3162 build_libtool_libs=no
3164 objs="$objs$old_deplibs"
3168 # Make sure we only generate libraries of the form `libNAME.la'.
3171 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3172 eval shared_ext=\"$shrext_cmds\"
3173 eval libname=\"$libname_spec\"
3176 if test "$module" = no; then
3177 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3181 if test "$need_lib_prefix" != no; then
3182 # Add the "lib" prefix for modules if required
3183 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3184 eval shared_ext=\"$shrext_cmds\"
3185 eval libname=\"$libname_spec\"
3187 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3192 if test -n "$objs"; then
3193 if test "$deplibs_check_method" != pass_all; then
3194 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3198 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3199 $echo "*** objects $objs is not portable!"
3200 libobjs="$libobjs $objs"
3204 if test "$dlself" != no; then
3205 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3209 if test "$#" -gt 2; then
3210 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3215 if test -z "$rpath"; then
3216 if test "$build_libtool_libs" = yes; then
3217 # Building a libtool convenience library.
3218 # Some compilers have problems with a `.al' extension so
3219 # convenience libraries should have the same extension an
3220 # archive normally would.
3221 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3222 build_libtool_libs=convenience
3226 if test -n "$vinfo"; then
3227 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3230 if test -n "$release"; then
3231 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3235 # Parse the version information argument.
3236 save_ifs="$IFS"; IFS=':'
3237 set dummy $vinfo 0 0 0
3240 if test -n "$8"; then
3241 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3246 # convert absolute version numbers to libtool ages
3247 # this retains compatibility with .la files and attempts
3248 # to make the code below a bit more comprehensible
3250 case $vinfo_number in
3254 number_revision="$4"
3256 # There are really only two kinds -- those that
3257 # use the current revision as the major version
3258 # and those that subtract age and use age as
3259 # a minor version. But, then there is irix
3260 # which has an extra 1 added just for fun
3262 case $version_type in
3263 darwin|linux|osf|windows)
3264 current=`expr $number_major + $number_minor`
3266 revision="$number_revision"
3268 freebsd-aout|freebsd-elf|sunos)
3269 current="$number_major"
3270 revision="$number_minor"
3274 current=`expr $number_major + $number_minor - 1`
3276 revision="$number_minor"
3287 # Check that each of the things are valid numbers.
3291 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3292 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3300 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3301 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3309 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3310 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3315 if test "$age" -gt "$current"; then
3316 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3317 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3321 # Calculate the version variables.
3325 case $version_type in
3329 # Like Linux, but with the current version available in
3330 # verstring for coding it into the library header
3331 major=.`expr $current - $age`
3332 versuffix="$major.$age.$revision"
3333 # Darwin ld doesn't like 0 for these options...
3334 minor_current=`expr $current + 1`
3335 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3340 versuffix=".$current.$revision";
3345 versuffix=".$current";
3349 major=`expr $current - $age + 1`
3351 case $version_type in
3352 nonstopux) verstring_prefix=nonstopux ;;
3353 *) verstring_prefix=sgi ;;
3355 verstring="$verstring_prefix$major.$revision"
3357 # Add in all the interfaces that we are compatible with.
3359 while test "$loop" -ne 0; do
3360 iface=`expr $revision - $loop`
3361 loop=`expr $loop - 1`
3362 verstring="$verstring_prefix$major.$iface:$verstring"
3365 # Before this point, $major must not contain `.'.
3367 versuffix="$major.$revision"
3371 major=.`expr $current - $age`
3372 versuffix="$major.$age.$revision"
3376 major=.`expr $current - $age`
3377 versuffix=".$current.$age.$revision"
3378 verstring="$current.$age.$revision"
3380 # Add in all the interfaces that we are compatible with.
3382 while test "$loop" -ne 0; do
3383 iface=`expr $current - $loop`
3384 loop=`expr $loop - 1`
3385 verstring="$verstring:${iface}.0"
3388 # Make executables depend on our current version.
3389 verstring="$verstring:${current}.0"
3394 versuffix=".$current.$revision"
3398 # Use '-' rather than '.', since we only want one
3399 # extension on DOS 8.3 filesystems.
3400 major=`expr $current - $age`
3405 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3406 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3411 # Clear the version info if we defaulted, and they specified a release.
3412 if test -z "$vinfo" && test -n "$release"; then
3414 case $version_type in
3416 # we can't check for "0.0" in archive_cmds due to quoting
3417 # problems, so we reset it completely
3424 if test "$need_version" = no; then
3431 # Remove version info from name if versioning should be avoided
3432 if test "$avoid_version" = yes && test "$need_version" = no; then
3438 # Check to see if the archive will have undefined symbols.
3439 if test "$allow_undefined" = yes; then
3440 if test "$allow_undefined_flag" = unsupported; then
3441 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3442 build_libtool_libs=no
3446 # Don't allow undefined symbols.
3447 allow_undefined_flag="$no_undefined_flag"
3451 if test "$mode" != relink; then
3452 # Remove our outputs, but don't remove object files since they
3453 # may have been created when compiling PIC objects.
3455 tempremovelist=`$echo "$output_objdir/*"`
3456 for p in $tempremovelist; do
3460 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3461 if test "X$precious_files_regex" != "X"; then
3462 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3467 removelist="$removelist $p"
3472 if test -n "$removelist"; then
3473 $show "${rm}r $removelist"
3474 $run ${rm}r $removelist
3478 # Now set the variables for building old libraries.
3479 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3480 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3482 # Transform .lo files to .o files.
3483 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3486 # Eliminate all temporary directories.
3487 for path in $notinst_path; do
3488 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3489 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3490 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3493 if test -n "$xrpath"; then
3494 # If the user specified any rpath flags, then add them.
3496 for libdir in $xrpath; do
3497 temp_xrpath="$temp_xrpath -R$libdir"
3498 case "$finalize_rpath " in
3500 *) finalize_rpath="$finalize_rpath $libdir" ;;
3503 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3504 dependency_libs="$temp_xrpath $dependency_libs"
3508 # Make sure dlfiles contains only unique files that won't be dlpreopened
3509 old_dlfiles="$dlfiles"
3511 for lib in $old_dlfiles; do
3512 case " $dlprefiles $dlfiles " in
3514 *) dlfiles="$dlfiles $lib" ;;
3518 # Make sure dlprefiles contains only unique files
3519 old_dlprefiles="$dlprefiles"
3521 for lib in $old_dlprefiles; do
3522 case "$dlprefiles " in
3524 *) dlprefiles="$dlprefiles $lib" ;;
3528 if test "$build_libtool_libs" = yes; then
3529 if test -n "$rpath"; then
3531 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3532 # these systems don't actually have a c library (as such)!
3534 *-*-rhapsody* | *-*-darwin1.[012])
3535 # Rhapsody C library is in the System framework
3536 deplibs="$deplibs -framework System"
3539 # Don't link with libc until the a.out ld.so is fixed.
3541 *-*-openbsd* | *-*-freebsd*)
3542 # Do not include libc due to us having libc/libc_r.
3543 test "X$arg" = "X-lc" && continue
3546 # Add libc to deplibs on all other systems if necessary.
3547 if test "$build_libtool_need_lc" = "yes"; then
3548 deplibs="$deplibs -lc"
3554 # Transform deplibs into only deplibs that can be linked in shared.
3556 libname_save=$libname
3557 release_save=$release
3558 versuffix_save=$versuffix
3560 # I'm not sure if I'm treating the release correctly. I think
3561 # release should show up in the -l (ie -lgmp5) so we don't want to
3562 # add it in twice. Is that correct?
3568 case $deplibs_check_method in
3570 # Don't check for shared/static. Everything works.
3571 # This might be a little naive. We might want to check
3572 # whether the library exists or not. But this is on
3573 # osf3 & osf4 and I'm not really sure... Just
3574 # implementing what was already the behavior.
3578 # This code stresses the "libraries are programs" paradigm to its
3579 # limits. Maybe even breaks it. We compile a program, linking it
3580 # against the deplibs as a proxy for the library. Then we can check
3581 # whether they linked in statically or dynamically with ldd.
3583 cat > conftest.c <<EOF
3584 int main() { return 0; }
3587 $LTCC -o conftest conftest.c $deplibs
3588 if test "$?" -eq 0 ; then
3589 ldd_output=`ldd conftest`
3590 for i in $deplibs; do
3591 name="`expr $i : '-l\(.*\)'`"
3592 # If $name is empty we are operating on a -L argument.
3593 if test "$name" != "" && test "$name" -ne "0"; then
3594 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3595 case " $predeps $postdeps " in
3597 newdeplibs="$newdeplibs $i"
3602 if test -n "$i" ; then
3603 libname=`eval \\$echo \"$libname_spec\"`
3604 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3605 set dummy $deplib_matches
3607 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3608 newdeplibs="$newdeplibs $i"
3612 $echo "*** Warning: dynamic linker does not accept needed library $i."
3613 $echo "*** I have the capability to make that library automatically link in when"
3614 $echo "*** you link to this library. But I can only do this if you have a"
3615 $echo "*** shared version of the library, which I believe you do not have"
3616 $echo "*** because a test_compile did reveal that the linker did not use it for"
3617 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3621 newdeplibs="$newdeplibs $i"
3625 # Error occurred in the first compile. Let's try to salvage
3626 # the situation: Compile a separate program for each library.
3627 for i in $deplibs; do
3628 name="`expr $i : '-l\(.*\)'`"
3629 # If $name is empty we are operating on a -L argument.
3630 if test "$name" != "" && test "$name" != "0"; then
3632 $LTCC -o conftest conftest.c $i
3634 if test "$?" -eq 0 ; then
3635 ldd_output=`ldd conftest`
3636 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3637 case " $predeps $postdeps " in
3639 newdeplibs="$newdeplibs $i"
3644 if test -n "$i" ; then
3645 libname=`eval \\$echo \"$libname_spec\"`
3646 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3647 set dummy $deplib_matches
3649 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3650 newdeplibs="$newdeplibs $i"
3654 $echo "*** Warning: dynamic linker does not accept needed library $i."
3655 $echo "*** I have the capability to make that library automatically link in when"
3656 $echo "*** you link to this library. But I can only do this if you have a"
3657 $echo "*** shared version of the library, which you do not appear to have"
3658 $echo "*** because a test_compile did reveal that the linker did not use this one"
3659 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3665 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3666 $echo "*** make it link in! You will probably need to install it or some"
3667 $echo "*** library that it depends on before this library will be fully"
3668 $echo "*** functional. Installing it before continuing would be even better."
3671 newdeplibs="$newdeplibs $i"
3677 set dummy $deplibs_check_method
3678 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3679 for a_deplib in $deplibs; do
3680 name="`expr $a_deplib : '-l\(.*\)'`"
3681 # If $name is empty we are operating on a -L argument.
3682 if test "$name" != "" && test "$name" != "0"; then
3683 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3684 case " $predeps $postdeps " in
3686 newdeplibs="$newdeplibs $a_deplib"
3691 if test -n "$a_deplib" ; then
3692 libname=`eval \\$echo \"$libname_spec\"`
3693 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3694 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3695 for potent_lib in $potential_libs; do
3696 # Follow soft links.
3697 if ls -lLd "$potent_lib" 2>/dev/null \
3698 | grep " -> " >/dev/null; then
3701 # The statement above tries to avoid entering an
3702 # endless loop below, in case of cyclic links.
3703 # We might still enter an endless loop, since a link
3704 # loop can be closed while we follow links,
3706 potlib="$potent_lib"
3707 while test -h "$potlib" 2>/dev/null; do
3708 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3710 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3711 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3714 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3716 | $EGREP "$file_magic_regex" > /dev/null; then
3717 newdeplibs="$newdeplibs $a_deplib"
3724 if test -n "$a_deplib" ; then
3727 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3728 $echo "*** I have the capability to make that library automatically link in when"
3729 $echo "*** you link to this library. But I can only do this if you have a"
3730 $echo "*** shared version of the library, which you do not appear to have"
3731 $echo "*** because I did check the linker path looking for a file starting"
3732 if test -z "$potlib" ; then
3733 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3735 $echo "*** with $libname and none of the candidates passed a file format test"
3736 $echo "*** using a file magic. Last file checked: $potlib"
3740 # Add a -L argument.
3741 newdeplibs="$newdeplibs $a_deplib"
3743 done # Gone through all deplibs.
3746 set dummy $deplibs_check_method
3747 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3748 for a_deplib in $deplibs; do
3749 name="`expr $a_deplib : '-l\(.*\)'`"
3750 # If $name is empty we are operating on a -L argument.
3751 if test -n "$name" && test "$name" != "0"; then
3752 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3753 case " $predeps $postdeps " in
3755 newdeplibs="$newdeplibs $a_deplib"
3760 if test -n "$a_deplib" ; then
3761 libname=`eval \\$echo \"$libname_spec\"`
3762 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3763 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3764 for potent_lib in $potential_libs; do
3765 potlib="$potent_lib" # see symlink-check above in file_magic test
3766 if eval $echo \"$potent_lib\" 2>/dev/null \
3768 | $EGREP "$match_pattern_regex" > /dev/null; then
3769 newdeplibs="$newdeplibs $a_deplib"
3776 if test -n "$a_deplib" ; then
3779 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3780 $echo "*** I have the capability to make that library automatically link in when"
3781 $echo "*** you link to this library. But I can only do this if you have a"
3782 $echo "*** shared version of the library, which you do not appear to have"
3783 $echo "*** because I did check the linker path looking for a file starting"
3784 if test -z "$potlib" ; then
3785 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3787 $echo "*** with $libname and none of the candidates passed a file format test"
3788 $echo "*** using a regex pattern. Last file checked: $potlib"
3792 # Add a -L argument.
3793 newdeplibs="$newdeplibs $a_deplib"
3795 done # Gone through all deplibs.
3799 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3800 -e 's/ -[LR][^ ]*//g'`
3801 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3802 for i in $predeps $postdeps ; do
3803 # can't use Xsed below, because $i might contain '/'
3804 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3807 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3808 | grep . >/dev/null; then
3810 if test "X$deplibs_check_method" = "Xnone"; then
3811 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3813 $echo "*** Warning: inter-library dependencies are not known to be supported."
3815 $echo "*** All declared inter-library dependencies are being dropped."
3820 versuffix=$versuffix_save
3822 release=$release_save
3823 libname=$libname_save
3827 *-*-rhapsody* | *-*-darwin1.[012])
3828 # On Rhapsody replace the C library is the System framework
3829 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3833 if test "$droppeddeps" = yes; then
3834 if test "$module" = yes; then
3836 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3837 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3838 $echo "*** a static module, that should work as long as the dlopening"
3839 $echo "*** application is linked with the -dlopen flag."
3840 if test -z "$global_symbol_pipe"; then
3842 $echo "*** However, this would only work if libtool was able to extract symbol"
3843 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3844 $echo "*** not find such a program. So, this module is probably useless."
3845 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3847 if test "$build_old_libs" = no; then
3848 oldlibs="$output_objdir/$libname.$libext"
3849 build_libtool_libs=module
3852 build_libtool_libs=no
3855 $echo "*** The inter-library dependencies that have been dropped here will be"
3856 $echo "*** automatically added whenever a program is linked with this library"
3857 $echo "*** or is declared to -dlopen it."
3859 if test "$allow_undefined" = no; then
3861 $echo "*** Since this library must not contain undefined symbols,"
3862 $echo "*** because either the platform does not support them or"
3863 $echo "*** it was explicitly requested with -no-undefined,"
3864 $echo "*** libtool will only create a static version of it."
3865 if test "$build_old_libs" = no; then
3866 oldlibs="$output_objdir/$libname.$libext"
3867 build_libtool_libs=module
3870 build_libtool_libs=no
3875 # Done checking deplibs!
3879 # All the library-specific variables (install_libdir is set above).
3884 # Test again, we may have decided not to build it any more
3885 if test "$build_libtool_libs" = yes; then
3886 if test "$hardcode_into_libs" = yes; then
3887 # Hardcode the library paths
3890 rpath="$finalize_rpath"
3891 test "$mode" != relink && rpath="$compile_rpath$rpath"
3892 for libdir in $rpath; do
3893 if test -n "$hardcode_libdir_flag_spec"; then
3894 if test -n "$hardcode_libdir_separator"; then
3895 if test -z "$hardcode_libdirs"; then
3896 hardcode_libdirs="$libdir"
3898 # Just accumulate the unique libdirs.
3899 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3900 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3903 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3908 eval flag=\"$hardcode_libdir_flag_spec\"
3909 dep_rpath="$dep_rpath $flag"
3911 elif test -n "$runpath_var"; then
3912 case "$perm_rpath " in
3914 *) perm_rpath="$perm_rpath $libdir" ;;
3918 # Substitute the hardcoded libdirs into the rpath.
3919 if test -n "$hardcode_libdir_separator" &&
3920 test -n "$hardcode_libdirs"; then
3921 libdir="$hardcode_libdirs"
3922 if test -n "$hardcode_libdir_flag_spec_ld"; then
3923 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3925 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3928 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3929 # We should set the runpath_var.
3931 for dir in $perm_rpath; do
3934 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3936 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3939 shlibpath="$finalize_shlibpath"
3940 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3941 if test -n "$shlibpath"; then
3942 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3945 # Get the real and link names of the library.
3946 eval shared_ext=\"$shrext_cmds\"
3947 eval library_names=\"$library_names_spec\"
3948 set dummy $library_names
3952 if test -n "$soname_spec"; then
3953 eval soname=\"$soname_spec\"
3957 if test -z "$dlname"; then
3961 lib="$output_objdir/$realname"
3964 linknames="$linknames $link"
3967 # Use standard objects if they are pic
3968 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3970 # Prepare the list of exported symbols
3971 if test -z "$export_symbols"; then
3972 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3973 $show "generating symbol list for \`$libname.la'"
3974 export_symbols="$output_objdir/$libname.exp"
3975 $run $rm $export_symbols
3976 cmds=$export_symbols_cmds
3977 save_ifs="$IFS"; IFS='~'
3978 for cmd in $cmds; do
3981 if len=`expr "X$cmd" : ".*"` &&
3982 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3984 $run eval "$cmd" || exit $?
3985 skipped_export=false
3987 # The command line is too long to execute in one step.
3988 $show "using reloadable object file for export list..."
3993 if test -n "$export_symbols_regex"; then
3994 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3995 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3996 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3997 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4002 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4003 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4007 for test_deplib in $deplibs; do
4008 case " $convenience " in
4009 *" $test_deplib "*) ;;
4011 tmp_deplibs="$tmp_deplibs $test_deplib"
4015 deplibs="$tmp_deplibs"
4017 if test -n "$convenience"; then
4018 if test -n "$whole_archive_flag_spec"; then
4019 save_libobjs=$libobjs
4020 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4022 gentop="$output_objdir/${outputname}x"
4023 $show "${rm}r $gentop"
4024 $run ${rm}r "$gentop"
4025 $show "$mkdir $gentop"
4026 $run $mkdir "$gentop"
4028 if test "$status" -ne 0 && test ! -d "$gentop"; then
4031 generated="$generated $gentop"
4033 for xlib in $convenience; do
4034 # Extract the objects.
4036 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4037 *) xabs=`pwd`"/$xlib" ;;
4039 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4040 xdir="$gentop/$xlib"
4042 $show "${rm}r $xdir"
4044 $show "$mkdir $xdir"
4047 if test "$status" -ne 0 && test ! -d "$xdir"; then
4050 # We will extract separately just the conflicting names and we will no
4051 # longer touch any unique names. It is faster to leave these extract
4052 # automatically by $AR in one run.
4053 $show "(cd $xdir && $AR x $xabs)"
4054 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4055 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4058 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4059 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4060 $AR t "$xabs" | sort | uniq -cd | while read -r count name
4063 while test "$i" -le "$count"
4065 # Put our $i before any first dot (extension)
4066 # Never overwrite any file
4068 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4070 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4072 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4073 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4079 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4084 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4085 eval flag=\"$thread_safe_flag_spec\"
4086 linker_flags="$linker_flags $flag"
4089 # Make a backup of the uninstalled library when relinking
4090 if test "$mode" = relink; then
4091 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4094 # Do each of the archive commands.
4095 if test "$module" = yes && test -n "$module_cmds" ; then
4096 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4097 eval test_cmds=\"$module_expsym_cmds\"
4098 cmds=$module_expsym_cmds
4100 eval test_cmds=\"$module_cmds\"
4104 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4105 eval test_cmds=\"$archive_expsym_cmds\"
4106 cmds=$archive_expsym_cmds
4108 eval test_cmds=\"$archive_cmds\"
4113 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
4114 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4117 # The command line is too long to link in one step, link piecewise.
4118 $echo "creating reloadable object files..."
4120 # Save the value of $output and $libobjs because we want to
4121 # use them later. If we have whole_archive_flag_spec, we
4122 # want to use save_libobjs as it was before
4123 # whole_archive_flag_spec was expanded, because we can't
4124 # assume the linker understands whole_archive_flag_spec.
4125 # This may have to be revisited, in case too many
4126 # convenience libraries get linked in and end up exceeding
4128 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4129 save_libobjs=$libobjs
4133 # Clear the reloadable object creation command queue and
4134 # initialize k to one.
4141 output=$output_objdir/$save_output-${k}.$objext
4142 # Loop over the list of objects to be linked.
4143 for obj in $save_libobjs
4145 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4146 if test "X$objlist" = X ||
4147 { len=`expr "X$test_cmds" : ".*"` &&
4148 test "$len" -le "$max_cmd_len"; }; then
4149 objlist="$objlist $obj"
4151 # The command $test_cmds is almost too long, add a
4152 # command to the queue.
4153 if test "$k" -eq 1 ; then
4154 # The first file doesn't have a previous command to add.
4155 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4157 # All subsequent reloadable object files will link in
4158 # the last one created.
4159 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4161 last_robj=$output_objdir/$save_output-${k}.$objext
4163 output=$output_objdir/$save_output-${k}.$objext
4168 # Handle the remaining objects by creating one last
4169 # reloadable object file. All subsequent reloadable object
4170 # files will link in the last one created.
4171 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4172 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4174 if ${skipped_export-false}; then
4175 $show "generating symbol list for \`$libname.la'"
4176 export_symbols="$output_objdir/$libname.exp"
4177 $run $rm $export_symbols
4179 # Append the command to create the export file.
4180 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4183 # Set up a command to remove the reloadale object files
4184 # after they are used.
4186 while test "$i" -lt "$k"
4189 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
4192 $echo "creating a temporary reloadable object file: $output"
4194 # Loop through the commands generated above and execute them.
4195 save_ifs="$IFS"; IFS='~'
4196 for cmd in $concat_cmds; do
4199 $run eval "$cmd" || exit $?
4204 # Restore the value of output.
4207 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4208 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4210 # Expand the library linking commands again to reset the
4211 # value of $libobjs for piecewise linking.
4213 # Do each of the archive commands.
4214 if test "$module" = yes && test -n "$module_cmds" ; then
4215 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4216 cmds=$module_expsym_cmds
4221 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4222 cmds=$archive_expsym_cmds
4228 # Append the command to remove the reloadable object files
4229 # to the just-reset $cmds.
4230 eval cmds=\"\$cmds~\$rm $delfiles\"
4232 save_ifs="$IFS"; IFS='~'
4233 for cmd in $cmds; do
4237 $run eval "$cmd" || exit $?
4241 # Restore the uninstalled library and exit
4242 if test "$mode" = relink; then
4243 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4247 # Create links to the real library.
4248 for linkname in $linknames; do
4249 if test "$realname" != "$linkname"; then
4250 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4251 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4255 # If -module or -export-dynamic was specified, set the dlname.
4256 if test "$module" = yes || test "$export_dynamic" = yes; then
4257 # On all known operating systems, these are identical.
4264 if test -n "$deplibs"; then
4265 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4268 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4269 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4272 if test -n "$rpath"; then
4273 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4276 if test -n "$xrpath"; then
4277 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4280 if test -n "$vinfo"; then
4281 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4284 if test -n "$release"; then
4285 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4290 if test -n "$objs$old_deplibs"; then
4291 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4295 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4303 # Delete the old objects.
4304 $run $rm $obj $libobj
4306 # Objects from convenience libraries. This assumes
4307 # single-version convenience libraries. Whenever we create
4308 # different ones for PIC/non-PIC, this we'll have to duplicate
4312 # reload_cmds runs $LD directly, so let us get rid of
4313 # -Wl from whole_archive_flag_spec
4316 if test -n "$convenience"; then
4317 if test -n "$whole_archive_flag_spec"; then
4318 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4320 gentop="$output_objdir/${obj}x"
4321 $show "${rm}r $gentop"
4322 $run ${rm}r "$gentop"
4323 $show "$mkdir $gentop"
4324 $run $mkdir "$gentop"
4326 if test "$status" -ne 0 && test ! -d "$gentop"; then
4329 generated="$generated $gentop"
4331 for xlib in $convenience; do
4332 # Extract the objects.
4334 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4335 *) xabs=`pwd`"/$xlib" ;;
4337 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4338 xdir="$gentop/$xlib"
4340 $show "${rm}r $xdir"
4342 $show "$mkdir $xdir"
4345 if test "$status" -ne 0 && test ! -d "$xdir"; then
4348 # We will extract separately just the conflicting names and we will no
4349 # longer touch any unique names. It is faster to leave these extract
4350 # automatically by $AR in one run.
4351 $show "(cd $xdir && $AR x $xabs)"
4352 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4353 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4356 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4357 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4358 $AR t "$xabs" | sort | uniq -cd | while read -r count name
4361 while test "$i" -le "$count"
4363 # Put our $i before any first dot (extension)
4364 # Never overwrite any file
4366 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4368 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4370 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4371 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4377 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4382 # Create the old-style object.
4383 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
4387 save_ifs="$IFS"; IFS='~'
4388 for cmd in $cmds; do
4392 $run eval "$cmd" || exit $?
4396 # Exit if we aren't doing a library object file.
4397 if test -z "$libobj"; then
4398 if test -n "$gentop"; then
4399 $show "${rm}r $gentop"
4406 if test "$build_libtool_libs" != yes; then
4407 if test -n "$gentop"; then
4408 $show "${rm}r $gentop"
4412 # Create an invalid libtool object if no PIC, so that we don't
4413 # accidentally link it into a program.
4414 # $show "echo timestamp > $libobj"
4415 # $run eval "echo timestamp > $libobj" || exit $?
4419 if test -n "$pic_flag" || test "$pic_mode" != default; then
4420 # Only do commands if we really have different PIC objects.
4421 reload_objs="$libobjs $reload_conv_objs"
4424 save_ifs="$IFS"; IFS='~'
4425 for cmd in $cmds; do
4429 $run eval "$cmd" || exit $?
4434 if test -n "$gentop"; then
4435 $show "${rm}r $gentop"
4444 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4446 if test -n "$vinfo"; then
4447 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4450 if test -n "$release"; then
4451 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4454 if test "$preload" = yes; then
4455 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4456 test "$dlopen_self_static" = unknown; then
4457 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4462 *-*-rhapsody* | *-*-darwin1.[012])
4463 # On Rhapsody replace the C library is the System framework
4464 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4465 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4471 # Don't allow lazy linking, it breaks C++ global constructors
4472 if test "$tagname" = CXX ; then
4473 compile_command="$compile_command ${wl}-bind_at_load"
4474 finalize_command="$finalize_command ${wl}-bind_at_load"
4479 compile_command="$compile_command $compile_deplibs"
4480 finalize_command="$finalize_command $finalize_deplibs"
4482 if test -n "$rpath$xrpath"; then
4483 # If the user specified any rpath flags, then add them.
4484 for libdir in $rpath $xrpath; do
4485 # This is the magic to use -rpath.
4486 case "$finalize_rpath " in
4488 *) finalize_rpath="$finalize_rpath $libdir" ;;
4493 # Now hardcode the library paths
4496 for libdir in $compile_rpath $finalize_rpath; do
4497 if test -n "$hardcode_libdir_flag_spec"; then
4498 if test -n "$hardcode_libdir_separator"; then
4499 if test -z "$hardcode_libdirs"; then
4500 hardcode_libdirs="$libdir"
4502 # Just accumulate the unique libdirs.
4503 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4504 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4507 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4512 eval flag=\"$hardcode_libdir_flag_spec\"
4513 rpath="$rpath $flag"
4515 elif test -n "$runpath_var"; then
4516 case "$perm_rpath " in
4518 *) perm_rpath="$perm_rpath $libdir" ;;
4522 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4523 case :$dllsearchpath: in
4525 *) dllsearchpath="$dllsearchpath:$libdir";;
4530 # Substitute the hardcoded libdirs into the rpath.
4531 if test -n "$hardcode_libdir_separator" &&
4532 test -n "$hardcode_libdirs"; then
4533 libdir="$hardcode_libdirs"
4534 eval rpath=\" $hardcode_libdir_flag_spec\"
4536 compile_rpath="$rpath"
4540 for libdir in $finalize_rpath; do
4541 if test -n "$hardcode_libdir_flag_spec"; then
4542 if test -n "$hardcode_libdir_separator"; then
4543 if test -z "$hardcode_libdirs"; then
4544 hardcode_libdirs="$libdir"
4546 # Just accumulate the unique libdirs.
4547 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4548 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4551 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4556 eval flag=\"$hardcode_libdir_flag_spec\"
4557 rpath="$rpath $flag"
4559 elif test -n "$runpath_var"; then
4560 case "$finalize_perm_rpath " in
4562 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4566 # Substitute the hardcoded libdirs into the rpath.
4567 if test -n "$hardcode_libdir_separator" &&
4568 test -n "$hardcode_libdirs"; then
4569 libdir="$hardcode_libdirs"
4570 eval rpath=\" $hardcode_libdir_flag_spec\"
4572 finalize_rpath="$rpath"
4574 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4575 # Transform all the library objects into standard objects.
4576 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4577 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4581 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4582 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4583 dlsyms="${outputname}S.c"
4585 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4589 if test -n "$dlsyms"; then
4593 # Discover the nlist of each of the dlfiles.
4594 nlist="$output_objdir/${outputname}.nm"
4596 $show "$rm $nlist ${nlist}S ${nlist}T"
4597 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4599 # Parse the name list into a source file.
4600 $show "creating $output_objdir/$dlsyms"
4602 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4603 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4604 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4610 /* Prevent the only kind of declaration conflicts we can make. */
4611 #define lt_preloaded_symbols some_other_symbol
4613 /* External symbol declarations for the compiler. */\
4616 if test "$dlself" = yes; then
4617 $show "generating symbol list for \`$output'"
4619 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4621 # Add our own program objects to the symbol list.
4622 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4623 for arg in $progfiles; do
4624 $show "extracting global C symbols from \`$arg'"
4625 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4628 if test -n "$exclude_expsyms"; then
4629 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4630 $run eval '$mv "$nlist"T "$nlist"'
4633 if test -n "$export_symbols_regex"; then
4634 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4635 $run eval '$mv "$nlist"T "$nlist"'
4638 # Prepare the list of exported symbols
4639 if test -z "$export_symbols"; then
4640 export_symbols="$output_objdir/$output.exp"
4641 $run $rm $export_symbols
4642 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4644 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4645 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4646 $run eval 'mv "$nlist"T "$nlist"'
4650 for arg in $dlprefiles; do
4651 $show "extracting global C symbols from \`$arg'"
4652 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4653 $run eval '$echo ": $name " >> "$nlist"'
4654 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4657 if test -z "$run"; then
4658 # Make sure we have at least an empty file.
4659 test -f "$nlist" || : > "$nlist"
4661 if test -n "$exclude_expsyms"; then
4662 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4663 $mv "$nlist"T "$nlist"
4666 # Try sorting and uniquifying the output.
4667 if grep -v "^: " < "$nlist" |
4668 if sort -k 3 </dev/null >/dev/null 2>&1; then
4673 uniq > "$nlist"S; then
4676 grep -v "^: " < "$nlist" > "$nlist"S
4679 if test -f "$nlist"S; then
4680 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4682 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4685 $echo >> "$output_objdir/$dlsyms" "\
4687 #undef lt_preloaded_symbols
4689 #if defined (__STDC__) && __STDC__
4690 # define lt_ptr void *
4692 # define lt_ptr char *
4696 /* The mapping between symbol names and symbols. */
4701 lt_preloaded_symbols[] =
4705 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4707 $echo >> "$output_objdir/$dlsyms" "\
4711 /* This works around a problem in FreeBSD linker */
4712 #ifdef FREEBSD_WORKAROUND
4713 static const void *lt_preloaded_setup() {
4714 return lt_preloaded_symbols;
4724 pic_flag_for_symtable=
4726 # compiling the symbol table file with pic_flag works around
4727 # a FreeBSD bug that causes programs to crash when -lm is
4728 # linked before any other PIC object. But we must not use
4729 # pic_flag when linking with -static. The problem exists in
4730 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4731 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4732 case "$compile_command " in
4734 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4737 case "$compile_command " in
4739 *) pic_flag_for_symtable=" $pic_flag";;
4743 # Now compile the dynamic symbol file.
4744 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4745 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4747 # Clean up the generated files.
4748 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4749 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4751 # Transform the symbol file into the correct name.
4752 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4753 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4756 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4761 # We keep going just in case the user didn't refer to
4762 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4763 # really was required.
4765 # Nullify the symbol file.
4766 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4767 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4770 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4771 # Replace the output file specification.
4772 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4773 link_command="$compile_command$compile_rpath"
4775 # We have no uninstalled library dependencies, so finalize right now.
4776 $show "$link_command"
4777 $run eval "$link_command"
4780 # Delete the generated files.
4781 if test -n "$dlsyms"; then
4782 $show "$rm $output_objdir/${outputname}S.${objext}"
4783 $run $rm "$output_objdir/${outputname}S.${objext}"
4789 if test -n "$shlibpath_var"; then
4790 # We should set the shlibpath_var
4792 for dir in $temp_rpath; do
4794 [\\/]* | [A-Za-z]:[\\/]*)
4799 # Relative path: add a thisdir entry.
4800 rpath="$rpath\$thisdir/$dir:"
4807 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4808 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4810 if test -n "$finalize_shlibpath"; then
4811 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4816 if test -n "$runpath_var"; then
4817 if test -n "$perm_rpath"; then
4818 # We should set the runpath_var.
4820 for dir in $perm_rpath; do
4823 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4825 if test -n "$finalize_perm_rpath"; then
4826 # We should set the runpath_var.
4828 for dir in $finalize_perm_rpath; do
4831 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4835 if test "$no_install" = yes; then
4836 # We don't need to create a wrapper script.
4837 link_command="$compile_var$compile_command$compile_rpath"
4838 # Replace the output file specification.
4839 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4840 # Delete the old output file.
4842 # Link the executable and exit
4843 $show "$link_command"
4844 $run eval "$link_command" || exit $?
4848 if test "$hardcode_action" = relink; then
4849 # Fast installation is not supported
4850 link_command="$compile_var$compile_command$compile_rpath"
4851 relink_command="$finalize_var$finalize_command$finalize_rpath"
4853 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4854 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4856 if test "$fast_install" != no; then
4857 link_command="$finalize_var$compile_command$finalize_rpath"
4858 if test "$fast_install" = yes; then
4859 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4861 # fast_install is set to needless
4865 link_command="$compile_var$compile_command$compile_rpath"
4866 relink_command="$finalize_var$finalize_command$finalize_rpath"
4870 # Replace the output file specification.
4871 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4873 # Delete the old output files.
4874 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4876 $show "$link_command"
4877 $run eval "$link_command" || exit $?
4879 # Now create the wrapper script.
4880 $show "creating $output"
4882 # Quote the relink command for shipping.
4883 if test -n "$relink_command"; then
4884 # Preserve any variables that may affect compiler behavior
4885 for var in $variables_saved_for_relink; do
4886 if eval test -z \"\${$var+set}\"; then
4887 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4888 elif eval var_value=\$$var; test -z "$var_value"; then
4889 relink_command="$var=; export $var; $relink_command"
4891 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4892 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4895 relink_command="(cd `pwd`; $relink_command)"
4896 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4899 # Quote $echo for shipping.
4900 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4902 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4903 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4905 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4907 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4910 # Only actually do things if our run command is non-null.
4911 if test -z "$run"; then
4912 # win32 will think the script is a binary if it has
4913 # a .exe suffix, so we strip it off here.
4915 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4917 # test for cygwin because mv fails w/o .exe extensions
4921 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4925 *cygwin* | *mingw* )
4926 cwrappersource=`$echo ${objdir}/lt-${output}.c`
4927 cwrapper=`$echo ${output}.exe`
4928 $rm $cwrappersource $cwrapper
4929 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4931 cat > $cwrappersource <<EOF
4933 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4934 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4936 The $output program cannot be directly executed until all the libtool
4937 libraries that it depends on are installed.
4939 This wrapper executable should never be moved out of the build directory.
4940 If it is, it will not operate correctly.
4942 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4943 but could eventually absorb all of the scripts functionality and
4944 exec $objdir/$outputname directly.
4947 cat >> $cwrappersource<<"EOF"
4955 #if defined(PATH_MAX)
4956 # define LT_PATHMAX PATH_MAX
4957 #elif defined(MAXPATHLEN)
4958 # define LT_PATHMAX MAXPATHLEN
4960 # define LT_PATHMAX 1024
4963 #ifndef DIR_SEPARATOR
4964 #define DIR_SEPARATOR '/'
4967 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4969 #define HAVE_DOS_BASED_FILE_SYSTEM
4970 #ifndef DIR_SEPARATOR_2
4971 #define DIR_SEPARATOR_2 '\\'
4975 #ifndef DIR_SEPARATOR_2
4976 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4977 #else /* DIR_SEPARATOR_2 */
4978 # define IS_DIR_SEPARATOR(ch) \
4979 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4980 #endif /* DIR_SEPARATOR_2 */
4982 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4983 #define XFREE(stale) do { \
4984 if (stale) { free ((void *) stale); stale = 0; } \
4987 const char *program_name = NULL;
4989 void * xmalloc (size_t num);
4990 char * xstrdup (const char *string);
4991 char * basename (const char *name);
4992 char * fnqualify(const char *path);
4993 char * strendzap(char *str, const char *pat);
4994 void lt_fatal (const char *message, ...);
4997 main (int argc, char *argv[])
5002 program_name = (char *) xstrdup ((char *) basename (argv[0]));
5003 newargz = XMALLOC(char *, argc+2);
5006 cat >> $cwrappersource <<EOF
5007 newargz[0] = "$SHELL";
5010 cat >> $cwrappersource <<"EOF"
5011 newargz[1] = fnqualify(argv[0]);
5012 /* we know the script has the same name, without the .exe */
5013 /* so make sure newargz[1] doesn't end in .exe */
5014 strendzap(newargz[1],".exe");
5015 for (i = 1; i < argc; i++)
5016 newargz[i+1] = xstrdup(argv[i]);
5017 newargz[argc+1] = NULL;
5020 cat >> $cwrappersource <<EOF
5021 execv("$SHELL",newargz);
5024 cat >> $cwrappersource <<"EOF"
5028 xmalloc (size_t num)
5030 void * p = (void *) malloc (num);
5032 lt_fatal ("Memory exhausted");
5038 xstrdup (const char *string)
5040 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5045 basename (const char *name)
5049 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5050 /* Skip over the disk name in MSDOS pathnames. */
5051 if (isalpha (name[0]) && name[1] == ':')
5055 for (base = name; *name; name++)
5056 if (IS_DIR_SEPARATOR (*name))
5058 return (char *) base;
5062 fnqualify(const char *path)
5066 char tmp[LT_PATHMAX + 1];
5068 assert(path != NULL);
5070 /* Is it qualified already? */
5071 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5072 if (isalpha (path[0]) && path[1] == ':')
5073 return xstrdup (path);
5075 if (IS_DIR_SEPARATOR (path[0]))
5076 return xstrdup (path);
5078 /* prepend the current directory */
5079 /* doesn't handle '~' */
5080 if (getcwd (tmp, LT_PATHMAX) == NULL)
5081 lt_fatal ("getcwd failed");
5082 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
5083 p = XMALLOC(char, size);
5084 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
5089 strendzap(char *str, const char *pat)
5093 assert(str != NULL);
5094 assert(pat != NULL);
5097 patlen = strlen(pat);
5101 str += len - patlen;
5102 if (strcmp(str, pat) == 0)
5109 lt_error_core (int exit_status, const char * mode,
5110 const char * message, va_list ap)
5112 fprintf (stderr, "%s: %s: ", program_name, mode);
5113 vfprintf (stderr, message, ap);
5114 fprintf (stderr, ".\n");
5116 if (exit_status >= 0)
5121 lt_fatal (const char *message, ...)
5124 va_start (ap, message);
5125 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5129 # we should really use a build-platform specific compiler
5130 # here, but OTOH, the wrappers (shell script and this C one)
5131 # are only useful if you want to execute the "real" binary.
5132 # Since the "real" binary is built for $host, then this
5133 # wrapper might as well be built for $host, too.
5134 $run $LTCC -s -o $cwrapper $cwrappersource
5138 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5143 # $output - temporary wrapper script for $objdir/$outputname
5144 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5146 # The $output program cannot be directly executed until all the libtool
5147 # libraries that it depends on are installed.
5149 # This wrapper script should never be moved out of the build directory.
5150 # If it is, it will not operate correctly.
5152 # Sed substitution that helps us do robust quoting. It backslashifies
5153 # metacharacters that are still active within double-quoted strings.
5154 Xsed='${SED} -e 1s/^X//'
5155 sed_quote_subst='$sed_quote_subst'
5157 # The HP-UX ksh and POSIX shell print the target directory to stdout
5159 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5161 relink_command=\"$relink_command\"
5163 # This environment variable determines our operation mode.
5164 if test \"\$libtool_install_magic\" = \"$magic\"; then
5165 # install mode needs the following variable:
5166 notinst_deplibs='$notinst_deplibs'
5168 # When we are sourced in execute mode, \$file and \$echo are already set.
5169 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5172 # Make sure echo works.
5173 if test \"X\$1\" = X--no-reexec; then
5174 # Discard the --no-reexec flag, and continue.
5176 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5177 # Yippee, \$echo works!
5180 # Restart under the correct shell, and then maybe \$echo will work.
5181 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5187 # Find the directory that this script lives in.
5188 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5189 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5191 # Follow symbolic links until we get to the real thisdir.
5192 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5193 while test -n \"\$file\"; do
5194 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5196 # If there was a directory component, then change thisdir.
5197 if test \"x\$destdir\" != \"x\$file\"; then
5198 case \"\$destdir\" in
5199 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5200 *) thisdir=\"\$thisdir/\$destdir\" ;;
5204 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5205 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5208 # Try to get the absolute directory name.
5209 absdir=\`cd \"\$thisdir\" && pwd\`
5210 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5213 if test "$fast_install" = yes; then
5215 program=lt-'$outputname'$exeext
5216 progdir=\"\$thisdir/$objdir\"
5218 if test ! -f \"\$progdir/\$program\" || \\
5219 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5220 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5222 file=\"\$\$-\$program\"
5224 if test ! -d \"\$progdir\"; then
5225 $mkdir \"\$progdir\"
5227 $rm \"\$progdir/\$file\"
5232 # relink executable if necessary
5233 if test -n \"\$relink_command\"; then
5234 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5236 $echo \"\$relink_command_output\" >&2
5237 $rm \"\$progdir/\$file\"
5242 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5243 { $rm \"\$progdir/\$program\";
5244 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5245 $rm \"\$progdir/\$file\"
5249 program='$outputname'
5250 progdir=\"\$thisdir/$objdir\"
5256 if test -f \"\$progdir/\$program\"; then"
5258 # Export our shlibpath_var if we have one.
5259 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5261 # Add our own library path to $shlibpath_var
5262 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5264 # Some systems cannot cope with colon-terminated $shlibpath_var
5265 # The second colon is a workaround for a bug in BeOS R4 sed
5266 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5268 export $shlibpath_var
5272 # fixup the dll searchpath if we need to.
5273 if test -n "$dllsearchpath"; then
5275 # Add the dll search path components to the executable PATH
5276 PATH=$dllsearchpath:\$PATH
5281 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5282 # Run the actual program with our arguments.
5285 # Backslashes separate directories on plain windows
5286 *-*-mingw | *-*-os2*)
5288 exec \$progdir\\\\\$program \${1+\"\$@\"}
5294 exec \$progdir/\$program \${1+\"\$@\"}
5299 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5303 # The program doesn't exist.
5304 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5305 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5306 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5317 # See if we need to build an old-fashioned archive.
5318 for oldlib in $oldlibs; do
5320 if test "$build_libtool_libs" = convenience; then
5321 oldobjs="$libobjs_save"
5322 addlibs="$convenience"
5323 build_libtool_libs=no
5325 if test "$build_libtool_libs" = module; then
5326 oldobjs="$libobjs_save"
5327 build_libtool_libs=no
5329 oldobjs="$old_deplibs $non_pic_objects"
5331 addlibs="$old_convenience"
5334 if test -n "$addlibs"; then
5335 gentop="$output_objdir/${outputname}x"
5336 $show "${rm}r $gentop"
5337 $run ${rm}r "$gentop"
5338 $show "$mkdir $gentop"
5339 $run $mkdir "$gentop"
5341 if test "$status" -ne 0 && test ! -d "$gentop"; then
5344 generated="$generated $gentop"
5346 # Add in members from convenience archives.
5347 for xlib in $addlibs; do
5348 # Extract the objects.
5350 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5351 *) xabs=`pwd`"/$xlib" ;;
5353 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5354 xdir="$gentop/$xlib"
5356 $show "${rm}r $xdir"
5358 $show "$mkdir $xdir"
5361 if test "$status" -ne 0 && test ! -d "$xdir"; then
5364 # We will extract separately just the conflicting names and we will no
5365 # longer touch any unique names. It is faster to leave these extract
5366 # automatically by $AR in one run.
5367 $show "(cd $xdir && $AR x $xabs)"
5368 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5369 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5372 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5373 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5374 $AR t "$xabs" | sort | uniq -cd | while read -r count name
5377 while test "$i" -le "$count"
5379 # Put our $i before any first dot (extension)
5380 # Never overwrite any file
5382 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5384 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5386 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5387 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5393 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5397 # Do each command in the archive commands.
5398 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5399 cmds=$old_archive_from_new_cmds
5401 eval cmds=\"$old_archive_cmds\"
5403 if len=`expr "X$cmds" : ".*"` &&
5404 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5405 cmds=$old_archive_cmds
5407 # the command line is too long to link in one step, link in parts
5408 $echo "using piecewise archive linking..."
5413 save_oldobjs=$oldobjs
5414 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5415 # encoded into archives. This makes 'ar r' malfunction in
5416 # this piecewise linking case whenever conflicting object
5417 # names appear in distinct ar calls; check, warn and compensate.
5418 if (for obj in $save_oldobjs
5420 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5421 done | sort | sort -uc >/dev/null 2>&1); then
5424 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5425 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5428 # Is there a better way of finding the last object in the list?
5429 for obj in $save_oldobjs
5433 for obj in $save_oldobjs
5435 oldobjs="$objlist $obj"
5436 objlist="$objlist $obj"
5437 eval test_cmds=\"$old_archive_cmds\"
5438 if len=`expr "X$test_cmds" : ".*"` &&
5439 test "$len" -le "$max_cmd_len"; then
5442 # the above command should be used before it gets too long
5444 if test "$obj" = "$last_oldobj" ; then
5447 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5448 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5454 if test "X$oldobjs" = "X" ; then
5455 eval cmds=\"\$concat_cmds\"
5457 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5461 save_ifs="$IFS"; IFS='~'
5462 for cmd in $cmds; do
5466 $run eval "$cmd" || exit $?
5471 if test -n "$generated"; then
5472 $show "${rm}r$generated"
5473 $run ${rm}r$generated
5476 # Now create the libtool archive.
5480 test "$build_old_libs" = yes && old_library="$libname.$libext"
5481 $show "creating $output"
5483 # Preserve any variables that may affect compiler behavior
5484 for var in $variables_saved_for_relink; do
5485 if eval test -z \"\${$var+set}\"; then
5486 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5487 elif eval var_value=\$$var; test -z "$var_value"; then
5488 relink_command="$var=; export $var; $relink_command"
5490 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5491 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5494 # Quote the link command for shipping.
5495 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5496 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5497 if test "$hardcode_automatic" = yes ; then
5502 # Only create the output if not a dry run.
5503 if test -z "$run"; then
5504 for installed in no yes; do
5505 if test "$installed" = yes; then
5506 if test -z "$install_libdir"; then
5509 output="$output_objdir/$outputname"i
5510 # Replace all uninstalled libtool libraries with the installed ones
5512 for deplib in $dependency_libs; do
5515 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5516 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5517 if test -z "$libdir"; then
5518 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5521 newdependency_libs="$newdependency_libs $libdir/$name"
5523 *) newdependency_libs="$newdependency_libs $deplib" ;;
5526 dependency_libs="$newdependency_libs"
5528 for lib in $dlfiles; do
5529 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5530 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5531 if test -z "$libdir"; then
5532 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5535 newdlfiles="$newdlfiles $libdir/$name"
5537 dlfiles="$newdlfiles"
5539 for lib in $dlprefiles; do
5540 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5541 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5542 if test -z "$libdir"; then
5543 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5546 newdlprefiles="$newdlprefiles $libdir/$name"
5548 dlprefiles="$newdlprefiles"
5551 for lib in $dlfiles; do
5553 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5554 *) abs=`pwd`"/$lib" ;;
5556 newdlfiles="$newdlfiles $abs"
5558 dlfiles="$newdlfiles"
5560 for lib in $dlprefiles; do
5562 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5563 *) abs=`pwd`"/$lib" ;;
5565 newdlprefiles="$newdlprefiles $abs"
5567 dlprefiles="$newdlprefiles"
5570 # place dlname in correct position for cygwin
5572 case $host,$output,$installed,$module,$dlname in
5573 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5576 # $outputname - a libtool library file
5577 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5579 # Please DO NOT delete this file!
5580 # It is necessary for linking the library.
5582 # The name that we can dlopen(3).
5585 # Names of this library.
5586 library_names='$library_names'
5588 # The name of the static archive.
5589 old_library='$old_library'
5591 # Libraries that this one depends upon.
5592 dependency_libs='$dependency_libs'
5594 # Version information for $libname.
5599 # Is this an already installed library?
5600 installed=$installed
5602 # Should we warn about portability when linking against -modules?
5603 shouldnotlink=$module
5605 # Files to dlopen/dlpreopen
5607 dlpreopen='$dlprefiles'
5609 # Directory that this library needs to be installed in:
5610 libdir='$install_libdir'"
5611 if test "$installed" = no && test "$need_relink" = yes; then
5613 relink_command=\"$relink_command\""
5618 # Do a symbolic link so that the libtool archive can be found in
5619 # LD_LIBRARY_PATH before the program is installed.
5620 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5621 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5627 # libtool install mode
5629 modename="$modename: install"
5631 # There may be an optional sh(1) argument at the beginning of
5632 # install_prog (especially on Windows NT).
5633 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5634 # Allow the use of GNU shtool's install command.
5635 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5636 # Aesthetically quote it.
5637 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5639 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5643 install_prog="$arg "
5651 # The real first argument should be the name of the installation program.
5652 # Aesthetically quote it.
5653 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5655 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5659 install_prog="$install_prog$arg"
5661 # We need to accept at least all the BSD install flags.
5671 if test -n "$dest"; then
5672 files="$files $dest"
5690 # If the previous option needed an argument, then skip it.
5691 if test -n "$prev"; then
5700 # Aesthetically quote the argument.
5701 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5703 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5707 install_prog="$install_prog $arg"
5710 if test -z "$install_prog"; then
5711 $echo "$modename: you must specify an install program" 1>&2
5716 if test -n "$prev"; then
5717 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5722 if test -z "$files"; then
5723 if test -z "$dest"; then
5724 $echo "$modename: no file or destination specified" 1>&2
5726 $echo "$modename: you must specify a destination" 1>&2
5732 # Strip any trailing slash from the destination.
5733 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5735 # Check to see that the destination is a directory.
5736 test -d "$dest" && isdir=yes
5737 if test "$isdir" = yes; then
5741 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5742 test "X$destdir" = "X$dest" && destdir=.
5743 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5745 # Not a directory, so check to see that there is only one file specified.
5747 if test "$#" -gt 2; then
5748 $echo "$modename: \`$dest' is not a directory" 1>&2
5754 [\\/]* | [A-Za-z]:[\\/]*) ;;
5756 for file in $files; do
5760 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5769 # This variable tells wrapper scripts just to set variables rather
5770 # than running their programs.
5771 libtool_install_magic="$magic"
5776 for file in $files; do
5778 # Do each installation.
5781 # Do the static libraries later.
5782 staticlibs="$staticlibs $file"
5786 # Check to see that this really is a libtool archive.
5787 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5789 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5797 # If there is no directory component, then add one.
5799 */* | *\\*) . $file ;;
5803 # Add the libdir to current_libdirs if it is the destination.
5804 if test "X$destdir" = "X$libdir"; then
5805 case "$current_libdirs " in
5807 *) current_libdirs="$current_libdirs $libdir" ;;
5810 # Note the libdir as a future libdir.
5811 case "$future_libdirs " in
5813 *) future_libdirs="$future_libdirs $libdir" ;;
5817 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5818 test "X$dir" = "X$file/" && dir=
5821 if test -n "$relink_command"; then
5822 # Determine the prefix the user has applied to our future dir.
5823 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5825 # Don't allow the user to place us outside of our expected
5826 # location b/c this prevents finding dependent libraries that
5827 # are installed to the same prefix.
5828 # At present, this check doesn't affect windows .dll's that
5829 # are installed into $libdir/../bin (currently, that works fine)
5830 # but it's something to keep an eye on.
5831 if test "$inst_prefix_dir" = "$destdir"; then
5832 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5836 if test -n "$inst_prefix_dir"; then
5837 # Stick the inst_prefix_dir data into the link command.
5838 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5840 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5843 $echo "$modename: warning: relinking \`$file'" 1>&2
5844 $show "$relink_command"
5845 if $run eval "$relink_command"; then :
5847 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5852 # See the names of the shared library.
5853 set dummy $library_names
5854 if test -n "$2"; then
5860 test -n "$relink_command" && srcname="$realname"T
5862 # Install the shared library and build the symlinks.
5863 $show "$install_prog $dir/$srcname $destdir/$realname"
5864 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5865 if test -n "$stripme" && test -n "$striplib"; then
5866 $show "$striplib $destdir/$realname"
5867 $run eval "$striplib $destdir/$realname" || exit $?
5870 if test "$#" -gt 0; then
5871 # Delete the old symlinks, and create new ones.
5874 if test "$linkname" != "$realname"; then
5875 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5876 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5881 # Do each command in the postinstall commands.
5882 lib="$destdir/$realname"
5883 cmds=$postinstall_cmds
5884 save_ifs="$IFS"; IFS='~'
5885 for cmd in $cmds; do
5889 $run eval "$cmd" || exit $?
5894 # Install the pseudo-library for information purposes.
5895 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5896 instname="$dir/$name"i
5897 $show "$install_prog $instname $destdir/$name"
5898 $run eval "$install_prog $instname $destdir/$name" || exit $?
5900 # Maybe install the static library, too.
5901 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
5905 # Install (i.e. copy) a libtool object.
5907 # Figure out destination file name, if it wasn't already specified.
5908 if test -n "$destname"; then
5909 destfile="$destdir/$destname"
5911 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5912 destfile="$destdir/$destfile"
5915 # Deduce the name of the destination old-style object file.
5918 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5921 staticdest="$destfile"
5925 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5931 # Install the libtool object if requested.
5932 if test -n "$destfile"; then
5933 $show "$install_prog $file $destfile"
5934 $run eval "$install_prog $file $destfile" || exit $?
5937 # Install the old object if enabled.
5938 if test "$build_old_libs" = yes; then
5939 # Deduce the name of the old-style object file.
5940 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
5942 $show "$install_prog $staticobj $staticdest"
5943 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
5949 # Figure out destination file name, if it wasn't already specified.
5950 if test -n "$destname"; then
5951 destfile="$destdir/$destname"
5953 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5954 destfile="$destdir/$destfile"
5957 # If the file is missing, and there is a .exe on the end, strip it
5958 # because it is most likely a libtool script we actually want to
5963 if test ! -f "$file"; then
5964 file=`$echo $file|${SED} 's,.exe$,,'`
5970 # Do a test to see if this is really a libtool program.
5973 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
5979 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
5983 # To insure that "foo" is sourced, and not "foo.exe",
5984 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5985 # which disallows the automatic-append-.exe behavior.
5987 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5988 *) wrapperdot=${wrapper} ;;
5990 # If there is no directory component, then add one.
5992 */* | *\\*) . ${wrapperdot} ;;
5993 *) . ./${wrapperdot} ;;
5996 # Check the variables that should have been set.
5997 if test -z "$notinst_deplibs"; then
5998 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6003 for lib in $notinst_deplibs; do
6004 # Check to see that each library is installed.
6006 if test -f "$lib"; then
6007 # If there is no directory component, then add one.
6009 */* | *\\*) . $lib ;;
6013 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6014 if test -n "$libdir" && test ! -f "$libfile"; then
6015 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6021 # To insure that "foo" is sourced, and not "foo.exe",
6022 # finese the cygwin/MSYS system by explicitly sourcing "foo."
6023 # which disallows the automatic-append-.exe behavior.
6025 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6026 *) wrapperdot=${wrapper} ;;
6028 # If there is no directory component, then add one.
6030 */* | *\\*) . ${wrapperdot} ;;
6031 *) . ./${wrapperdot} ;;
6035 if test "$fast_install" = no && test -n "$relink_command"; then
6036 if test "$finalize" = yes && test -z "$run"; then
6038 test -n "$TMPDIR" && tmpdir="$TMPDIR"
6039 tmpdir="$tmpdir/libtool-$$"
6042 if $mkdir "$tmpdir"; then
6046 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6049 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6050 outputname="$tmpdir/$file"
6051 # Replace the output file specification.
6052 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6054 $show "$relink_command"
6055 if $run eval "$relink_command"; then :
6057 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6063 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6066 # Install the binary that we compiled earlier.
6067 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6071 # remove .exe since cygwin /usr/bin/install will append another
6073 case $install_prog,$host in
6074 */usr/bin/install*,*cygwin*)
6075 case $file:$destfile in
6080 destfile=$destfile.exe
6083 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6088 $show "$install_prog$stripme $file $destfile"
6089 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6090 test -n "$outputname" && ${rm}r "$tmpdir"
6095 for file in $staticlibs; do
6096 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6098 # Set up the ranlib parameters.
6099 oldlib="$destdir/$name"
6101 $show "$install_prog $file $oldlib"
6102 $run eval "$install_prog \$file \$oldlib" || exit $?
6104 if test -n "$stripme" && test -n "$old_striplib"; then
6105 $show "$old_striplib $oldlib"
6106 $run eval "$old_striplib $oldlib" || exit $?
6109 # Do each command in the postinstall commands.
6110 cmds=$old_postinstall_cmds
6111 save_ifs="$IFS"; IFS='~'
6112 for cmd in $cmds; do
6116 $run eval "$cmd" || exit $?
6121 if test -n "$future_libdirs"; then
6122 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6125 if test -n "$current_libdirs"; then
6126 # Maybe just do a dry run.
6127 test -n "$run" && current_libdirs=" -n$current_libdirs"
6128 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6134 # libtool finish mode
6136 modename="$modename: finish"
6140 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6143 libdirs="$libdirs $dir"
6146 for libdir in $libdirs; do
6147 if test -n "$finish_cmds"; then
6148 # Do each command in the finish commands.
6150 save_ifs="$IFS"; IFS='~'
6151 for cmd in $cmds; do
6155 $run eval "$cmd" || admincmds="$admincmds
6160 if test -n "$finish_eval"; then
6161 # Do the single finish_eval.
6162 eval cmds=\"$finish_eval\"
6163 $run eval "$cmds" || admincmds="$admincmds
6169 # Exit here if they wanted silent mode.
6170 test "$show" = : && exit $EXIT_SUCCESS
6172 $echo "----------------------------------------------------------------------"
6173 $echo "Libraries have been installed in:"
6174 for libdir in $libdirs; do
6178 $echo "If you ever happen to want to link against installed libraries"
6179 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6180 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6181 $echo "flag during linking and do at least one of the following:"
6182 if test -n "$shlibpath_var"; then
6183 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6184 $echo " during execution"
6186 if test -n "$runpath_var"; then
6187 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6188 $echo " during linking"
6190 if test -n "$hardcode_libdir_flag_spec"; then
6192 eval flag=\"$hardcode_libdir_flag_spec\"
6194 $echo " - use the \`$flag' linker flag"
6196 if test -n "$admincmds"; then
6197 $echo " - have your system administrator run these commands:$admincmds"
6199 if test -f /etc/ld.so.conf; then
6200 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6203 $echo "See any operating system documentation about shared libraries for"
6204 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6205 $echo "----------------------------------------------------------------------"
6209 # libtool execute mode
6211 modename="$modename: execute"
6213 # The first argument is the command name.
6215 if test -z "$cmd"; then
6216 $echo "$modename: you must specify a COMMAND" 1>&2
6221 # Handle -dlopen flags immediately.
6222 for file in $execute_dlfiles; do
6223 if test ! -f "$file"; then
6224 $echo "$modename: \`$file' is not a file" 1>&2
6232 # Check to see that this really is a libtool archive.
6233 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6235 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6240 # Read the libtool library.
6244 # If there is no directory component, then add one.
6246 */* | *\\*) . $file ;;
6250 # Skip this library if it cannot be dlopened.
6251 if test -z "$dlname"; then
6252 # Warn if it was a shared library.
6253 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6257 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6258 test "X$dir" = "X$file" && dir=.
6260 if test -f "$dir/$objdir/$dlname"; then
6263 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6269 # Just add the directory containing the .lo file.
6270 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6271 test "X$dir" = "X$file" && dir=.
6275 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6280 # Get the absolute pathname.
6281 absdir=`cd "$dir" && pwd`
6282 test -n "$absdir" && dir="$absdir"
6284 # Now add the directory to shlibpath_var.
6285 if eval "test -z \"\$$shlibpath_var\""; then
6286 eval "$shlibpath_var=\"\$dir\""
6288 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6292 # This variable tells wrapper scripts just to set shlibpath_var
6293 # rather than running their programs.
6294 libtool_execute_magic="$magic"
6296 # Check if any of the arguments is a wrapper script.
6303 # Do a test to see if this is really a libtool program.
6304 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6305 # If there is no directory component, then add one.
6307 */* | *\\*) . $file ;;
6311 # Transform arg to wrapped name.
6312 file="$progdir/$program"
6316 # Quote arguments (to preserve shell metacharacters).
6317 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6318 args="$args \"$file\""
6321 if test -z "$run"; then
6322 if test -n "$shlibpath_var"; then
6323 # Export the shlibpath_var.
6324 eval "export $shlibpath_var"
6327 # Restore saved environment variables
6328 if test "${save_LC_ALL+set}" = set; then
6329 LC_ALL="$save_LC_ALL"; export LC_ALL
6331 if test "${save_LANG+set}" = set; then
6332 LANG="$save_LANG"; export LANG
6335 # Now prepare to actually exec the command.
6336 exec_cmd="\$cmd$args"
6338 # Display what would be done.
6339 if test -n "$shlibpath_var"; then
6340 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6341 $echo "export $shlibpath_var"
6348 # libtool clean and uninstall mode
6350 modename="$modename: $mode"
6356 # This variable tells wrapper scripts just to set variables rather
6357 # than running their programs.
6358 libtool_install_magic="$magic"
6363 -f) rm="$rm $arg"; rmforce=yes ;;
6364 -*) rm="$rm $arg" ;;
6365 *) files="$files $arg" ;;
6369 if test -z "$rm"; then
6370 $echo "$modename: you must specify an RM program" 1>&2
6377 origobjdir="$objdir"
6378 for file in $files; do
6379 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6380 if test "X$dir" = "X$file"; then
6382 objdir="$origobjdir"
6384 objdir="$dir/$origobjdir"
6386 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6387 test "$mode" = uninstall && objdir="$dir"
6389 # Remember objdir for removal later, being careful to avoid duplicates
6390 if test "$mode" = clean; then
6393 *) rmdirs="$rmdirs $objdir" ;;
6397 # Don't error if the file doesn't exist and rm -f was used.
6398 if (test -L "$file") >/dev/null 2>&1 \
6399 || (test -h "$file") >/dev/null 2>&1 \
6400 || test -f "$file"; then
6402 elif test -d "$file"; then
6405 elif test "$rmforce" = yes; then
6413 # Possibly a libtool archive, so verify it.
6414 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6417 # Delete the libtool libraries and symlinks.
6418 for n in $library_names; do
6419 rmfiles="$rmfiles $objdir/$n"
6421 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6422 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6424 if test "$mode" = uninstall; then
6425 if test -n "$library_names"; then
6426 # Do each command in the postuninstall commands.
6427 cmds=$postuninstall_cmds
6428 save_ifs="$IFS"; IFS='~'
6429 for cmd in $cmds; do
6434 if test "$?" -ne 0 && test "$rmforce" != yes; then
6441 if test -n "$old_library"; then
6442 # Do each command in the old_postuninstall commands.
6443 cmds=$old_postuninstall_cmds
6444 save_ifs="$IFS"; IFS='~'
6445 for cmd in $cmds; do
6450 if test "$?" -ne 0 && test "$rmforce" != yes; then
6456 # FIXME: should reinstall the best remaining shared library.
6462 # Possibly a libtool object, so verify it.
6463 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6468 # Add PIC object to the list of files to remove.
6469 if test -n "$pic_object" \
6470 && test "$pic_object" != none; then
6471 rmfiles="$rmfiles $dir/$pic_object"
6474 # Add non-PIC object to the list of files to remove.
6475 if test -n "$non_pic_object" \
6476 && test "$non_pic_object" != none; then
6477 rmfiles="$rmfiles $dir/$non_pic_object"
6483 if test "$mode" = clean ; then
6487 file=`$echo $file|${SED} 's,.exe$,,'`
6488 noexename=`$echo $name|${SED} 's,.exe$,,'`
6489 # $file with .exe has already been added to rmfiles,
6490 # add $file without .exe
6491 rmfiles="$rmfiles $file"
6494 # Do a test to see if this is a libtool program.
6495 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6499 # note $name still contains .exe if it was in $file originally
6500 # as does the version of $file that was added into $rmfiles
6501 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6502 if test "$fast_install" = yes && test -n "$relink_command"; then
6503 rmfiles="$rmfiles $objdir/lt-$name"
6505 if test "X$noexename" != "X$name" ; then
6506 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6512 $show "$rm $rmfiles"
6513 $run $rm $rmfiles || exit_status=1
6515 objdir="$origobjdir"
6517 # Try to remove the ${objdir}s in the directories where we deleted files
6518 for dir in $rmdirs; do
6519 if test -d "$dir"; then
6521 $run rmdir $dir >/dev/null 2>&1
6529 $echo "$modename: you must specify a MODE" 1>&2
6530 $echo "$generic_help" 1>&2
6535 if test -z "$exec_cmd"; then
6536 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6537 $echo "$generic_help" 1>&2
6540 fi # test -z "$show_help"
6542 if test -n "$exec_cmd"; then
6547 # We need to display help for each of the modes.
6550 "Usage: $modename [OPTION]... [MODE-ARG]...
6552 Provide generalized library-building support services.
6554 --config show all configuration variables
6555 --debug enable verbose shell tracing
6556 -n, --dry-run display commands without modifying any files
6557 --features display basic configuration information and exit
6558 --finish same as \`--mode=finish'
6559 --help display this help message and exit
6560 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6561 --quiet same as \`--silent'
6562 --silent don't print informational messages
6563 --tag=TAG use configuration variables from tag TAG
6564 --version print version information
6566 MODE must be one of the following:
6568 clean remove files from the build directory
6569 compile compile a source file into a libtool object
6570 execute automatically set library path, then run a program
6571 finish complete the installation of libtool libraries
6572 install install libraries or executables
6573 link create a library or an executable
6574 uninstall remove libraries from an installed directory
6576 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6577 a more detailed description of MODE.
6579 Report bugs to <bug-libtool@gnu.org>."
6585 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6587 Remove files from the build directory.
6589 RM is the name of the program to use to delete files associated with each FILE
6590 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6593 If FILE is a libtool library, object or program, all the files associated
6594 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6599 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6601 Compile a source file into a libtool library object.
6603 This mode accepts the following additional options:
6605 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6606 -prefer-pic try to building PIC objects only
6607 -prefer-non-pic try to building non-PIC objects only
6608 -static always build a \`.o' file suitable for static linking
6610 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6611 from the given SOURCEFILE.
6613 The output file name is determined by removing the directory component from
6614 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6615 library object suffix, \`.lo'."
6620 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6622 Automatically set library path, then run a program.
6624 This mode accepts the following additional options:
6626 -dlopen FILE add the directory containing FILE to the library path
6628 This mode sets the library path environment variable according to \`-dlopen'
6631 If any of the ARGS are libtool executable wrappers, then they are translated
6632 into their corresponding uninstalled binary, and any of their required library
6633 directories are added to the library path.
6635 Then, COMMAND is executed, with ARGS as arguments."
6640 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6642 Complete the installation of libtool libraries.
6644 Each LIBDIR is a directory that contains libtool libraries.
6646 The commands that this mode executes may require superuser privileges. Use
6647 the \`--dry-run' option if you just want to see what would be executed."
6652 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6654 Install executables or libraries.
6656 INSTALL-COMMAND is the installation command. The first component should be
6657 either the \`install' or \`cp' program.
6659 The rest of the components are interpreted as arguments to that command (only
6660 BSD-compatible install options are recognized)."
6665 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6667 Link object files or libraries together to form another library, or to
6668 create an executable program.
6670 LINK-COMMAND is a command using the C compiler that you would use to create
6671 a program from several object files.
6673 The following components of LINK-COMMAND are treated specially:
6675 -all-static do not do any dynamic linking at all
6676 -avoid-version do not add a version suffix if possible
6677 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6678 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6679 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6680 -export-symbols SYMFILE
6681 try to export only the symbols listed in SYMFILE
6682 -export-symbols-regex REGEX
6683 try to export only the symbols matching REGEX
6684 -LLIBDIR search LIBDIR for required installed libraries
6685 -lNAME OUTPUT-FILE requires the installed library libNAME
6686 -module build a library that can dlopened
6687 -no-fast-install disable the fast-install mode
6688 -no-install link a not-installable executable
6689 -no-undefined declare that a library does not refer to external symbols
6690 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6691 -objectlist FILE Use a list of object files found in FILE to specify objects
6692 -precious-files-regex REGEX
6693 don't remove output files matching REGEX
6694 -release RELEASE specify package release information
6695 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6696 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6697 -static do not do any dynamic linking of libtool libraries
6698 -version-info CURRENT[:REVISION[:AGE]]
6699 specify library version info [each variable defaults to 0]
6701 All other options (arguments beginning with \`-') are ignored.
6703 Every other argument is treated as a filename. Files ending in \`.la' are
6704 treated as uninstalled libtool libraries, other files are standard or library
6707 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6708 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6709 required, except when creating a convenience library.
6711 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6712 using \`ar' and \`ranlib', or on Windows using \`lib'.
6714 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6715 is created, otherwise an executable program is created."
6720 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6722 Remove libraries from an installation directory.
6724 RM is the name of the program to use to delete files associated with each FILE
6725 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6728 If FILE is a libtool library, all the files associated with it are deleted.
6729 Otherwise, only FILE itself is deleted using RM."
6733 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6740 $echo "Try \`$modename --help' for more information about other modes."
6744 # The TAGs below are defined such that we never get into a situation
6745 # in which we disable both kinds of libraries. Given conflicting
6746 # choices, we go for a static library, that is the most portable,
6747 # since we can't tell whether shared libraries were disabled because
6748 # the user asked for that or because the platform doesn't support
6749 # them. This is particularly important on AIX, because we don't
6750 # support having both static and shared libraries enabled at the same
6751 # time on that platform, so we default to a shared-only configuration.
6752 # If a disable-shared tag is given, we'll fallback to a static-only
6753 # configuration. But we'll never go from static-only to shared-only.
6755 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6756 build_libtool_libs=no
6758 # ### END LIBTOOL TAG CONFIG: disable-shared
6760 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6761 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6762 # ### END LIBTOOL TAG CONFIG: disable-static
6768 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6770 # Libtool was configured on host this-too-shall-pass.mit.edu:
6772 # Shell to use when invoking shell scripts.
6775 # Whether or not to build shared libraries.
6776 build_libtool_libs=yes
6778 # Whether or not to build static libraries.
6781 # Whether or not to add -lc for building shared libraries.
6782 build_libtool_need_lc=no
6784 # Whether or not to disallow shared libs when runtime libs are static
6785 allow_libtool_libs_with_static_runtimes=no
6787 # Whether or not to optimize for fast installation.
6788 fast_install=needless
6792 host=sparc-sun-solaris2.10
6794 # An echo program that does not interpret backslashes.
6804 # A language-specific compiler.
6807 # Is the compiler the GNU C compiler?
6813 # The linker used to build libraries.
6814 LD="/usr/ccs/bin/ld"
6816 # Whether we need hard or soft links.
6819 # A BSD-compatible nm program.
6820 NM="/usr/ccs/bin/nm -p"
6822 # A symbol stripping program
6825 # Used to examine libraries when file_magic_cmd begins "file"
6828 # Used on cygwin: DLL creation program.
6831 # Used on cygwin: object dumper.
6834 # Used on cygwin: assembler.
6837 # The name of the directory that contains temporary libtool files.
6840 # How to create reloadable object files.
6842 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
6844 # How to pass a linker flag through the compiler.
6847 # Object file suffix (normally "o").
6850 # Old archive suffix (normally "a").
6853 # Shared library suffix (normally ".so").
6856 # Executable file suffix (normally "").
6859 # Additional compiler flags for building library objects.
6860 pic_flag=" -fPIC -DPIC"
6863 # What is the maximum length of a command?
6866 # Does compiler simultaneously support -c and -o options?
6869 # Must we lock files when doing compilation ?
6872 # Do we need the lib prefix for modules?
6875 # Do we need a version for libraries?
6878 # Whether dlopen is supported.
6879 dlopen_support=unknown
6881 # Whether dlopen of programs is supported.
6884 # Whether dlopen of statically linked programs is supported.
6885 dlopen_self_static=unknown
6887 # Compiler flag to prevent dynamic linking.
6888 link_static_flag="-static"
6890 # Compiler flag to turn off builtin functions.
6891 no_builtin_flag=" -fno-builtin"
6893 # Compiler flag to allow reflexive dlopens.
6894 export_dynamic_flag_spec=""
6896 # Compiler flag to generate shared objects directly from archives.
6897 whole_archive_flag_spec=""
6899 # Compiler flag to generate thread-safe objects.
6900 thread_safe_flag_spec=""
6902 # Library versioning type.
6905 # Format of library name prefix.
6906 libname_spec="lib\$name"
6908 # List of archive names. First name is the real one, the rest are links.
6909 # The last name is the one that the linker finds with -lNAME.
6910 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6912 # The coded name of the library, if different from the real name.
6913 soname_spec="\${libname}\${release}\${shared_ext}\$major"
6915 # Commands used to build and install an old-style archive.
6917 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6918 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6919 old_postuninstall_cmds=""
6921 # Create an old-style archive from a shared archive.
6922 old_archive_from_new_cmds=""
6924 # Create a temporary old-style archive to link instead of a shared archive.
6925 old_archive_from_expsyms_cmds=""
6927 # Commands used to build and install a shared archive.
6928 archive_cmds="\$CC -shared -nostdlib \$LDFLAGS \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-h \$wl\$soname -o \$lib"
6929 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
6930 \$CC -shared -nostdlib \${wl}-M \$wl\$lib.exp -o \$lib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags~\$rm \$lib.exp"
6931 postinstall_cmds="chmod +x \$lib"
6932 postuninstall_cmds=""
6934 # Commands used to build a loadable module (assumed same as above if empty)
6936 module_expsym_cmds=""
6938 # Commands to strip libraries.
6942 # Dependencies to place before the objects being linked to create a
6944 predep_objects="/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crti.o /usr/ccs/lib/values-Xa.o /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crtbegin.o"
6946 # Dependencies to place after the objects being linked to create a
6948 postdep_objects="/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crtend.o /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crtn.o"
6950 # Dependencies to place before the objects being linked to create a
6954 # Dependencies to place after the objects being linked to create a
6956 postdeps="-lstdc++ -lm -R/usr/sfw/lib -lgcc_s -R/usr/sfw/lib -lgcc_s"
6958 # The library search path used internally by the compiler when linking
6960 compiler_lib_search_path="-R/usr/sfw/lib -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3 -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/lib -L/usr/ccs/lib -L/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../.."
6962 # Method to check whether dependent libraries are shared objects.
6963 deplibs_check_method="pass_all"
6965 # Command to use when deplibs_check_method == file_magic.
6966 file_magic_cmd="\$MAGIC_CMD"
6968 # Flag that allows shared libraries with undefined symbols to be built.
6969 allow_undefined_flag=""
6971 # Flag that forces no undefined symbols.
6972 no_undefined_flag=" \${wl}-z \${wl}defs"
6974 # Commands used to finish a libtool library installation in a directory.
6977 # Same as above, but a single script fragment to be evaled but not shown.
6980 # Take the output of nm and produce a listing of raw symbols and C names.
6981 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
6983 # Transform the output of nm in a proper C declaration
6984 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
6986 # Transform the output of nm in a C name address pair
6987 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
6989 # This is the shared library runtime path variable.
6992 # This is the shared library path variable.
6993 shlibpath_var=LD_LIBRARY_PATH
6995 # Is shlibpath searched before the hard-coded library search path?
6996 shlibpath_overrides_runpath=yes
6998 # How to hardcode a shared library path into an executable.
6999 hardcode_action=immediate
7001 # Whether we should hardcode library paths into libraries.
7002 hardcode_into_libs=yes
7004 # Flag to hardcode $libdir into a binary during linking.
7005 # This must work even if $libdir does not exist.
7006 hardcode_libdir_flag_spec="\${wl}-R \$wl\$libdir"
7008 # If ld is used when linking, flag to hardcode $libdir into
7009 # a binary during linking. This must work even if $libdir does
7011 hardcode_libdir_flag_spec_ld=""
7013 # Whether we need a single -rpath flag with a separated argument.
7014 hardcode_libdir_separator=""
7016 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7020 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7024 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7025 # the resulting binary.
7026 hardcode_shlibpath_var=
7028 # Set to yes if building a shared library automatically hardcodes DIR into the library
7029 # and all subsequent libraries and executables linked against it.
7030 hardcode_automatic=no
7032 # Variables whose values should be saved in libtool wrapper scripts and
7033 # restored at relink time.
7034 variables_saved_for_relink="PATH LD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7036 # Whether libtool must link a program against all its dependency libraries.
7037 link_all_deplibs=unknown
7039 # Compile-time system search path for libraries
7040 sys_lib_search_path_spec=" /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/ /usr/lib/gcc/sparc-sun-solaris2.10/3.4.3/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/lib/sparc-sun-solaris2.10/3.4.3/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/lib/ /usr/ccs/lib/sparc-sun-solaris2.10/3.4.3/ /usr/ccs/lib/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../sparc-sun-solaris2.10/3.4.3/ /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../ /lib/sparc-sun-solaris2.10/3.4.3/ /lib/ /usr/lib/sparc-sun-solaris2.10/3.4.3/ /usr/lib/"
7042 # Run-time system search path for libraries
7043 sys_lib_dlsearch_path_spec="/lib /usr/lib"
7045 # Fix the shell variable $srcfile for the compiler.
7048 # Set to yes if exported symbols are required.
7049 always_export_symbols=no
7051 # The commands to list exported symbols.
7052 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7054 # The commands to extract the exported symbol list from a shared archive.
7055 extract_expsyms_cmds=""
7057 # Symbols that should not be listed in the preloaded symbols.
7060 # Symbols that must always be exported.
7063 # ### END LIBTOOL TAG CONFIG: CXX
7065 # ### BEGIN LIBTOOL TAG CONFIG: F77
7067 # Libtool was configured on host this-too-shall-pass.mit.edu:
7069 # Shell to use when invoking shell scripts.
7072 # Whether or not to build shared libraries.
7073 build_libtool_libs=yes
7075 # Whether or not to build static libraries.
7078 # Whether or not to add -lc for building shared libraries.
7079 build_libtool_need_lc=no
7081 # Whether or not to disallow shared libs when runtime libs are static
7082 allow_libtool_libs_with_static_runtimes=no
7084 # Whether or not to optimize for fast installation.
7085 fast_install=needless
7089 host=sparc-sun-solaris2.10
7091 # An echo program that does not interpret backslashes.
7101 # A language-specific compiler.
7104 # Is the compiler the GNU C compiler?
7110 # The linker used to build libraries.
7111 LD="/usr/ccs/bin/ld"
7113 # Whether we need hard or soft links.
7116 # A BSD-compatible nm program.
7117 NM="/usr/ccs/bin/nm -p"
7119 # A symbol stripping program
7122 # Used to examine libraries when file_magic_cmd begins "file"
7125 # Used on cygwin: DLL creation program.
7128 # Used on cygwin: object dumper.
7131 # Used on cygwin: assembler.
7134 # The name of the directory that contains temporary libtool files.
7137 # How to create reloadable object files.
7139 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7141 # How to pass a linker flag through the compiler.
7144 # Object file suffix (normally "o").
7147 # Old archive suffix (normally "a").
7150 # Shared library suffix (normally ".so").
7153 # Executable file suffix (normally "").
7156 # Additional compiler flags for building library objects.
7160 # What is the maximum length of a command?
7163 # Does compiler simultaneously support -c and -o options?
7166 # Must we lock files when doing compilation ?
7169 # Do we need the lib prefix for modules?
7172 # Do we need a version for libraries?
7175 # Whether dlopen is supported.
7176 dlopen_support=unknown
7178 # Whether dlopen of programs is supported.
7181 # Whether dlopen of statically linked programs is supported.
7182 dlopen_self_static=unknown
7184 # Compiler flag to prevent dynamic linking.
7185 link_static_flag="-static"
7187 # Compiler flag to turn off builtin functions.
7190 # Compiler flag to allow reflexive dlopens.
7191 export_dynamic_flag_spec=""
7193 # Compiler flag to generate shared objects directly from archives.
7194 whole_archive_flag_spec="-z allextract\$convenience -z defaultextract"
7196 # Compiler flag to generate thread-safe objects.
7197 thread_safe_flag_spec=""
7199 # Library versioning type.
7202 # Format of library name prefix.
7203 libname_spec="lib\$name"
7205 # List of archive names. First name is the real one, the rest are links.
7206 # The last name is the one that the linker finds with -lNAME.
7207 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7209 # The coded name of the library, if different from the real name.
7210 soname_spec="\${libname}\${release}\${shared_ext}\$major"
7212 # Commands used to build and install an old-style archive.
7214 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
7215 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
7216 old_postuninstall_cmds=""
7218 # Create an old-style archive from a shared archive.
7219 old_archive_from_new_cmds=""
7221 # Create a temporary old-style archive to link instead of a shared archive.
7222 old_archive_from_expsyms_cmds=""
7224 # Commands used to build and install a shared archive.
7225 archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags"
7226 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
7227 \$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp"
7228 postinstall_cmds="chmod +x \$lib"
7229 postuninstall_cmds=""
7231 # Commands used to build a loadable module (assumed same as above if empty)
7233 module_expsym_cmds=""
7235 # Commands to strip libraries.
7239 # Dependencies to place before the objects being linked to create a
7243 # Dependencies to place after the objects being linked to create a
7247 # Dependencies to place before the objects being linked to create a
7251 # Dependencies to place after the objects being linked to create a
7255 # The library search path used internally by the compiler when linking
7257 compiler_lib_search_path=""
7259 # Method to check whether dependent libraries are shared objects.
7260 deplibs_check_method="pass_all"
7262 # Command to use when deplibs_check_method == file_magic.
7263 file_magic_cmd="\$MAGIC_CMD"
7265 # Flag that allows shared libraries with undefined symbols to be built.
7266 allow_undefined_flag=""
7268 # Flag that forces no undefined symbols.
7269 no_undefined_flag=" -z text"
7271 # Commands used to finish a libtool library installation in a directory.
7274 # Same as above, but a single script fragment to be evaled but not shown.
7277 # Take the output of nm and produce a listing of raw symbols and C names.
7278 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
7280 # Transform the output of nm in a proper C declaration
7281 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7283 # Transform the output of nm in a C name address pair
7284 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7286 # This is the shared library runtime path variable.
7289 # This is the shared library path variable.
7290 shlibpath_var=LD_LIBRARY_PATH
7292 # Is shlibpath searched before the hard-coded library search path?
7293 shlibpath_overrides_runpath=yes
7295 # How to hardcode a shared library path into an executable.
7296 hardcode_action=immediate
7298 # Whether we should hardcode library paths into libraries.
7299 hardcode_into_libs=yes
7301 # Flag to hardcode $libdir into a binary during linking.
7302 # This must work even if $libdir does not exist.
7303 hardcode_libdir_flag_spec="-R\$libdir"
7305 # If ld is used when linking, flag to hardcode $libdir into
7306 # a binary during linking. This must work even if $libdir does
7308 hardcode_libdir_flag_spec_ld=""
7310 # Whether we need a single -rpath flag with a separated argument.
7311 hardcode_libdir_separator=""
7313 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7317 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7321 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7322 # the resulting binary.
7323 hardcode_shlibpath_var=no
7325 # Set to yes if building a shared library automatically hardcodes DIR into the library
7326 # and all subsequent libraries and executables linked against it.
7327 hardcode_automatic=no
7329 # Variables whose values should be saved in libtool wrapper scripts and
7330 # restored at relink time.
7331 variables_saved_for_relink="PATH LD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7333 # Whether libtool must link a program against all its dependency libraries.
7334 link_all_deplibs=yes
7336 # Compile-time system search path for libraries
7337 sys_lib_search_path_spec=""
7339 # Run-time system search path for libraries
7340 sys_lib_dlsearch_path_spec="/lib /usr/lib"
7342 # Fix the shell variable $srcfile for the compiler.
7345 # Set to yes if exported symbols are required.
7346 always_export_symbols=no
7348 # The commands to list exported symbols.
7349 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7351 # The commands to extract the exported symbol list from a shared archive.
7352 extract_expsyms_cmds=""
7354 # Symbols that should not be listed in the preloaded symbols.
7355 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7357 # Symbols that must always be exported.
7360 # ### END LIBTOOL TAG CONFIG: F77