3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU supertux 0.1.1)
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.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed="/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 dhcppc0:
49 # Shell to use when invoking shell scripts.
52 # Whether or not to build shared libraries.
53 build_libtool_libs=yes
55 # Whether or not to build static libraries.
58 # Whether or not to add -lc for building shared libraries.
59 build_libtool_need_lc=no
61 # Whether or not to disallow shared libs when runtime libs are static
62 allow_libtool_libs_with_static_runtimes=no
64 # Whether or not to optimize for fast installation.
69 host=i686-pc-linux-gnu
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.
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="\${wl}--export-dynamic"
173 # Compiler flag to generate shared objects directly from archives.
174 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
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 \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
206 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
207 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
208 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
209 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
211 postuninstall_cmds=""
213 # Commands used to build a loadable module (assumed same as above if empty)
215 module_expsym_cmds=""
217 # Commands to strip libraries.
218 old_striplib="strip --strip-debug"
219 striplib="strip --strip-unneeded"
221 # Dependencies to place before the objects being linked to create a
225 # Dependencies to place after the objects being linked to create a
229 # Dependencies to place before the objects being linked to create a
233 # Dependencies to place after the objects being linked to create a
237 # The library search path used internally by the compiler when linking
239 compiler_lib_search_path=""
241 # Method to check whether dependent libraries are shared objects.
242 deplibs_check_method="pass_all"
244 # Command to use when deplibs_check_method == file_magic.
245 file_magic_cmd="\$MAGIC_CMD"
247 # Flag that allows shared libraries with undefined symbols to be built.
248 allow_undefined_flag=""
250 # Flag that forces no undefined symbols.
253 # Commands used to finish a libtool library installation in a directory.
254 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
256 # Same as above, but a single script fragment to be evaled but not shown.
259 # Take the output of nm and produce a listing of raw symbols and C names.
260 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
262 # Transform the output of nm in a proper C declaration
263 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
265 # Transform the output of nm in a C name address pair
266 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
268 # This is the shared library runtime path variable.
269 runpath_var=LD_RUN_PATH
271 # This is the shared library path variable.
272 shlibpath_var=LD_LIBRARY_PATH
274 # Is shlibpath searched before the hard-coded library search path?
275 shlibpath_overrides_runpath=no
277 # How to hardcode a shared library path into an executable.
278 hardcode_action=immediate
280 # Whether we should hardcode library paths into libraries.
281 hardcode_into_libs=yes
283 # Flag to hardcode $libdir into a binary during linking.
284 # This must work even if $libdir does not exist.
285 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
287 # If ld is used when linking, flag to hardcode $libdir into
288 # a binary during linking. This must work even if $libdir does
290 hardcode_libdir_flag_spec_ld=""
292 # Whether we need a single -rpath flag with a separated argument.
293 hardcode_libdir_separator=""
295 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
299 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
303 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
304 # the resulting binary.
305 hardcode_shlibpath_var=unsupported
307 # Set to yes if building a shared library automatically hardcodes DIR into the library
308 # and all subsequent libraries and executables linked against it.
309 hardcode_automatic=no
311 # Variables whose values should be saved in libtool wrapper scripts and
312 # restored at relink time.
313 variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
315 # Whether libtool must link a program against all its dependency libraries.
316 link_all_deplibs=unknown
318 # Compile-time system search path for libraries
319 sys_lib_search_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/local/lib include ld.so.conf.d/*.conf /lib /opt/lib /usr/lib /usr/lib/qt3/lib /usr/lib/wine /usr/local/lib /usr/X11R6/lib "
321 # Run-time system search path for libraries
322 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib include ld.so.conf.d/*.conf /lib /opt/lib /usr/lib /usr/lib/qt3/lib /usr/lib/wine /usr/local/lib /usr/X11R6/lib "
324 # Fix the shell variable $srcfile for the compiler.
327 # Set to yes if exported symbols are required.
328 always_export_symbols=no
330 # The commands to list exported symbols.
331 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
333 # The commands to extract the exported symbol list from a shared archive.
334 extract_expsyms_cmds=""
336 # Symbols that should not be listed in the preloaded symbols.
337 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
339 # Symbols that must always be exported.
342 # ### END LIBTOOL CONFIG
344 # ltmain.sh - Provide generalized library-building support services.
345 # NOTE: Changing this file will not affect anything until you rerun configure.
347 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
348 # Free Software Foundation, Inc.
349 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
351 # This program is free software; you can redistribute it and/or modify
352 # it under the terms of the GNU General Public License as published by
353 # the Free Software Foundation; either version 2 of the License, or
354 # (at your option) any later version.
356 # This program is distributed in the hope that it will be useful, but
357 # WITHOUT ANY WARRANTY; without even the implied warranty of
358 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
359 # General Public License for more details.
361 # You should have received a copy of the GNU General Public License
362 # along with this program; if not, write to the Free Software
363 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
365 # As a special exception to the GNU General Public License, if you
366 # distribute this file as part of a program that contains a
367 # configuration script generated by Autoconf, you may include it under
368 # the same distribution terms that you use for the rest of that program.
370 # Check that we have a working $echo.
371 if test "X$1" = X--no-reexec; then
372 # Discard the --no-reexec flag, and continue.
374 elif test "X$1" = X--fallback-echo; then
375 # Avoid inline document here, it may be left over
377 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
378 # Yippee, $echo works!
381 # Restart under the correct shell, and then maybe $echo will work.
382 exec $SHELL "$0" --no-reexec ${1+"$@"}
385 if test "X$1" = X--fallback-echo; then
386 # used as fallback echo
394 # The name of this program.
395 progname=`$echo "$0" | sed 's%^.*/%%'`
402 TIMESTAMP=" (1.922.2.34 2001/09/03 01:22:13)"
405 help="Try \`$progname --help' for more information."
406 magic="%%%MAGIC variable%%%"
411 # Sed substitution that helps us do robust quoting. It backslashifies
412 # metacharacters that are still active within double-quoted strings.
413 Xsed='sed -e 1s/^X//'
414 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
416 NL2SP='tr \015\012 \040\040'
419 # Only set LANG and LC_ALL to C if already set.
420 # These must not be set unconditionally because not all systems understand
421 # e.g. LANG=C (notably SCO).
422 # We save the old values to restore during execute mode.
423 if test "${LC_ALL+set}" = set; then
424 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
426 if test "${LANG+set}" = set; then
427 save_LANG="$LANG"; LANG=C; export LANG
430 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
431 echo "$modename: not configured to build any kind of library" 1>&2
432 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
445 lo2o="s/\\.lo\$/.${objext}/"
446 o2lo="s/\\.${objext}\$/.lo/"
448 # Parse our command line options once, thoroughly.
455 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
459 # If the previous option needs an argument, assign it.
460 if test -n "$prev"; then
463 execute_dlfiles="$execute_dlfiles $arg"
475 # Have we seen a non-optional argument yet?
482 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
487 sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
492 echo "$progname: enabling shell trace mode"
502 if test "$build_libtool_libs" = yes; then
503 echo "enable shared libraries"
505 echo "disable shared libraries"
507 if test "$build_old_libs" = yes; then
508 echo "enable static libraries"
510 echo "disable static libraries"
515 --finish) mode="finish" ;;
517 --mode) prevopt="--mode" prev=mode ;;
518 --mode=*) mode="$optarg" ;;
530 $echo "$modename: unrecognized option \`$arg'" 1>&2
542 if test -n "$prevopt"; then
543 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
548 # If this variable is set in any of the actions, the command in it
549 # will be execed at the end. This prevents here-documents from being
550 # left over by shells.
553 if test -z "$show_help"; then
555 # Infer the operation mode.
556 if test -z "$mode"; then
558 *cc | *++ | gcc* | *-gcc*)
570 *db | *dbx | *strace | *truss)
580 # If we have no mode, but dlfiles were specified, then do execute mode.
581 test -n "$execute_dlfiles" && mode=execute
583 # Just use the default operation mode.
584 if test -z "$mode"; then
585 if test -n "$nonopt"; then
586 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
588 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
595 # Only execute mode is allowed to have -dlopen flags.
596 if test -n "$execute_dlfiles" && test "$mode" != execute; then
597 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
602 # Change the help message to a mode-specific one.
604 help="Try \`$modename --help --mode=$mode' for more information."
606 # These modes are in order of execution frequency so that they run quickly.
608 # libtool compile mode
610 modename="$modename: compile"
611 # Get the compilation command and the source file.
624 # Aesthetically quote the previous argument.
626 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
629 # Double-quote args containing other shell metacharacters.
630 # Many Bourne shells cannot handle close brackets correctly
631 # in scan sets, so we specify it separately.
632 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
637 # Add the previous argument to base_compile.
638 if test -z "$base_compile"; then
639 base_compile="$lastarg"
641 base_compile="$base_compile $lastarg"
647 # Accept any command-line options.
650 if test "$user_target" != "no"; then
651 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
678 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
680 IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
684 # Double-quote args containing other shell metacharacters.
685 # Many Bourne shells cannot handle close brackets correctly
686 # in scan sets, so we specify it separately.
688 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
692 lastarg="$lastarg $arg"
695 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
697 # Add the arguments to base_compile.
698 if test -z "$base_compile"; then
699 base_compile="$lastarg"
701 base_compile="$base_compile $lastarg"
709 # The next one is the -o target name
714 # We got the output file
721 # Accept the current argument as the source file.
725 # Aesthetically quote the previous argument.
727 # Backslashify any backslashes, double quotes, and dollar signs.
728 # These are the only characters that are still specially
729 # interpreted inside of double-quoted scrings.
730 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
732 # Double-quote args containing other shell metacharacters.
733 # Many Bourne shells cannot handle close brackets correctly
734 # in scan sets, so we specify it separately.
736 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
737 lastarg="\"$lastarg\""
741 # Add the previous argument to base_compile.
742 if test -z "$base_compile"; then
743 base_compile="$lastarg"
745 base_compile="$base_compile $lastarg"
753 # Get the name of the library object.
754 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
757 $echo "$modename: you must specify a target with \`-o'" 1>&2
762 # Recognize several different file suffixes.
763 # If the user specifies -o file.o, it is replaced with file.lo
778 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
781 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
783 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
788 if test -z "$base_compile"; then
789 $echo "$modename: you must specify a compilation command" 1>&2
794 # Delete any leftover library objects.
795 if test "$build_old_libs" = yes; then
796 removelist="$obj $libobj"
802 trap "$run $rm $removelist; exit 1" 1 2 15
804 # On Cygwin there's no "real" PIC flag so we must build both object types
806 cygwin* | mingw* | pw32* | os2*)
810 if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
811 # non-PIC code in shared libraries is not supported
815 # Calculate the filename of the output object if compiler does
816 # not support -o with -c
817 if test "$compiler_c_o" = no; then
818 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
819 lockfile="$output_obj.lock"
820 removelist="$removelist $output_obj $lockfile"
821 trap "$run $rm $removelist; exit 1" 1 2 15
827 # Lock this critical section if it is needed
828 # We use this script file to make the link, it avoids creating a new file
829 if test "$need_locks" = yes; then
830 until $run ln "$0" "$lockfile" 2>/dev/null; do
831 $show "Waiting for $lockfile to be removed"
834 elif test "$need_locks" = warn; then
835 if test -f "$lockfile"; then
837 *** ERROR, $lockfile exists and contains:
838 `cat $lockfile 2>/dev/null`
840 This indicates that another process is trying to use the same
841 temporary object file, and libtool could not work around it because
842 your compiler does not support \`-c' and \`-o' together. If you
843 repeat this compilation, it may succeed, by chance, but you had better
844 avoid parallel builds (make -j) in this platform, or get a better
850 echo $srcfile > "$lockfile"
853 if test -n "$fix_srcfile_path"; then
854 eval srcfile=\"$fix_srcfile_path\"
857 # Only build a PIC object if we are building libtool libraries.
858 if test "$build_libtool_libs" = yes; then
859 # Without this assignment, base_compile gets emptied.
860 fbsd_hideous_sh_bug=$base_compile
862 if test "$pic_mode" != no; then
863 # All platforms use -DPIC, to notify preprocessed assembler code.
864 command="$base_compile $srcfile $pic_flag -DPIC"
866 # Don't build PIC code
867 command="$base_compile $srcfile"
869 if test "$build_old_libs" = yes; then
871 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
872 if test "X$dir" = "X$libobj"; then
877 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
879 if test -d "$dir"; then
886 if test $status -ne 0 && test ! -d $dir; then
891 if test "$compiler_o_lo" = yes; then
893 command="$command -o $output_obj"
894 elif test "$compiler_c_o" = yes; then
896 command="$command -o $output_obj"
899 $run $rm "$output_obj"
901 if $run eval "$command"; then :
903 test -n "$output_obj" && $run $rm $removelist
907 if test "$need_locks" = warn &&
908 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
910 *** ERROR, $lockfile contains:
911 `cat $lockfile 2>/dev/null`
913 but it should contain:
916 This indicates that another process is trying to use the same
917 temporary object file, and libtool could not work around it because
918 your compiler does not support \`-c' and \`-o' together. If you
919 repeat this compilation, it may succeed, by chance, but you had better
920 avoid parallel builds (make -j) in this platform, or get a better
927 # Just move the object if needed, then go on to compile the next one
928 if test x"$output_obj" != x"$libobj"; then
929 $show "$mv $output_obj $libobj"
930 if $run $mv $output_obj $libobj; then :
938 # If we have no pic_flag, then copy the object into place and finish.
939 if (test -z "$pic_flag" || test "$pic_mode" != default) &&
940 test "$build_old_libs" = yes; then
941 # Rename the .lo from within objdir to obj
942 if test -f $obj; then
947 $show "$mv $libobj $obj"
948 if $run $mv $libobj $obj; then :
955 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
956 if test "X$xdir" = "X$obj"; then
961 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
962 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
963 # Now arrange that obj and lo_libobj become the same file
964 $show "(cd $xdir && $LN_S $baseobj $libobj)"
965 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
966 # Unlock the critical section if it was locked
967 if test "$need_locks" != no; then
978 # Allow error messages only from the first compilation.
979 suppress_output=' >/dev/null 2>&1'
982 # Only build a position-dependent object if we build old libraries.
983 if test "$build_old_libs" = yes; then
984 if test "$pic_mode" != yes; then
985 # Don't build PIC code
986 command="$base_compile $srcfile"
988 # All platforms use -DPIC, to notify preprocessed assembler code.
989 command="$base_compile $srcfile $pic_flag -DPIC"
991 if test "$compiler_c_o" = yes; then
992 command="$command -o $obj"
996 # Suppress compiler output if we already did a PIC compilation.
997 command="$command$suppress_output"
998 $run $rm "$output_obj"
1000 if $run eval "$command"; then :
1002 $run $rm $removelist
1006 if test "$need_locks" = warn &&
1007 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
1009 *** ERROR, $lockfile contains:
1010 `cat $lockfile 2>/dev/null`
1012 but it should contain:
1015 This indicates that another process is trying to use the same
1016 temporary object file, and libtool could not work around it because
1017 your compiler does not support \`-c' and \`-o' together. If you
1018 repeat this compilation, it may succeed, by chance, but you had better
1019 avoid parallel builds (make -j) in this platform, or get a better
1022 $run $rm $removelist
1026 # Just move the object if needed
1027 if test x"$output_obj" != x"$obj"; then
1028 $show "$mv $output_obj $obj"
1029 if $run $mv $output_obj $obj; then :
1032 $run $rm $removelist
1037 # Create an invalid libtool object if no PIC, so that we do not
1038 # accidentally link it into a program.
1039 if test "$build_libtool_libs" != yes; then
1040 $show "echo timestamp > $libobj"
1041 $run eval "echo timestamp > \$libobj" || exit $?
1043 # Move the .lo from within objdir
1044 $show "$mv $libobj $lo_libobj"
1045 if $run $mv $libobj $lo_libobj; then :
1048 $run $rm $removelist
1054 # Unlock the critical section if it was locked
1055 if test "$need_locks" != no; then
1056 $run $rm "$lockfile"
1064 modename="$modename: link"
1066 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1067 # It is impossible to link a dll without this setting, and
1068 # we shouldn't force the makefile maintainer to figure out
1069 # which system we are compiling for in order to pass an extra
1070 # flag for every libtool invokation.
1071 # allow_undefined=no
1073 # FIXME: Unfortunately, there are problems with the above when trying
1074 # to make a dll which has undefined symbols, in which case not
1075 # even a static library is built. For now, we need to specify
1076 # -no-undefined on the libtool link line when we can be certain
1077 # that all symbols are satisfied, otherwise we get a static library.
1084 libtool_args="$nonopt"
1085 compile_command="$nonopt"
1086 finalize_command="$nonopt"
1099 lib_search_path=`pwd`
1107 export_symbols_regex=
1114 prefer_static_libs=no
1126 # We need to know -static, to get the right output filenames.
1130 -all-static | -static)
1131 if test "X$arg" = "X-all-static"; then
1132 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1133 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1135 if test -n "$link_static_flag"; then
1136 dlopen_self=$dlopen_self_static
1139 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1140 dlopen_self=$dlopen_self_static
1143 build_libtool_libs=no
1145 prefer_static_libs=yes
1151 # See if our shared archives depend on static archives.
1152 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1154 # Go through the arguments, transforming them on the way.
1155 while test $# -gt 0; do
1159 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1160 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1164 libtool_args="$libtool_args $qarg"
1166 # If the previous option needs an argument, assign it.
1167 if test -n "$prev"; then
1170 compile_command="$compile_command @OUTPUT@"
1171 finalize_command="$finalize_command @OUTPUT@"
1177 if test "$preload" = no; then
1178 # Add the symbol object into the linking commands.
1179 compile_command="$compile_command @SYMFILE@"
1180 finalize_command="$finalize_command @SYMFILE@"
1184 *.la | *.lo) ;; # We handle these cases below.
1186 if test "$dlself" = no; then
1194 if test "$prev" = dlprefiles; then
1196 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1206 if test "$prev" = dlfiles; then
1207 dlfiles="$dlfiles $arg"
1209 dlprefiles="$dlprefiles $arg"
1217 export_symbols="$arg"
1218 if test ! -f "$arg"; then
1219 $echo "$modename: symbol file \`$arg' does not exist"
1226 export_symbols_regex="$arg"
1236 # We need an absolute path.
1238 [\\/]* | [A-Za-z]:[\\/]*) ;;
1240 $echo "$modename: only absolute run-paths are allowed" 1>&2
1244 if test "$prev" = rpath; then
1247 *) rpath="$rpath $arg" ;;
1252 *) xrpath="$xrpath $arg" ;;
1259 compiler_flags="$compiler_flags $qarg"
1261 compile_command="$compile_command $qarg"
1262 finalize_command="$finalize_command $qarg"
1266 linker_flags="$linker_flags $qarg"
1267 compiler_flags="$compiler_flags $wl$qarg"
1269 compile_command="$compile_command $wl$qarg"
1270 finalize_command="$finalize_command $wl$qarg"
1274 eval "$prev=\"\$arg\""
1285 if test -n "$link_static_flag"; then
1286 compile_command="$compile_command $link_static_flag"
1287 finalize_command="$finalize_command $link_static_flag"
1293 # FIXME: remove this flag sometime in the future.
1294 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1318 -export-symbols | -export-symbols-regex)
1319 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1320 $echo "$modename: more than one -exported-symbols argument is not allowed"
1323 if test "X$arg" = "X-export-symbols"; then
1331 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1332 # so, if we see these flags be careful not to treat them like -L
1334 case $with_gcc/$host in
1336 compile_command="$compile_command $arg"
1337 finalize_command="$finalize_command $arg"
1344 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1345 # We need an absolute path.
1347 [\\/]* | [A-Za-z]:[\\/]*) ;;
1349 absdir=`cd "$dir" && pwd`
1350 if test -z "$absdir"; then
1351 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1360 deplibs="$deplibs -L$dir"
1361 lib_search_path="$lib_search_path $dir"
1365 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1366 case :$dllsearchpath: in
1368 *) dllsearchpath="$dllsearchpath:$dir";;
1376 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1378 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1379 # These systems don't actually have a C or math library (as such)
1382 *-*-mingw* | *-*-os2*)
1383 # These systems don't actually have a C library (as such)
1384 test "X$arg" = "X-lc" && continue
1387 # Do not include libc due to us having libc/libc_r.
1388 test "X$arg" = "X-lc" && continue
1392 if test "X$arg" = "X-lc_r"; then
1395 # Do not include libc_r directly, use -pthread flag.
1400 deplibs="$deplibs $arg"
1416 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1417 # The PATH hackery in wrapper scripts is required on Windows
1418 # in order for the loader to find any dlls it needs.
1419 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1420 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1423 *) no_install=yes ;;
1451 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1452 # We need an absolute path.
1454 [\\/]* | [A-Za-z]:[\\/]*) ;;
1456 $echo "$modename: only absolute run-paths are allowed" 1>&2
1462 *) xrpath="$xrpath $dir" ;;
1468 # The effects of -static are defined in a previous loop.
1469 # We used to do the same as -all-static on platforms that
1470 # didn't have a PIC flag, but the assumption that the effects
1471 # would be equivalent was wrong. It would break on at least
1472 # Digital Unix and AIX.
1487 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1489 IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1490 for flag in $args; do
1493 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1498 compiler_flags="$compiler_flags $flag"
1501 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1505 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1507 IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1508 for flag in $args; do
1511 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1516 compiler_flags="$compiler_flags $wl$flag"
1517 linker_flags="$linker_flags $flag"
1520 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1533 # Some other compiler flag.
1535 # Unknown arguments in both finalize_command and compile_command need
1536 # to be aesthetically quoted because they are evaled later.
1537 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1539 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1546 # A library or standard object.
1547 if test "$prev" = dlfiles; then
1548 # This file was specified with -dlopen.
1549 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1550 dlfiles="$dlfiles $arg"
1554 # If libtool objects are unsupported, then we need to preload.
1559 if test "$prev" = dlprefiles; then
1560 # Preload the old-style object.
1561 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1565 *.lo) libobjs="$libobjs $arg" ;;
1566 *) objs="$objs $arg" ;;
1573 deplibs="$deplibs $arg"
1574 old_deplibs="$old_deplibs $arg"
1579 # A libtool-controlled library.
1581 if test "$prev" = dlfiles; then
1582 # This library was specified with -dlopen.
1583 dlfiles="$dlfiles $arg"
1585 elif test "$prev" = dlprefiles; then
1586 # The library was specified with -dlpreopen.
1587 dlprefiles="$dlprefiles $arg"
1590 deplibs="$deplibs $arg"
1595 # Some other compiler argument.
1597 # Unknown arguments in both finalize_command and compile_command need
1598 # to be aesthetically quoted because they are evaled later.
1599 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1601 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1608 # Now actually substitute the argument into the commands.
1609 if test -n "$arg"; then
1610 compile_command="$compile_command $arg"
1611 finalize_command="$finalize_command $arg"
1613 done # argument parsing loop
1615 if test -n "$prev"; then
1616 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1621 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1622 eval arg=\"$export_dynamic_flag_spec\"
1623 compile_command="$compile_command $arg"
1624 finalize_command="$finalize_command $arg"
1627 # calculate the name of the file, without its directory
1628 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1629 libobjs_save="$libobjs"
1631 if test -n "$shlibpath_var"; then
1632 # get the directories listed in $shlibpath_var
1633 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1637 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1638 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1640 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1641 if test "X$output_objdir" = "X$output"; then
1642 output_objdir="$objdir"
1644 output_objdir="$output_objdir/$objdir"
1646 # Create the object directory.
1647 if test ! -d $output_objdir; then
1648 $show "$mkdir $output_objdir"
1649 $run $mkdir $output_objdir
1651 if test $status -ne 0 && test ! -d $output_objdir; then
1656 # Determine the type of output
1659 $echo "$modename: you must specify an output file" 1>&2
1663 *.$libext) linkmode=oldlib ;;
1664 *.lo | *.$objext) linkmode=obj ;;
1665 *.la) linkmode=lib ;;
1666 *) linkmode=prog ;; # Anything else should be a program.
1671 # Find all interdependent deplibs by searching for libraries
1672 # that are linked more than once (e.g. -la -lb -la)
1673 for deplib in $deplibs; do
1675 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1677 libs="$libs $deplib"
1682 need_relink=no # whether we're linking any uninstalled libtool libraries
1683 notinst_deplibs= # not-installed libtool libraries
1684 notinst_path= # paths that contain not-installed libtool libraries
1688 for file in $dlfiles $dlprefiles; do
1692 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1704 passes="conv scan dlopen dlpreopen link"
1709 for pass in $passes; do
1710 if test $linkmode = prog; then
1711 # Determine which files to process
1715 save_deplibs="$deplibs" # Collect dlpreopened libraries
1718 dlpreopen) libs="$dlprefiles" ;;
1719 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1722 for deplib in $libs; do
1727 if test $linkmode = oldlib && test $linkmode = obj; then
1728 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
1731 if test $pass = conv; then
1732 deplibs="$deplib $deplibs"
1735 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1736 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1737 # Search the libtool library
1738 lib="$searchdir/lib${name}.la"
1739 if test -f "$lib"; then
1744 if test "$found" != yes; then
1745 # deplib doesn't seem to be a libtool library
1746 if test "$linkmode,$pass" = "prog,link"; then
1747 compile_deplibs="$deplib $compile_deplibs"
1748 finalize_deplibs="$deplib $finalize_deplibs"
1750 deplibs="$deplib $deplibs"
1751 test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
1759 deplibs="$deplib $deplibs"
1760 test $pass = conv && continue
1761 newdependency_libs="$deplib $newdependency_libs"
1762 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1765 if test $pass = conv; then
1766 deplibs="$deplib $deplibs"
1769 if test $pass = scan; then
1770 deplibs="$deplib $deplibs"
1771 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1773 compile_deplibs="$deplib $compile_deplibs"
1774 finalize_deplibs="$deplib $finalize_deplibs"
1778 $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
1784 if test $pass = link; then
1785 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1786 # Make sure the xrpath contains only unique directories.
1789 *) xrpath="$xrpath $dir" ;;
1792 deplibs="$deplib $deplibs"
1795 *.la) lib="$deplib" ;;
1797 if test $pass = conv; then
1798 deplibs="$deplib $deplibs"
1803 if test "$deplibs_check_method" != pass_all; then
1805 echo "*** Warning: This library needs some functionality provided by $deplib."
1806 echo "*** I have the capability to make that library automatically link in when"
1807 echo "*** you link to this library. But I can only do this if you have a"
1808 echo "*** shared version of the library, which you do not appear to have."
1811 echo "*** Warning: Linking the shared library $output against the"
1812 echo "*** static library $deplib is not portable!"
1813 deplibs="$deplib $deplibs"
1818 if test $pass != link; then
1819 deplibs="$deplib $deplibs"
1821 compile_deplibs="$deplib $compile_deplibs"
1822 finalize_deplibs="$deplib $finalize_deplibs"
1829 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1830 # If there is no dlopen support or we're linking statically,
1831 # we need to preload.
1832 newdlprefiles="$newdlprefiles $deplib"
1833 compile_deplibs="$deplib $compile_deplibs"
1834 finalize_deplibs="$deplib $finalize_deplibs"
1836 newdlfiles="$newdlfiles $deplib"
1845 if test $found = yes || test -f "$lib"; then :
1847 $echo "$modename: cannot find the library \`$lib'" 1>&2
1851 # Check to see that this really is a libtool archive.
1852 if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1854 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1858 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1859 test "X$ladir" = "X$lib" && ladir="."
1867 # If the library was installed with an old release of libtool,
1868 # it will not redefine variable installed.
1873 */* | *\\*) . $lib ;;
1877 if test "$linkmode,$pass" = "lib,link" ||
1878 test "$linkmode,$pass" = "prog,scan" ||
1879 { test $linkmode = oldlib && test $linkmode = obj; }; then
1880 # Add dl[pre]opened files of deplib
1881 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
1882 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
1885 if test $pass = conv; then
1886 # Only check for convenience libraries
1887 deplibs="$lib $deplibs"
1888 if test -z "$libdir"; then
1889 if test -z "$old_library"; then
1890 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1893 # It is a libtool convenience library, so add in its objects.
1894 convenience="$convenience $ladir/$objdir/$old_library"
1895 old_convenience="$old_convenience $ladir/$objdir/$old_library"
1897 for deplib in $dependency_libs; do
1898 deplibs="$deplib $deplibs"
1899 case "$tmp_libs " in
1900 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1902 tmp_libs="$tmp_libs $deplib"
1904 elif test $linkmode != prog && test $linkmode != lib; then
1905 $echo "$modename: \`$lib' is not a convenience library" 1>&2
1911 # Get the name of the library we link against.
1913 for l in $old_library $library_names; do
1916 if test -z "$linklib"; then
1917 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1921 # This library was specified with -dlopen.
1922 if test $pass = dlopen; then
1923 if test -z "$libdir"; then
1924 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1927 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1928 # If there is no dlname, no dlopen support or we're linking
1929 # statically, we need to preload.
1930 dlprefiles="$dlprefiles $lib"
1932 newdlfiles="$newdlfiles $lib"
1937 # We need an absolute path.
1939 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
1941 abs_ladir=`cd "$ladir" && pwd`
1942 if test -z "$abs_ladir"; then
1943 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1944 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1949 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1951 # Find the relevant object directory and library name.
1952 if test "X$installed" = Xyes; then
1953 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1954 $echo "$modename: warning: library \`$lib' was moved." 1>&2
1963 dir="$ladir/$objdir"
1964 absdir="$abs_ladir/$objdir"
1965 # Remove this search path later
1966 notinst_path="$notinst_path $abs_ladir"
1967 fi # $installed = yes
1968 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1970 # This library was specified with -dlpreopen.
1971 if test $pass = dlpreopen; then
1972 if test -z "$libdir"; then
1973 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1976 # Prefer using a static library (so that no silly _DYNAMIC symbols
1977 # are required to link).
1978 if test -n "$old_library"; then
1979 newdlprefiles="$newdlprefiles $dir/$old_library"
1980 # Otherwise, use the dlname, so that lt_dlopen finds it.
1981 elif test -n "$dlname"; then
1982 newdlprefiles="$newdlprefiles $dir/$dlname"
1984 newdlprefiles="$newdlprefiles $dir/$linklib"
1986 fi # $pass = dlpreopen
1988 if test -z "$libdir"; then
1989 # Link the convenience library
1990 if test $linkmode = lib; then
1991 deplibs="$dir/$old_library $deplibs"
1992 elif test "$linkmode,$pass" = "prog,link"; then
1993 compile_deplibs="$dir/$old_library $compile_deplibs"
1994 finalize_deplibs="$dir/$old_library $finalize_deplibs"
1996 deplibs="$lib $deplibs"
2001 if test $linkmode = prog && test $pass != link; then
2002 newlib_search_path="$newlib_search_path $ladir"
2003 deplibs="$lib $deplibs"
2006 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2007 test "$build_libtool_libs" = no; then
2012 for deplib in $dependency_libs; do
2014 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2016 # Need to link against all dependency_libs?
2017 if test $linkalldeplibs = yes; then
2018 deplibs="$deplib $deplibs"
2020 # Need to hardcode shared library paths
2021 # or/and link against static libraries
2022 newdependency_libs="$deplib $newdependency_libs"
2024 case "$tmp_libs " in
2025 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2027 tmp_libs="$tmp_libs $deplib"
2030 fi # $linkmode = prog...
2032 link_static=no # Whether the deplib will be linked statically
2033 if test -n "$library_names" &&
2034 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2035 # Link against this shared library
2037 if test "$linkmode,$pass" = "prog,link" ||
2038 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
2039 # Hardcode the library path.
2040 # Skip directories that are in the system default run-time
2042 case " $sys_lib_dlsearch_path " in
2045 case "$compile_rpath " in
2047 *) compile_rpath="$compile_rpath $absdir"
2051 case " $sys_lib_dlsearch_path " in
2054 case "$finalize_rpath " in
2056 *) finalize_rpath="$finalize_rpath $libdir"
2060 if test $linkmode = prog; then
2061 # We need to hardcode the library path
2062 if test -n "$shlibpath_var"; then
2063 # Make sure the rpath contains only unique directories.
2064 case "$temp_rpath " in
2067 *) temp_rpath="$temp_rpath $dir" ;;
2071 fi # $linkmode,$pass = prog,link...
2073 if test "$alldeplibs" = yes &&
2074 { test "$deplibs_check_method" = pass_all ||
2075 { test "$build_libtool_libs" = yes &&
2076 test -n "$library_names"; }; }; then
2077 # We only need to search for static libraries
2081 if test "$installed" = no; then
2082 notinst_deplibs="$notinst_deplibs $lib"
2086 if test -n "$old_archive_from_expsyms_cmds"; then
2087 # figure out the soname
2088 set dummy $library_names
2091 libname=`eval \\$echo \"$libname_spec\"`
2092 # use dlname if we got it. it's perfectly good, no?
2093 if test -n "$dlname"; then
2095 elif test -n "$soname_spec"; then
2099 major=`expr $current - $age`
2103 eval soname=\"$soname_spec\"
2108 # Make a new name for the extract_expsyms_cmds to use
2110 soname=`echo $soroot | sed -e 's/^.*\///'`
2111 newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
2113 # If the library has no export list, then create one now
2114 if test -f "$output_objdir/$soname-def"; then :
2116 $show "extracting exported symbol list from \`$soname'"
2117 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2118 eval cmds=\"$extract_expsyms_cmds\"
2119 for cmd in $cmds; do
2122 $run eval "$cmd" || exit $?
2128 if test -f "$output_objdir/$newlib"; then :; else
2129 $show "generating import library for \`$soname'"
2130 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2131 eval cmds=\"$old_archive_from_expsyms_cmds\"
2132 for cmd in $cmds; do
2135 $run eval "$cmd" || exit $?
2139 # make sure the library variables are pointing to the new library
2142 fi # test -n $old_archive_from_expsyms_cmds
2144 if test $linkmode = prog || test "$mode" != relink; then
2149 case $hardcode_action in
2150 immediate | unsupported)
2151 if test "$hardcode_direct" = no; then
2153 elif test "$hardcode_minus_L" = no; then
2155 *-*-sunos*) add_shlibpath="$dir" ;;
2159 elif test "$hardcode_shlibpath_var" = no; then
2160 add_shlibpath="$dir"
2167 if test "$hardcode_direct" = yes; then
2169 elif test "$hardcode_minus_L" = yes; then
2172 elif test "$hardcode_shlibpath_var" = yes; then
2173 add_shlibpath="$dir"
2182 if test "$lib_linked" != yes; then
2183 $echo "$modename: configuration error: unsupported hardcode properties"
2187 if test -n "$add_shlibpath"; then
2188 case :$compile_shlibpath: in
2189 *":$add_shlibpath:"*) ;;
2190 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2193 if test $linkmode = prog; then
2194 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2195 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2197 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2198 test -n "$add" && deplibs="$add $deplibs"
2199 if test "$hardcode_direct" != yes && \
2200 test "$hardcode_minus_L" != yes && \
2201 test "$hardcode_shlibpath_var" = yes; then
2202 case :$finalize_shlibpath: in
2204 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2210 if test $linkmode = prog || test "$mode" = relink; then
2214 # Finalize command for both is simple: just hardcode it.
2215 if test "$hardcode_direct" = yes; then
2216 add="$libdir/$linklib"
2217 elif test "$hardcode_minus_L" = yes; then
2220 elif test "$hardcode_shlibpath_var" = yes; then
2221 case :$finalize_shlibpath: in
2223 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2227 # We cannot seem to hardcode it, guess we'll fake it.
2232 if test $linkmode = prog; then
2233 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2234 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2236 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2237 test -n "$add" && deplibs="$add $deplibs"
2240 elif test $linkmode = prog; then
2241 if test "$alldeplibs" = yes &&
2242 { test "$deplibs_check_method" = pass_all ||
2243 { test "$build_libtool_libs" = yes &&
2244 test -n "$library_names"; }; }; then
2245 # We only need to search for static libraries
2249 # Try to link the static library
2250 # Here we assume that one of hardcode_direct or hardcode_minus_L
2251 # is not unsupported. This is valid on all known static and
2253 if test "$hardcode_direct" != unsupported; then
2254 test -n "$old_library" && linklib="$old_library"
2255 compile_deplibs="$dir/$linklib $compile_deplibs"
2256 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2258 compile_deplibs="-l$name -L$dir $compile_deplibs"
2259 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2261 elif test "$build_libtool_libs" = yes; then
2262 # Not a shared library
2263 if test "$deplibs_check_method" != pass_all; then
2264 # We're trying link a shared library against a static one
2265 # but the system doesn't support it.
2267 # Just print a warning and add the library to dependency_libs so
2268 # that the program can be linked against the static library.
2270 echo "*** Warning: This library needs some functionality provided by $lib."
2271 echo "*** I have the capability to make that library automatically link in when"
2272 echo "*** you link to this library. But I can only do this if you have a"
2273 echo "*** shared version of the library, which you do not appear to have."
2274 if test "$module" = yes; then
2275 echo "*** Therefore, libtool will create a static module, that should work "
2276 echo "*** as long as the dlopening application is linked with the -dlopen flag."
2277 if test -z "$global_symbol_pipe"; then
2279 echo "*** However, this would only work if libtool was able to extract symbol"
2280 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2281 echo "*** not find such a program. So, this module is probably useless."
2282 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2284 if test "$build_old_libs" = no; then
2285 build_libtool_libs=module
2288 build_libtool_libs=no
2292 convenience="$convenience $dir/$old_library"
2293 old_convenience="$old_convenience $dir/$old_library"
2294 deplibs="$dir/$old_library $deplibs"
2297 fi # link shared/static library?
2299 if test $linkmode = lib; then
2300 if test -n "$dependency_libs" &&
2301 { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
2302 test $link_static = yes; }; then
2303 # Extract -R from dependency_libs
2305 for libdir in $dependency_libs; do
2307 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2309 *" $temp_xrpath "*) ;;
2310 *) xrpath="$xrpath $temp_xrpath";;
2312 *) temp_deplibs="$temp_deplibs $libdir";;
2315 dependency_libs="$temp_deplibs"
2318 newlib_search_path="$newlib_search_path $absdir"
2319 # Link against this library
2320 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2321 # ... and its dependency_libs
2323 for deplib in $dependency_libs; do
2324 newdependency_libs="$deplib $newdependency_libs"
2325 case "$tmp_libs " in
2326 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2328 tmp_libs="$tmp_libs $deplib"
2331 if test $link_all_deplibs != no; then
2332 # Add the search paths of all dependency libraries
2333 for deplib in $dependency_libs; do
2335 -L*) path="$deplib" ;;
2337 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2338 test "X$dir" = "X$deplib" && dir="."
2339 # We need an absolute path.
2341 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2343 absdir=`cd "$dir" && pwd`
2344 if test -z "$absdir"; then
2345 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2350 if grep "^installed=no" $deplib > /dev/null; then
2351 path="-L$absdir/$objdir"
2353 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2354 if test -z "$libdir"; then
2355 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2358 if test "$absdir" != "$libdir"; then
2359 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2366 case " $deplibs " in
2368 *) deplibs="$deplibs $path" ;;
2371 fi # link_all_deplibs != no
2373 done # for deplib in $libs
2374 if test $pass = dlpreopen; then
2375 # Link the dlpreopened libraries before other libraries
2376 for deplib in $save_deplibs; do
2377 deplibs="$deplib $deplibs"
2380 if test $pass != dlopen; then
2381 test $pass != scan && dependency_libs="$newdependency_libs"
2382 if test $pass != conv; then
2383 # Make sure lib_search_path contains only unique directories.
2385 for dir in $newlib_search_path; do
2386 case "$lib_search_path " in
2388 *) lib_search_path="$lib_search_path $dir" ;;
2394 if test "$linkmode,$pass" != "prog,link"; then
2397 vars="compile_deplibs finalize_deplibs"
2399 for var in $vars dependency_libs; do
2400 # Add libraries to $var in reverse order
2401 eval tmp_libs=\"\$$var\"
2403 for deplib in $tmp_libs; do
2405 -L*) new_libs="$deplib $new_libs" ;;
2407 case " $specialdeplibs " in
2408 *" $deplib "*) new_libs="$deplib $new_libs" ;;
2410 case " $new_libs " in
2412 *) new_libs="$deplib $new_libs" ;;
2420 for deplib in $new_libs; do
2423 case " $tmp_libs " in
2425 *) tmp_libs="$tmp_libs $deplib" ;;
2428 *) tmp_libs="$tmp_libs $deplib" ;;
2431 eval $var=\"$tmp_libs\"
2434 if test "$pass" = "conv" &&
2435 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
2436 libs="$deplibs" # reset libs
2440 if test $linkmode = prog; then
2441 dlfiles="$newdlfiles"
2442 dlprefiles="$newdlprefiles"
2447 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2448 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2451 if test -n "$rpath"; then
2452 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2455 if test -n "$xrpath"; then
2456 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2459 if test -n "$vinfo"; then
2460 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2463 if test -n "$release"; then
2464 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2467 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2468 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2471 # Now set the variables for building old libraries.
2472 build_libtool_libs=no
2474 objs="$objs$old_deplibs"
2478 # Make sure we only generate libraries of the form `libNAME.la'.
2481 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2482 eval libname=\"$libname_spec\"
2485 if test "$module" = no; then
2486 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2490 if test "$need_lib_prefix" != no; then
2491 # Add the "lib" prefix for modules if required
2492 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2493 eval libname=\"$libname_spec\"
2495 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2500 if test -n "$objs"; then
2501 if test "$deplibs_check_method" != pass_all; then
2502 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2506 echo "*** Warning: Linking the shared library $output against the non-libtool"
2507 echo "*** objects $objs is not portable!"
2508 libobjs="$libobjs $objs"
2512 if test "$dlself" != no; then
2513 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2517 if test $# -gt 2; then
2518 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2523 if test -z "$rpath"; then
2524 if test "$build_libtool_libs" = yes; then
2525 # Building a libtool convenience library.
2527 oldlibs="$output_objdir/$libname.$libext $oldlibs"
2528 build_libtool_libs=convenience
2532 if test -n "$vinfo"; then
2533 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2536 if test -n "$release"; then
2537 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2541 # Parse the version information argument.
2542 IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
2543 set dummy $vinfo 0 0 0
2546 if test -n "$8"; then
2547 $echo "$modename: too many parameters to \`-version-info'" 1>&2
2556 # Check that each of the things are valid numbers.
2558 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
2560 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2561 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2567 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
2569 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2570 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2576 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
2578 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2579 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2584 if test $age -gt $current; then
2585 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2586 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2590 # Calculate the version variables.
2594 case $version_type in
2598 # Like Linux, but with the current version available in
2599 # verstring for coding it into the library header
2600 major=.`expr $current - $age`
2601 versuffix="$major.$age.$revision"
2602 # Darwin ld doesn't like 0 for these options...
2603 minor_current=`expr $current + 1`
2604 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
2609 versuffix=".$current.$revision";
2614 versuffix=".$current";
2618 major=`expr $current - $age + 1`
2619 verstring="sgi$major.$revision"
2621 # Add in all the interfaces that we are compatible with.
2623 while test $loop != 0; do
2624 iface=`expr $revision - $loop`
2625 loop=`expr $loop - 1`
2626 verstring="sgi$major.$iface:$verstring"
2629 # Before this point, $major must not contain `.'.
2631 versuffix="$major.$revision"
2635 major=.`expr $current - $age`
2636 versuffix="$major.$age.$revision"
2640 major=`expr $current - $age`
2641 versuffix=".$current.$age.$revision"
2642 verstring="$current.$age.$revision"
2644 # Add in all the interfaces that we are compatible with.
2646 while test $loop != 0; do
2647 iface=`expr $current - $loop`
2648 loop=`expr $loop - 1`
2649 verstring="$verstring:${iface}.0"
2652 # Make executables depend on our current version.
2653 verstring="$verstring:${current}.0"
2658 versuffix=".$current.$revision"
2662 # Use '-' rather than '.', since we only want one
2663 # extension on DOS 8.3 filesystems.
2664 major=`expr $current - $age`
2669 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2670 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2675 # Clear the version info if we defaulted, and they specified a release.
2676 if test -z "$vinfo" && test -n "$release"; then
2679 case $version_type in
2681 # we can't check for "0.0" in archive_cmds due to quoting
2682 # problems, so we reset it completely
2689 if test "$need_version" = no; then
2696 # Remove version info from name if versioning should be avoided
2697 if test "$avoid_version" = yes && test "$need_version" = no; then
2703 # Check to see if the archive will have undefined symbols.
2704 if test "$allow_undefined" = yes; then
2705 if test "$allow_undefined_flag" = unsupported; then
2706 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2707 build_libtool_libs=no
2711 # Don't allow undefined symbols.
2712 allow_undefined_flag="$no_undefined_flag"
2716 if test "$mode" != relink; then
2717 # Remove our outputs.
2718 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
2719 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
2722 # Now set the variables for building old libraries.
2723 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
2724 oldlibs="$oldlibs $output_objdir/$libname.$libext"
2726 # Transform .lo files to .o files.
2727 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2730 # Eliminate all temporary directories.
2731 for path in $notinst_path; do
2732 lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2733 deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2734 dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2737 if test -n "$xrpath"; then
2738 # If the user specified any rpath flags, then add them.
2740 for libdir in $xrpath; do
2741 temp_xrpath="$temp_xrpath -R$libdir"
2742 case "$finalize_rpath " in
2744 *) finalize_rpath="$finalize_rpath $libdir" ;;
2747 if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
2748 dependency_libs="$temp_xrpath $dependency_libs"
2752 # Make sure dlfiles contains only unique files that won't be dlpreopened
2753 old_dlfiles="$dlfiles"
2755 for lib in $old_dlfiles; do
2756 case " $dlprefiles $dlfiles " in
2758 *) dlfiles="$dlfiles $lib" ;;
2762 # Make sure dlprefiles contains only unique files
2763 old_dlprefiles="$dlprefiles"
2765 for lib in $old_dlprefiles; do
2766 case "$dlprefiles " in
2768 *) dlprefiles="$dlprefiles $lib" ;;
2772 if test "$build_libtool_libs" = yes; then
2773 if test -n "$rpath"; then
2775 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
2776 # these systems don't actually have a c library (as such)!
2778 *-*-rhapsody* | *-*-darwin1.[012])
2779 # Rhapsody C library is in the System framework
2780 deplibs="$deplibs -framework System"
2783 # Don't link with libc until the a.out ld.so is fixed.
2786 # Do not include libc due to us having libc/libc_r.
2789 # Add libc to deplibs on all other systems if necessary.
2790 if test $build_libtool_need_lc = "yes"; then
2791 deplibs="$deplibs -lc"
2797 # Transform deplibs into only deplibs that can be linked in shared.
2799 libname_save=$libname
2800 release_save=$release
2801 versuffix_save=$versuffix
2803 # I'm not sure if I'm treating the release correctly. I think
2804 # release should show up in the -l (ie -lgmp5) so we don't want to
2805 # add it in twice. Is that correct?
2811 case $deplibs_check_method in
2813 # Don't check for shared/static. Everything works.
2814 # This might be a little naive. We might want to check
2815 # whether the library exists or not. But this is on
2816 # osf3 & osf4 and I'm not really sure... Just
2817 # implementing what was already the behaviour.
2821 # This code stresses the "libraries are programs" paradigm to its
2822 # limits. Maybe even breaks it. We compile a program, linking it
2823 # against the deplibs as a proxy for the library. Then we can check
2824 # whether they linked in statically or dynamically with ldd.
2826 cat > conftest.c <<EOF
2827 int main() { return 0; }
2830 $CC -o conftest conftest.c $deplibs
2831 if test $? -eq 0 ; then
2832 ldd_output=`ldd conftest`
2833 for i in $deplibs; do
2834 name="`expr $i : '-l\(.*\)'`"
2835 # If $name is empty we are operating on a -L argument.
2836 if test -n "$name" && test "$name" != "0"; then
2837 libname=`eval \\$echo \"$libname_spec\"`
2838 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2839 set dummy $deplib_matches
2841 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2842 newdeplibs="$newdeplibs $i"
2846 echo "*** Warning: This library needs some functionality provided by $i."
2847 echo "*** I have the capability to make that library automatically link in when"
2848 echo "*** you link to this library. But I can only do this if you have a"
2849 echo "*** shared version of the library, which you do not appear to have."
2852 newdeplibs="$newdeplibs $i"
2856 # Error occured in the first compile. Let's try to salvage the situation:
2857 # Compile a seperate program for each library.
2858 for i in $deplibs; do
2859 name="`expr $i : '-l\(.*\)'`"
2860 # If $name is empty we are operating on a -L argument.
2861 if test -n "$name" && test "$name" != "0"; then
2863 $CC -o conftest conftest.c $i
2865 if test $? -eq 0 ; then
2866 ldd_output=`ldd conftest`
2867 libname=`eval \\$echo \"$libname_spec\"`
2868 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2869 set dummy $deplib_matches
2871 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2872 newdeplibs="$newdeplibs $i"
2876 echo "*** Warning: This library needs some functionality provided by $i."
2877 echo "*** I have the capability to make that library automatically link in when"
2878 echo "*** you link to this library. But I can only do this if you have a"
2879 echo "*** shared version of the library, which you do not appear to have."
2884 echo "*** Warning! Library $i is needed by this library but I was not able to"
2885 echo "*** make it link in! You will probably need to install it or some"
2886 echo "*** library that it depends on before this library will be fully"
2887 echo "*** functional. Installing it before continuing would be even better."
2890 newdeplibs="$newdeplibs $i"
2896 set dummy $deplibs_check_method
2897 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2898 for a_deplib in $deplibs; do
2899 name="`expr $a_deplib : '-l\(.*\)'`"
2900 # If $name is empty we are operating on a -L argument.
2901 if test -n "$name" && test "$name" != "0"; then
2902 libname=`eval \\$echo \"$libname_spec\"`
2903 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2904 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2905 for potent_lib in $potential_libs; do
2906 # Follow soft links.
2907 if ls -lLd "$potent_lib" 2>/dev/null \
2908 | grep " -> " >/dev/null; then
2911 # The statement above tries to avoid entering an
2912 # endless loop below, in case of cyclic links.
2913 # We might still enter an endless loop, since a link
2914 # loop can be closed while we follow links,
2916 potlib="$potent_lib"
2917 while test -h "$potlib" 2>/dev/null; do
2918 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2920 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2921 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2924 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2926 | egrep "$file_magic_regex" > /dev/null; then
2927 newdeplibs="$newdeplibs $a_deplib"
2933 if test -n "$a_deplib" ; then
2936 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2937 echo "*** I have the capability to make that library automatically link in when"
2938 echo "*** you link to this library. But I can only do this if you have a"
2939 echo "*** shared version of the library, which you do not appear to have."
2942 # Add a -L argument.
2943 newdeplibs="$newdeplibs $a_deplib"
2945 done # Gone through all deplibs.
2948 set dummy $deplibs_check_method
2949 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2950 for a_deplib in $deplibs; do
2951 name="`expr $a_deplib : '-l\(.*\)'`"
2952 # If $name is empty we are operating on a -L argument.
2953 if test -n "$name" && test "$name" != "0"; then
2954 libname=`eval \\$echo \"$libname_spec\"`
2955 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2956 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2957 for potent_lib in $potential_libs; do
2958 if eval echo \"$potent_lib\" 2>/dev/null \
2960 | egrep "$match_pattern_regex" > /dev/null; then
2961 newdeplibs="$newdeplibs $a_deplib"
2967 if test -n "$a_deplib" ; then
2970 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2971 echo "*** I have the capability to make that library automatically link in when"
2972 echo "*** you link to this library. But I can only do this if you have a"
2973 echo "*** shared version of the library, which you do not appear to have."
2976 # Add a -L argument.
2977 newdeplibs="$newdeplibs $a_deplib"
2979 done # Gone through all deplibs.
2983 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2984 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2985 grep . >/dev/null; then
2987 if test "X$deplibs_check_method" = "Xnone"; then
2988 echo "*** Warning: inter-library dependencies are not supported in this platform."
2990 echo "*** Warning: inter-library dependencies are not known to be supported."
2992 echo "*** All declared inter-library dependencies are being dropped."
2997 versuffix=$versuffix_save
2999 release=$release_save
3000 libname=$libname_save
3004 *-*-rhapsody* | *-*-darwin1.[012])
3005 # On Rhapsody replace the C library is the System framework
3006 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3010 if test "$droppeddeps" = yes; then
3011 if test "$module" = yes; then
3013 echo "*** Warning: libtool could not satisfy all declared inter-library"
3014 echo "*** dependencies of module $libname. Therefore, libtool will create"
3015 echo "*** a static module, that should work as long as the dlopening"
3016 echo "*** application is linked with the -dlopen flag."
3017 if test -z "$global_symbol_pipe"; then
3019 echo "*** However, this would only work if libtool was able to extract symbol"
3020 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3021 echo "*** not find such a program. So, this module is probably useless."
3022 echo "*** \`nm' from GNU binutils and a full rebuild may help."
3024 if test "$build_old_libs" = no; then
3025 oldlibs="$output_objdir/$libname.$libext"
3026 build_libtool_libs=module
3029 build_libtool_libs=no
3032 echo "*** The inter-library dependencies that have been dropped here will be"
3033 echo "*** automatically added whenever a program is linked with this library"
3034 echo "*** or is declared to -dlopen it."
3036 if test $allow_undefined = no; then
3038 echo "*** Since this library must not contain undefined symbols,"
3039 echo "*** because either the platform does not support them or"
3040 echo "*** it was explicitly requested with -no-undefined,"
3041 echo "*** libtool will only create a static version of it."
3042 if test "$build_old_libs" = no; then
3043 oldlibs="$output_objdir/$libname.$libext"
3044 build_libtool_libs=module
3047 build_libtool_libs=no
3052 # Done checking deplibs!
3056 # All the library-specific variables (install_libdir is set above).
3061 # Test again, we may have decided not to build it any more
3062 if test "$build_libtool_libs" = yes; then
3063 if test $hardcode_into_libs = yes; then
3064 # Hardcode the library paths
3067 rpath="$finalize_rpath"
3068 test "$mode" != relink && rpath="$compile_rpath$rpath"
3069 for libdir in $rpath; do
3070 if test -n "$hardcode_libdir_flag_spec"; then
3071 if test -n "$hardcode_libdir_separator"; then
3072 if test -z "$hardcode_libdirs"; then
3073 hardcode_libdirs="$libdir"
3075 # Just accumulate the unique libdirs.
3076 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3077 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3080 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3085 eval flag=\"$hardcode_libdir_flag_spec\"
3086 dep_rpath="$dep_rpath $flag"
3088 elif test -n "$runpath_var"; then
3089 case "$perm_rpath " in
3091 *) perm_rpath="$perm_rpath $libdir" ;;
3095 # Substitute the hardcoded libdirs into the rpath.
3096 if test -n "$hardcode_libdir_separator" &&
3097 test -n "$hardcode_libdirs"; then
3098 libdir="$hardcode_libdirs"
3099 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3101 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3102 # We should set the runpath_var.
3104 for dir in $perm_rpath; do
3107 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3109 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3112 shlibpath="$finalize_shlibpath"
3113 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3114 if test -n "$shlibpath"; then
3115 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3118 # Get the real and link names of the library.
3119 eval library_names=\"$library_names_spec\"
3120 set dummy $library_names
3124 if test -n "$soname_spec"; then
3125 eval soname=\"$soname_spec\"
3129 test -z "$dlname" && dlname=$soname
3131 lib="$output_objdir/$realname"
3134 linknames="$linknames $link"
3137 # Ensure that we have .o objects for linkers which dislike .lo
3138 # (e.g. aix) in case we are running --disable-static
3139 for obj in $libobjs; do
3140 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
3141 if test "X$xdir" = "X$obj"; then
3146 baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
3147 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3148 if test ! -f $xdir/$oldobj; then
3149 $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
3150 $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
3154 # Use standard objects if they are pic
3155 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3157 # Prepare the list of exported symbols
3158 if test -z "$export_symbols"; then
3159 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3160 $show "generating symbol list for \`$libname.la'"
3161 export_symbols="$output_objdir/$libname.exp"
3162 $run $rm $export_symbols
3163 eval cmds=\"$export_symbols_cmds\"
3164 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3165 for cmd in $cmds; do
3168 $run eval "$cmd" || exit $?
3171 if test -n "$export_symbols_regex"; then
3172 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3173 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3174 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3175 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3180 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3181 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3184 if test -n "$convenience"; then
3185 if test -n "$whole_archive_flag_spec"; then
3186 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3188 gentop="$output_objdir/${outputname}x"
3189 $show "${rm}r $gentop"
3190 $run ${rm}r "$gentop"
3191 $show "mkdir $gentop"
3192 $run mkdir "$gentop"
3194 if test $status -ne 0 && test ! -d "$gentop"; then
3197 generated="$generated $gentop"
3199 for xlib in $convenience; do
3200 # Extract the objects.
3202 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3203 *) xabs=`pwd`"/$xlib" ;;
3205 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3206 xdir="$gentop/$xlib"
3208 $show "${rm}r $xdir"
3213 if test $status -ne 0 && test ! -d "$xdir"; then
3216 $show "(cd $xdir && $AR x $xabs)"
3217 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3219 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3224 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3225 eval flag=\"$thread_safe_flag_spec\"
3226 linker_flags="$linker_flags $flag"
3229 # Make a backup of the uninstalled library when relinking
3230 if test "$mode" = relink; then
3231 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
3234 # Do each of the archive commands.
3235 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3236 eval cmds=\"$archive_expsym_cmds\"
3238 eval cmds=\"$archive_cmds\"
3240 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3241 for cmd in $cmds; do
3244 $run eval "$cmd" || exit $?
3248 # Restore the uninstalled library and exit
3249 if test "$mode" = relink; then
3250 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
3254 # Create links to the real library.
3255 for linkname in $linknames; do
3256 if test "$realname" != "$linkname"; then
3257 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
3258 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
3262 # If -module or -export-dynamic was specified, set the dlname.
3263 if test "$module" = yes || test "$export_dynamic" = yes; then
3264 # On all known operating systems, these are identical.
3271 if test -n "$deplibs"; then
3272 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
3275 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3276 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3279 if test -n "$rpath"; then
3280 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3283 if test -n "$xrpath"; then
3284 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
3287 if test -n "$vinfo"; then
3288 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3291 if test -n "$release"; then
3292 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3297 if test -n "$objs$old_deplibs"; then
3298 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3302 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
3310 # Delete the old objects.
3311 $run $rm $obj $libobj
3313 # Objects from convenience libraries. This assumes
3314 # single-version convenience libraries. Whenever we create
3315 # different ones for PIC/non-PIC, this we'll have to duplicate
3319 # reload_cmds runs $LD directly, so let us get rid of
3320 # -Wl from whole_archive_flag_spec
3323 if test -n "$convenience"; then
3324 if test -n "$whole_archive_flag_spec"; then
3325 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3327 gentop="$output_objdir/${obj}x"
3328 $show "${rm}r $gentop"
3329 $run ${rm}r "$gentop"
3330 $show "mkdir $gentop"
3331 $run mkdir "$gentop"
3333 if test $status -ne 0 && test ! -d "$gentop"; then
3336 generated="$generated $gentop"
3338 for xlib in $convenience; do
3339 # Extract the objects.
3341 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3342 *) xabs=`pwd`"/$xlib" ;;
3344 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3345 xdir="$gentop/$xlib"
3347 $show "${rm}r $xdir"
3352 if test $status -ne 0 && test ! -d "$xdir"; then
3355 $show "(cd $xdir && $AR x $xabs)"
3356 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3358 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3363 # Create the old-style object.
3364 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
3367 eval cmds=\"$reload_cmds\"
3368 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3369 for cmd in $cmds; do
3372 $run eval "$cmd" || exit $?
3376 # Exit if we aren't doing a library object file.
3377 if test -z "$libobj"; then
3378 if test -n "$gentop"; then
3379 $show "${rm}r $gentop"
3386 if test "$build_libtool_libs" != yes; then
3387 if test -n "$gentop"; then
3388 $show "${rm}r $gentop"
3392 # Create an invalid libtool object if no PIC, so that we don't
3393 # accidentally link it into a program.
3394 $show "echo timestamp > $libobj"
3395 $run eval "echo timestamp > $libobj" || exit $?
3399 if test -n "$pic_flag" || test "$pic_mode" != default; then
3400 # Only do commands if we really have different PIC objects.
3401 reload_objs="$libobjs $reload_conv_objs"
3403 eval cmds=\"$reload_cmds\"
3404 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3405 for cmd in $cmds; do
3408 $run eval "$cmd" || exit $?
3412 # Just create a symlink.
3415 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3416 if test "X$xdir" = "X$libobj"; then
3421 baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3422 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3423 $show "(cd $xdir && $LN_S $oldobj $baseobj)"
3424 $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
3427 if test -n "$gentop"; then
3428 $show "${rm}r $gentop"
3437 *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
3439 if test -n "$vinfo"; then
3440 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3443 if test -n "$release"; then
3444 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3447 if test "$preload" = yes; then
3448 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
3449 test "$dlopen_self_static" = unknown; then
3450 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3455 *-*-rhapsody* | *-*-darwin1.[012])
3456 # On Rhapsody replace the C library is the System framework
3457 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3458 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3462 compile_command="$compile_command $compile_deplibs"
3463 finalize_command="$finalize_command $finalize_deplibs"
3465 if test -n "$rpath$xrpath"; then
3466 # If the user specified any rpath flags, then add them.
3467 for libdir in $rpath $xrpath; do
3468 # This is the magic to use -rpath.
3469 case "$finalize_rpath " in
3471 *) finalize_rpath="$finalize_rpath $libdir" ;;
3476 # Now hardcode the library paths
3479 for libdir in $compile_rpath $finalize_rpath; do
3480 if test -n "$hardcode_libdir_flag_spec"; then
3481 if test -n "$hardcode_libdir_separator"; then
3482 if test -z "$hardcode_libdirs"; then
3483 hardcode_libdirs="$libdir"
3485 # Just accumulate the unique libdirs.
3486 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3487 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3490 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3495 eval flag=\"$hardcode_libdir_flag_spec\"
3496 rpath="$rpath $flag"
3498 elif test -n "$runpath_var"; then
3499 case "$perm_rpath " in
3501 *) perm_rpath="$perm_rpath $libdir" ;;
3505 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
3506 case :$dllsearchpath: in
3508 *) dllsearchpath="$dllsearchpath:$libdir";;
3513 # Substitute the hardcoded libdirs into the rpath.
3514 if test -n "$hardcode_libdir_separator" &&
3515 test -n "$hardcode_libdirs"; then
3516 libdir="$hardcode_libdirs"
3517 eval rpath=\" $hardcode_libdir_flag_spec\"
3519 compile_rpath="$rpath"
3523 for libdir in $finalize_rpath; do
3524 if test -n "$hardcode_libdir_flag_spec"; then
3525 if test -n "$hardcode_libdir_separator"; then
3526 if test -z "$hardcode_libdirs"; then
3527 hardcode_libdirs="$libdir"
3529 # Just accumulate the unique libdirs.
3530 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3531 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3534 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3539 eval flag=\"$hardcode_libdir_flag_spec\"
3540 rpath="$rpath $flag"
3542 elif test -n "$runpath_var"; then
3543 case "$finalize_perm_rpath " in
3545 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
3549 # Substitute the hardcoded libdirs into the rpath.
3550 if test -n "$hardcode_libdir_separator" &&
3551 test -n "$hardcode_libdirs"; then
3552 libdir="$hardcode_libdirs"
3553 eval rpath=\" $hardcode_libdir_flag_spec\"
3555 finalize_rpath="$rpath"
3557 if test -n "$libobjs" && test "$build_old_libs" = yes; then
3558 # Transform all the library objects into standard objects.
3559 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3560 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3564 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3565 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3566 dlsyms="${outputname}S.c"
3568 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3572 if test -n "$dlsyms"; then
3576 # Discover the nlist of each of the dlfiles.
3577 nlist="$output_objdir/${outputname}.nm"
3579 $show "$rm $nlist ${nlist}S ${nlist}T"
3580 $run $rm "$nlist" "${nlist}S" "${nlist}T"
3582 # Parse the name list into a source file.
3583 $show "creating $output_objdir/$dlsyms"
3585 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3586 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3587 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3593 /* Prevent the only kind of declaration conflicts we can make. */
3594 #define lt_preloaded_symbols some_other_symbol
3596 /* External symbol declarations for the compiler. */\
3599 if test "$dlself" = yes; then
3600 $show "generating symbol list for \`$output'"
3602 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3604 # Add our own program objects to the symbol list.
3605 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3606 for arg in $progfiles; do
3607 $show "extracting global C symbols from \`$arg'"
3608 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3611 if test -n "$exclude_expsyms"; then
3612 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3613 $run eval '$mv "$nlist"T "$nlist"'
3616 if test -n "$export_symbols_regex"; then
3617 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3618 $run eval '$mv "$nlist"T "$nlist"'
3621 # Prepare the list of exported symbols
3622 if test -z "$export_symbols"; then
3623 export_symbols="$output_objdir/$output.exp"
3624 $run $rm $export_symbols
3625 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3627 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3628 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3629 $run eval 'mv "$nlist"T "$nlist"'
3633 for arg in $dlprefiles; do
3634 $show "extracting global C symbols from \`$arg'"
3635 name=`echo "$arg" | sed -e 's%^.*/%%'`
3636 $run eval 'echo ": $name " >> "$nlist"'
3637 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3640 if test -z "$run"; then
3641 # Make sure we have at least an empty file.
3642 test -f "$nlist" || : > "$nlist"
3644 if test -n "$exclude_expsyms"; then
3645 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3646 $mv "$nlist"T "$nlist"
3649 # Try sorting and uniquifying the output.
3650 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
3653 grep -v "^: " < "$nlist" > "$nlist"S
3656 if test -f "$nlist"S; then
3657 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3659 echo '/* NONE */' >> "$output_objdir/$dlsyms"
3662 $echo >> "$output_objdir/$dlsyms" "\
3664 #undef lt_preloaded_symbols
3666 #if defined (__STDC__) && __STDC__
3667 # define lt_ptr void *
3669 # define lt_ptr char *
3673 /* The mapping between symbol names and symbols. */
3678 lt_preloaded_symbols[] =
3682 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
3684 $echo >> "$output_objdir/$dlsyms" "\
3688 /* This works around a problem in FreeBSD linker */
3689 #ifdef FREEBSD_WORKAROUND
3690 static const void *lt_preloaded_setup() {
3691 return lt_preloaded_symbols;
3701 pic_flag_for_symtable=
3703 # compiling the symbol table file with pic_flag works around
3704 # a FreeBSD bug that causes programs to crash when -lm is
3705 # linked before any other PIC object. But we must not use
3706 # pic_flag when linking with -static. The problem exists in
3707 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3708 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3709 case "$compile_command " in
3711 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
3714 case "$compile_command " in
3716 *) pic_flag_for_symtable=" $pic_flag -DPIC";;
3720 # Now compile the dynamic symbol file.
3721 $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3722 $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
3724 # Clean up the generated files.
3725 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3726 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3728 # Transform the symbol file into the correct name.
3729 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3730 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3733 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3738 # We keep going just in case the user didn't refer to
3739 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3740 # really was required.
3742 # Nullify the symbol file.
3743 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3744 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3747 if test $need_relink = no || test "$build_libtool_libs" != yes; then
3748 # Replace the output file specification.
3749 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3750 link_command="$compile_command$compile_rpath"
3752 # We have no uninstalled library dependencies, so finalize right now.
3753 $show "$link_command"
3754 $run eval "$link_command"
3757 # Delete the generated files.
3758 if test -n "$dlsyms"; then
3759 $show "$rm $output_objdir/${outputname}S.${objext}"
3760 $run $rm "$output_objdir/${outputname}S.${objext}"
3766 if test -n "$shlibpath_var"; then
3767 # We should set the shlibpath_var
3769 for dir in $temp_rpath; do
3771 [\\/]* | [A-Za-z]:[\\/]*)
3776 # Relative path: add a thisdir entry.
3777 rpath="$rpath\$thisdir/$dir:"
3784 if test -n "$compile_shlibpath$finalize_shlibpath"; then
3785 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3787 if test -n "$finalize_shlibpath"; then
3788 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3793 if test -n "$runpath_var"; then
3794 if test -n "$perm_rpath"; then
3795 # We should set the runpath_var.
3797 for dir in $perm_rpath; do
3800 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
3802 if test -n "$finalize_perm_rpath"; then
3803 # We should set the runpath_var.
3805 for dir in $finalize_perm_rpath; do
3808 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
3812 if test "$no_install" = yes; then
3813 # We don't need to create a wrapper script.
3814 link_command="$compile_var$compile_command$compile_rpath"
3815 # Replace the output file specification.
3816 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3817 # Delete the old output file.
3819 # Link the executable and exit
3820 $show "$link_command"
3821 $run eval "$link_command" || exit $?
3825 if test "$hardcode_action" = relink; then
3826 # Fast installation is not supported
3827 link_command="$compile_var$compile_command$compile_rpath"
3828 relink_command="$finalize_var$finalize_command$finalize_rpath"
3830 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3831 $echo "$modename: \`$output' will be relinked during installation" 1>&2
3833 if test "$fast_install" != no; then
3834 link_command="$finalize_var$compile_command$finalize_rpath"
3835 if test "$fast_install" = yes; then
3836 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3838 # fast_install is set to needless
3842 link_command="$compile_var$compile_command$compile_rpath"
3843 relink_command="$finalize_var$finalize_command$finalize_rpath"
3847 # Replace the output file specification.
3848 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3850 # Delete the old output files.
3851 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
3853 $show "$link_command"
3854 $run eval "$link_command" || exit $?
3856 # Now create the wrapper script.
3857 $show "creating $output"
3859 # Quote the relink command for shipping.
3860 if test -n "$relink_command"; then
3861 # Preserve any variables that may affect compiler behavior
3862 for var in $variables_saved_for_relink; do
3863 if eval test -z \"\${$var+set}\"; then
3864 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3865 elif eval var_value=\$$var; test -z "$var_value"; then
3866 relink_command="$var=; export $var; $relink_command"
3868 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3869 relink_command="$var=\"$var_value\"; export $var; $relink_command"
3872 relink_command="cd `pwd`; $relink_command"
3873 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3876 # Quote $echo for shipping.
3877 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3879 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3880 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
3882 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3884 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3887 # Only actually do things if our run command is non-null.
3888 if test -z "$run"; then
3889 # win32 will think the script is a binary if it has
3890 # a .exe suffix, so we strip it off here.
3892 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
3894 # test for cygwin because mv fails w/o .exe extensions
3896 *cygwin*) exeext=.exe ;;
3900 trap "$rm $output; exit 1" 1 2 15
3905 # $output - temporary wrapper script for $objdir/$outputname
3906 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3908 # The $output program cannot be directly executed until all the libtool
3909 # libraries that it depends on are installed.
3911 # This wrapper script should never be moved out of the build directory.
3912 # If it is, it will not operate correctly.
3914 # Sed substitution that helps us do robust quoting. It backslashifies
3915 # metacharacters that are still active within double-quoted strings.
3916 Xsed='sed -e 1s/^X//'
3917 sed_quote_subst='$sed_quote_subst'
3919 # The HP-UX ksh and POSIX shell print the target directory to stdout
3921 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3923 relink_command=\"$relink_command\"
3925 # This environment variable determines our operation mode.
3926 if test \"\$libtool_install_magic\" = \"$magic\"; then
3927 # install mode needs the following variable:
3928 notinst_deplibs='$notinst_deplibs'
3930 # When we are sourced in execute mode, \$file and \$echo are already set.
3931 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3934 # Make sure echo works.
3935 if test \"X\$1\" = X--no-reexec; then
3936 # Discard the --no-reexec flag, and continue.
3938 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
3939 # Yippee, \$echo works!
3942 # Restart under the correct shell, and then maybe \$echo will work.
3943 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
3949 # Find the directory that this script lives in.
3950 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3951 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3953 # Follow symbolic links until we get to the real thisdir.
3954 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3955 while test -n \"\$file\"; do
3956 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3958 # If there was a directory component, then change thisdir.
3959 if test \"x\$destdir\" != \"x\$file\"; then
3960 case \"\$destdir\" in
3961 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
3962 *) thisdir=\"\$thisdir/\$destdir\" ;;
3966 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3967 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
3970 # Try to get the absolute directory name.
3971 absdir=\`cd \"\$thisdir\" && pwd\`
3972 test -n \"\$absdir\" && thisdir=\"\$absdir\"
3975 if test "$fast_install" = yes; then
3977 program=lt-'$outputname'$exeext
3978 progdir=\"\$thisdir/$objdir\"
3980 if test ! -f \"\$progdir/\$program\" || \\
3981 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
3982 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3984 file=\"\$\$-\$program\"
3986 if test ! -d \"\$progdir\"; then
3987 $mkdir \"\$progdir\"
3989 $rm \"\$progdir/\$file\"
3994 # relink executable if necessary
3995 if test -n \"\$relink_command\"; then
3996 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
3998 $echo \"\$relink_command_output\" >&2
3999 $rm \"\$progdir/\$file\"
4004 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4005 { $rm \"\$progdir/\$program\";
4006 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4007 $rm \"\$progdir/\$file\"
4011 program='$outputname'
4012 progdir=\"\$thisdir/$objdir\"
4018 if test -f \"\$progdir/\$program\"; then"
4020 # Export our shlibpath_var if we have one.
4021 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4023 # Add our own library path to $shlibpath_var
4024 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4026 # Some systems cannot cope with colon-terminated $shlibpath_var
4027 # The second colon is a workaround for a bug in BeOS R4 sed
4028 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
4030 export $shlibpath_var
4034 # fixup the dll searchpath if we need to.
4035 if test -n "$dllsearchpath"; then
4037 # Add the dll search path components to the executable PATH
4038 PATH=$dllsearchpath:\$PATH
4043 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4044 # Run the actual program with our arguments.
4047 # win32 systems need to use the prog path for dll
4049 *-*-cygwin* | *-*-pw32*)
4051 exec \$progdir/\$program \${1+\"\$@\"}
4055 # Backslashes separate directories on plain windows
4056 *-*-mingw | *-*-os2*)
4058 exec \$progdir\\\\\$program \${1+\"\$@\"}
4064 # Export the path to the program.
4065 PATH=\"\$progdir:\$PATH\"
4068 exec \$program \${1+\"\$@\"}
4073 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
4077 # The program doesn't exist.
4078 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
4079 \$echo \"This script is just a wrapper for \$program.\" 1>&2
4080 echo \"See the $PACKAGE documentation for more information.\" 1>&2
4091 # See if we need to build an old-fashioned archive.
4092 for oldlib in $oldlibs; do
4094 if test "$build_libtool_libs" = convenience; then
4095 oldobjs="$libobjs_save"
4096 addlibs="$convenience"
4097 build_libtool_libs=no
4099 if test "$build_libtool_libs" = module; then
4100 oldobjs="$libobjs_save"
4101 build_libtool_libs=no
4103 oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
4105 addlibs="$old_convenience"
4108 if test -n "$addlibs"; then
4109 gentop="$output_objdir/${outputname}x"
4110 $show "${rm}r $gentop"
4111 $run ${rm}r "$gentop"
4112 $show "mkdir $gentop"
4113 $run mkdir "$gentop"
4115 if test $status -ne 0 && test ! -d "$gentop"; then
4118 generated="$generated $gentop"
4120 # Add in members from convenience archives.
4121 for xlib in $addlibs; do
4122 # Extract the objects.
4124 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4125 *) xabs=`pwd`"/$xlib" ;;
4127 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4128 xdir="$gentop/$xlib"
4130 $show "${rm}r $xdir"
4135 if test $status -ne 0 && test ! -d "$xdir"; then
4138 $show "(cd $xdir && $AR x $xabs)"
4139 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4141 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
4145 # Do each command in the archive commands.
4146 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
4147 eval cmds=\"$old_archive_from_new_cmds\"
4149 # Ensure that we have .o objects in place in case we decided
4150 # not to build a shared library, and have fallen back to building
4151 # static libs even though --disable-static was passed!
4152 for oldobj in $oldobjs; do
4153 if test ! -f $oldobj; then
4154 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
4155 if test "X$xdir" = "X$oldobj"; then
4160 baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
4161 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
4162 $show "(cd $xdir && ${LN_S} $obj $baseobj)"
4163 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
4167 eval cmds=\"$old_archive_cmds\"
4169 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4170 for cmd in $cmds; do
4173 $run eval "$cmd" || exit $?
4178 if test -n "$generated"; then
4179 $show "${rm}r$generated"
4180 $run ${rm}r$generated
4183 # Now create the libtool archive.
4187 test "$build_old_libs" = yes && old_library="$libname.$libext"
4188 $show "creating $output"
4190 # Preserve any variables that may affect compiler behavior
4191 for var in $variables_saved_for_relink; do
4192 if eval test -z \"\${$var+set}\"; then
4193 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4194 elif eval var_value=\$$var; test -z "$var_value"; then
4195 relink_command="$var=; export $var; $relink_command"
4197 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4198 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4201 # Quote the link command for shipping.
4202 relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
4203 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4205 # Only create the output if not a dry run.
4206 if test -z "$run"; then
4207 for installed in no yes; do
4208 if test "$installed" = yes; then
4209 if test -z "$install_libdir"; then
4212 output="$output_objdir/$outputname"i
4213 # Replace all uninstalled libtool libraries with the installed ones
4215 for deplib in $dependency_libs; do
4218 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
4219 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
4220 if test -z "$libdir"; then
4221 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
4224 newdependency_libs="$newdependency_libs $libdir/$name"
4226 *) newdependency_libs="$newdependency_libs $deplib" ;;
4229 dependency_libs="$newdependency_libs"
4231 for lib in $dlfiles; do
4232 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4233 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4234 if test -z "$libdir"; then
4235 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4238 newdlfiles="$newdlfiles $libdir/$name"
4240 dlfiles="$newdlfiles"
4242 for lib in $dlprefiles; do
4243 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4244 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4245 if test -z "$libdir"; then
4246 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4249 newdlprefiles="$newdlprefiles $libdir/$name"
4251 dlprefiles="$newdlprefiles"
4254 # place dlname in correct position for cygwin
4256 case $host,$output,$installed,$module,$dlname in
4257 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
4260 # $outputname - a libtool library file
4261 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4263 # Please DO NOT delete this file!
4264 # It is necessary for linking the library.
4266 # The name that we can dlopen(3).
4269 # Names of this library.
4270 library_names='$library_names'
4272 # The name of the static archive.
4273 old_library='$old_library'
4275 # Libraries that this one depends upon.
4276 dependency_libs='$dependency_libs'
4278 # Version information for $libname.
4283 # Is this an already installed library?
4284 installed=$installed
4286 # Files to dlopen/dlpreopen
4288 dlpreopen='$dlprefiles'
4290 # Directory that this library needs to be installed in:
4291 libdir='$install_libdir'"
4292 if test "$installed" = no && test $need_relink = yes; then
4294 relink_command=\"$relink_command\""
4299 # Do a symbolic link so that the libtool archive can be found in
4300 # LD_LIBRARY_PATH before the program is installed.
4301 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4302 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
4308 # libtool install mode
4310 modename="$modename: install"
4312 # There may be an optional sh(1) argument at the beginning of
4313 # install_prog (especially on Windows NT).
4314 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
4315 # Allow the use of GNU shtool's install command.
4316 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
4317 # Aesthetically quote it.
4318 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4320 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4324 install_prog="$arg "
4332 # The real first argument should be the name of the installation program.
4333 # Aesthetically quote it.
4334 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4336 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4340 install_prog="$install_prog$arg"
4342 # We need to accept at least all the BSD install flags.
4352 if test -n "$dest"; then
4353 files="$files $dest"
4371 # If the previous option needed an argument, then skip it.
4372 if test -n "$prev"; then
4381 # Aesthetically quote the argument.
4382 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4384 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4388 install_prog="$install_prog $arg"
4391 if test -z "$install_prog"; then
4392 $echo "$modename: you must specify an install program" 1>&2
4397 if test -n "$prev"; then
4398 $echo "$modename: the \`$prev' option requires an argument" 1>&2
4403 if test -z "$files"; then
4404 if test -z "$dest"; then
4405 $echo "$modename: no file or destination specified" 1>&2
4407 $echo "$modename: you must specify a destination" 1>&2
4413 # Strip any trailing slash from the destination.
4414 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
4416 # Check to see that the destination is a directory.
4417 test -d "$dest" && isdir=yes
4418 if test "$isdir" = yes; then
4422 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
4423 test "X$destdir" = "X$dest" && destdir=.
4424 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
4426 # Not a directory, so check to see that there is only one file specified.
4428 if test $# -gt 2; then
4429 $echo "$modename: \`$dest' is not a directory" 1>&2
4435 [\\/]* | [A-Za-z]:[\\/]*) ;;
4437 for file in $files; do
4441 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4450 # This variable tells wrapper scripts just to set variables rather
4451 # than running their programs.
4452 libtool_install_magic="$magic"
4457 for file in $files; do
4459 # Do each installation.
4462 # Do the static libraries later.
4463 staticlibs="$staticlibs $file"
4467 # Check to see that this really is a libtool archive.
4468 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4470 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4478 # If there is no directory component, then add one.
4480 */* | *\\*) . $file ;;
4484 # Add the libdir to current_libdirs if it is the destination.
4485 if test "X$destdir" = "X$libdir"; then
4486 case "$current_libdirs " in
4488 *) current_libdirs="$current_libdirs $libdir" ;;
4491 # Note the libdir as a future libdir.
4492 case "$future_libdirs " in
4494 *) future_libdirs="$future_libdirs $libdir" ;;
4498 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
4499 test "X$dir" = "X$file/" && dir=
4502 if test -n "$relink_command"; then
4503 $echo "$modename: warning: relinking \`$file'" 1>&2
4504 $show "$relink_command"
4505 if $run eval "$relink_command"; then :
4507 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4512 # See the names of the shared library.
4513 set dummy $library_names
4514 if test -n "$2"; then
4520 test -n "$relink_command" && srcname="$realname"T
4522 # Install the shared library and build the symlinks.
4523 $show "$install_prog $dir/$srcname $destdir/$realname"
4524 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
4525 if test -n "$stripme" && test -n "$striplib"; then
4526 $show "$striplib $destdir/$realname"
4527 $run eval "$striplib $destdir/$realname" || exit $?
4530 if test $# -gt 0; then
4531 # Delete the old symlinks, and create new ones.
4534 if test "$linkname" != "$realname"; then
4535 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4536 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4541 # Do each command in the postinstall commands.
4542 lib="$destdir/$realname"
4543 eval cmds=\"$postinstall_cmds\"
4544 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4545 for cmd in $cmds; do
4548 $run eval "$cmd" || exit $?
4553 # Install the pseudo-library for information purposes.
4554 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4555 instname="$dir/$name"i
4556 $show "$install_prog $instname $destdir/$name"
4557 $run eval "$install_prog $instname $destdir/$name" || exit $?
4559 # Maybe install the static library, too.
4560 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
4564 # Install (i.e. copy) a libtool object.
4566 # Figure out destination file name, if it wasn't already specified.
4567 if test -n "$destname"; then
4568 destfile="$destdir/$destname"
4570 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4571 destfile="$destdir/$destfile"
4574 # Deduce the name of the destination old-style object file.
4577 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4580 staticdest="$destfile"
4584 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4590 # Install the libtool object if requested.
4591 if test -n "$destfile"; then
4592 $show "$install_prog $file $destfile"
4593 $run eval "$install_prog $file $destfile" || exit $?
4596 # Install the old object if enabled.
4597 if test "$build_old_libs" = yes; then
4598 # Deduce the name of the old-style object file.
4599 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
4601 $show "$install_prog $staticobj $staticdest"
4602 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
4608 # Figure out destination file name, if it wasn't already specified.
4609 if test -n "$destname"; then
4610 destfile="$destdir/$destname"
4612 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4613 destfile="$destdir/$destfile"
4616 # Do a test to see if this is really a libtool program.
4617 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4621 # If there is no directory component, then add one.
4623 */* | *\\*) . $file ;;
4627 # Check the variables that should have been set.
4628 if test -z "$notinst_deplibs"; then
4629 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4634 for lib in $notinst_deplibs; do
4635 # Check to see that each library is installed.
4637 if test -f "$lib"; then
4638 # If there is no directory component, then add one.
4640 */* | *\\*) . $lib ;;
4644 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4645 if test -n "$libdir" && test ! -f "$libfile"; then
4646 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4652 # If there is no directory component, then add one.
4654 */* | *\\*) . $file ;;
4659 if test "$fast_install" = no && test -n "$relink_command"; then
4660 if test "$finalize" = yes && test -z "$run"; then
4662 test -n "$TMPDIR" && tmpdir="$TMPDIR"
4663 tmpdir="$tmpdir/libtool-$$"
4664 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4666 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4669 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4670 outputname="$tmpdir/$file"
4671 # Replace the output file specification.
4672 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4674 $show "$relink_command"
4675 if $run eval "$relink_command"; then :
4677 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4683 $echo "$modename: warning: cannot relink \`$file'" 1>&2
4686 # Install the binary that we compiled earlier.
4687 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4691 # remove .exe since cygwin /usr/bin/install will append another
4693 case $install_prog,$host in
4694 /usr/bin/install*,*cygwin*)
4695 case $file:$destfile in
4700 destfile=$destfile.exe
4703 destfile=`echo $destfile | sed -e 's,.exe$,,'`
4708 $show "$install_prog$stripme $file $destfile"
4709 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
4710 test -n "$outputname" && ${rm}r "$tmpdir"
4715 for file in $staticlibs; do
4716 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4718 # Set up the ranlib parameters.
4719 oldlib="$destdir/$name"
4721 $show "$install_prog $file $oldlib"
4722 $run eval "$install_prog \$file \$oldlib" || exit $?
4724 if test -n "$stripme" && test -n "$striplib"; then
4725 $show "$old_striplib $oldlib"
4726 $run eval "$old_striplib $oldlib" || exit $?
4729 # Do each command in the postinstall commands.
4730 eval cmds=\"$old_postinstall_cmds\"
4731 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4732 for cmd in $cmds; do
4735 $run eval "$cmd" || exit $?
4740 if test -n "$future_libdirs"; then
4741 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4744 if test -n "$current_libdirs"; then
4745 # Maybe just do a dry run.
4746 test -n "$run" && current_libdirs=" -n$current_libdirs"
4747 exec_cmd='$SHELL $0 --finish$current_libdirs'
4753 # libtool finish mode
4755 modename="$modename: finish"
4759 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4762 libdirs="$libdirs $dir"
4765 for libdir in $libdirs; do
4766 if test -n "$finish_cmds"; then
4767 # Do each command in the finish commands.
4768 eval cmds=\"$finish_cmds\"
4769 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4770 for cmd in $cmds; do
4773 $run eval "$cmd" || admincmds="$admincmds
4778 if test -n "$finish_eval"; then
4779 # Do the single finish_eval.
4780 eval cmds=\"$finish_eval\"
4781 $run eval "$cmds" || admincmds="$admincmds
4787 # Exit here if they wanted silent mode.
4788 test "$show" = ":" && exit 0
4790 echo "----------------------------------------------------------------------"
4791 echo "Libraries have been installed in:"
4792 for libdir in $libdirs; do
4796 echo "If you ever happen to want to link against installed libraries"
4797 echo "in a given directory, LIBDIR, you must either use libtool, and"
4798 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4799 echo "flag during linking and do at least one of the following:"
4800 if test -n "$shlibpath_var"; then
4801 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4802 echo " during execution"
4804 if test -n "$runpath_var"; then
4805 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4806 echo " during linking"
4808 if test -n "$hardcode_libdir_flag_spec"; then
4810 eval flag=\"$hardcode_libdir_flag_spec\"
4812 echo " - use the \`$flag' linker flag"
4814 if test -n "$admincmds"; then
4815 echo " - have your system administrator run these commands:$admincmds"
4817 if test -f /etc/ld.so.conf; then
4818 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4821 echo "See any operating system documentation about shared libraries for"
4822 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4823 echo "----------------------------------------------------------------------"
4827 # libtool execute mode
4829 modename="$modename: execute"
4831 # The first argument is the command name.
4833 if test -z "$cmd"; then
4834 $echo "$modename: you must specify a COMMAND" 1>&2
4839 # Handle -dlopen flags immediately.
4840 for file in $execute_dlfiles; do
4841 if test ! -f "$file"; then
4842 $echo "$modename: \`$file' is not a file" 1>&2
4850 # Check to see that this really is a libtool archive.
4851 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4853 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4858 # Read the libtool library.
4862 # If there is no directory component, then add one.
4864 */* | *\\*) . $file ;;
4868 # Skip this library if it cannot be dlopened.
4869 if test -z "$dlname"; then
4870 # Warn if it was a shared library.
4871 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
4875 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4876 test "X$dir" = "X$file" && dir=.
4878 if test -f "$dir/$objdir/$dlname"; then
4881 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
4887 # Just add the directory containing the .lo file.
4888 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4889 test "X$dir" = "X$file" && dir=.
4893 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
4898 # Get the absolute pathname.
4899 absdir=`cd "$dir" && pwd`
4900 test -n "$absdir" && dir="$absdir"
4902 # Now add the directory to shlibpath_var.
4903 if eval "test -z \"\$$shlibpath_var\""; then
4904 eval "$shlibpath_var=\"\$dir\""
4906 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
4910 # This variable tells wrapper scripts just to set shlibpath_var
4911 # rather than running their programs.
4912 libtool_execute_magic="$magic"
4914 # Check if any of the arguments is a wrapper script.
4921 # Do a test to see if this is really a libtool program.
4922 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4923 # If there is no directory component, then add one.
4925 */* | *\\*) . $file ;;
4929 # Transform arg to wrapped name.
4930 file="$progdir/$program"
4934 # Quote arguments (to preserve shell metacharacters).
4935 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
4936 args="$args \"$file\""
4939 if test -z "$run"; then
4940 if test -n "$shlibpath_var"; then
4941 # Export the shlibpath_var.
4942 eval "export $shlibpath_var"
4945 # Restore saved enviroment variables
4946 if test "${save_LC_ALL+set}" = set; then
4947 LC_ALL="$save_LC_ALL"; export LC_ALL
4949 if test "${save_LANG+set}" = set; then
4950 LANG="$save_LANG"; export LANG
4953 # Now prepare to actually exec the command.
4954 exec_cmd='"$cmd"$args'
4956 # Display what would be done.
4957 if test -n "$shlibpath_var"; then
4958 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
4959 $echo "export $shlibpath_var"
4966 # libtool clean and uninstall mode
4968 modename="$modename: $mode"
4974 # This variable tells wrapper scripts just to set variables rather
4975 # than running their programs.
4976 libtool_install_magic="$magic"
4981 -f) rm="$rm $arg"; rmforce=yes ;;
4982 -*) rm="$rm $arg" ;;
4983 *) files="$files $arg" ;;
4987 if test -z "$rm"; then
4988 $echo "$modename: you must specify an RM program" 1>&2
4995 for file in $files; do
4996 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4997 if test "X$dir" = "X$file"; then
5001 objdir="$dir/$objdir"
5003 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5004 test $mode = uninstall && objdir="$dir"
5006 # Remember objdir for removal later, being careful to avoid duplicates
5007 if test $mode = clean; then
5010 *) rmdirs="$rmdirs $objdir" ;;
5014 # Don't error if the file doesn't exist and rm -f was used.
5015 if (test -L "$file") >/dev/null 2>&1 \
5016 || (test -h "$file") >/dev/null 2>&1 \
5017 || test -f "$file"; then
5019 elif test -d "$file"; then
5022 elif test "$rmforce" = yes; then
5030 # Possibly a libtool archive, so verify it.
5031 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5034 # Delete the libtool libraries and symlinks.
5035 for n in $library_names; do
5036 rmfiles="$rmfiles $objdir/$n"
5038 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
5039 test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
5041 if test $mode = uninstall; then
5042 if test -n "$library_names"; then
5043 # Do each command in the postuninstall commands.
5044 eval cmds=\"$postuninstall_cmds\"
5045 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5046 for cmd in $cmds; do
5050 if test $? != 0 && test "$rmforce" != yes; then
5057 if test -n "$old_library"; then
5058 # Do each command in the old_postuninstall commands.
5059 eval cmds=\"$old_postuninstall_cmds\"
5060 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5061 for cmd in $cmds; do
5065 if test $? != 0 && test "$rmforce" != yes; then
5071 # FIXME: should reinstall the best remaining shared library.
5077 if test "$build_old_libs" = yes; then
5078 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
5079 rmfiles="$rmfiles $dir/$oldobj"
5084 # Do a test to see if this is a libtool program.
5085 if test $mode = clean &&
5086 (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5090 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
5091 if test "$fast_install" = yes && test -n "$relink_command"; then
5092 rmfiles="$rmfiles $objdir/lt-$name"
5097 $show "$rm $rmfiles"
5098 $run $rm $rmfiles || exit_status=1
5101 # Try to remove the ${objdir}s in the directories where we deleted files
5102 for dir in $rmdirs; do
5103 if test -d "$dir"; then
5105 $run rmdir $dir >/dev/null 2>&1
5113 $echo "$modename: you must specify a MODE" 1>&2
5114 $echo "$generic_help" 1>&2
5119 if test -z "$exec_cmd"; then
5120 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5121 $echo "$generic_help" 1>&2
5124 fi # test -z "$show_help"
5126 if test -n "$exec_cmd"; then
5131 # We need to display help for each of the modes.
5134 "Usage: $modename [OPTION]... [MODE-ARG]...
5136 Provide generalized library-building support services.
5138 --config show all configuration variables
5139 --debug enable verbose shell tracing
5140 -n, --dry-run display commands without modifying any files
5141 --features display basic configuration information and exit
5142 --finish same as \`--mode=finish'
5143 --help display this help message and exit
5144 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
5145 --quiet same as \`--silent'
5146 --silent don't print informational messages
5147 --version print version information
5149 MODE must be one of the following:
5151 clean remove files from the build directory
5152 compile compile a source file into a libtool object
5153 execute automatically set library path, then run a program
5154 finish complete the installation of libtool libraries
5155 install install libraries or executables
5156 link create a library or an executable
5157 uninstall remove libraries from an installed directory
5159 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
5160 a more detailed description of MODE."
5166 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
5168 Remove files from the build directory.
5170 RM is the name of the program to use to delete files associated with each FILE
5171 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5174 If FILE is a libtool library, object or program, all the files associated
5175 with it are deleted. Otherwise, only FILE itself is deleted using RM."
5180 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
5182 Compile a source file into a libtool library object.
5184 This mode accepts the following additional options:
5186 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
5187 -prefer-pic try to building PIC objects only
5188 -prefer-non-pic try to building non-PIC objects only
5189 -static always build a \`.o' file suitable for static linking
5191 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
5192 from the given SOURCEFILE.
5194 The output file name is determined by removing the directory component from
5195 SOURCEFILE, then substituting the C source code suffix \`.c' with the
5196 library object suffix, \`.lo'."
5201 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
5203 Automatically set library path, then run a program.
5205 This mode accepts the following additional options:
5207 -dlopen FILE add the directory containing FILE to the library path
5209 This mode sets the library path environment variable according to \`-dlopen'
5212 If any of the ARGS are libtool executable wrappers, then they are translated
5213 into their corresponding uninstalled binary, and any of their required library
5214 directories are added to the library path.
5216 Then, COMMAND is executed, with ARGS as arguments."
5221 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
5223 Complete the installation of libtool libraries.
5225 Each LIBDIR is a directory that contains libtool libraries.
5227 The commands that this mode executes may require superuser privileges. Use
5228 the \`--dry-run' option if you just want to see what would be executed."
5233 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
5235 Install executables or libraries.
5237 INSTALL-COMMAND is the installation command. The first component should be
5238 either the \`install' or \`cp' program.
5240 The rest of the components are interpreted as arguments to that command (only
5241 BSD-compatible install options are recognized)."
5246 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
5248 Link object files or libraries together to form another library, or to
5249 create an executable program.
5251 LINK-COMMAND is a command using the C compiler that you would use to create
5252 a program from several object files.
5254 The following components of LINK-COMMAND are treated specially:
5256 -all-static do not do any dynamic linking at all
5257 -avoid-version do not add a version suffix if possible
5258 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
5259 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
5260 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
5261 -export-symbols SYMFILE
5262 try to export only the symbols listed in SYMFILE
5263 -export-symbols-regex REGEX
5264 try to export only the symbols matching REGEX
5265 -LLIBDIR search LIBDIR for required installed libraries
5266 -lNAME OUTPUT-FILE requires the installed library libNAME
5267 -module build a library that can dlopened
5268 -no-fast-install disable the fast-install mode
5269 -no-install link a not-installable executable
5270 -no-undefined declare that a library does not refer to external symbols
5271 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
5272 -release RELEASE specify package release information
5273 -rpath LIBDIR the created library will eventually be installed in LIBDIR
5274 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
5275 -static do not do any dynamic linking of libtool libraries
5276 -version-info CURRENT[:REVISION[:AGE]]
5277 specify library version info [each variable defaults to 0]
5279 All other options (arguments beginning with \`-') are ignored.
5281 Every other argument is treated as a filename. Files ending in \`.la' are
5282 treated as uninstalled libtool libraries, other files are standard or library
5285 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
5286 only library objects (\`.lo' files) may be specified, and \`-rpath' is
5287 required, except when creating a convenience library.
5289 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
5290 using \`ar' and \`ranlib', or on Windows using \`lib'.
5292 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
5293 is created, otherwise an executable program is created."
5298 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
5300 Remove libraries from an installation directory.
5302 RM is the name of the program to use to delete files associated with each FILE
5303 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5306 If FILE is a libtool library, all the files associated with it are deleted.
5307 Otherwise, only FILE itself is deleted using RM."
5311 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5318 $echo "Try \`$modename --help' for more information about other modes."
5326 # ### BEGIN LIBTOOL TAG CONFIG: CXX
5328 # Libtool was configured on host dhcppc0:
5330 # Shell to use when invoking shell scripts.
5333 # Whether or not to build shared libraries.
5334 build_libtool_libs=yes
5336 # Whether or not to build static libraries.
5339 # Whether or not to add -lc for building shared libraries.
5340 build_libtool_need_lc=no
5342 # Whether or not to disallow shared libs when runtime libs are static
5343 allow_libtool_libs_with_static_runtimes=no
5345 # Whether or not to optimize for fast installation.
5350 host=i686-pc-linux-gnu
5352 # An echo program that does not interpret backslashes.
5362 # A language-specific compiler.
5365 # Is the compiler the GNU C compiler?
5371 # The linker used to build libraries.
5374 # Whether we need hard or soft links.
5377 # A BSD-compatible nm program.
5378 NM="/usr//bin/nm -B"
5380 # A symbol stripping program
5383 # Used to examine libraries when file_magic_cmd begins "file"
5386 # Used on cygwin: DLL creation program.
5389 # Used on cygwin: object dumper.
5392 # Used on cygwin: assembler.
5395 # The name of the directory that contains temporary libtool files.
5398 # How to create reloadable object files.
5400 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
5402 # How to pass a linker flag through the compiler.
5405 # Object file suffix (normally "o").
5408 # Old archive suffix (normally "a").
5411 # Shared library suffix (normally ".so").
5414 # Executable file suffix (normally "").
5417 # Additional compiler flags for building library objects.
5418 pic_flag=" -fPIC -DPIC"
5421 # What is the maximum length of a command?
5424 # Does compiler simultaneously support -c and -o options?
5427 # Must we lock files when doing compilation ?
5430 # Do we need the lib prefix for modules?
5433 # Do we need a version for libraries?
5436 # Whether dlopen is supported.
5437 dlopen_support=unknown
5439 # Whether dlopen of programs is supported.
5442 # Whether dlopen of statically linked programs is supported.
5443 dlopen_self_static=unknown
5445 # Compiler flag to prevent dynamic linking.
5446 link_static_flag="-static"
5448 # Compiler flag to turn off builtin functions.
5449 no_builtin_flag=" -fno-builtin"
5451 # Compiler flag to allow reflexive dlopens.
5452 export_dynamic_flag_spec="\${wl}--export-dynamic"
5454 # Compiler flag to generate shared objects directly from archives.
5455 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
5457 # Compiler flag to generate thread-safe objects.
5458 thread_safe_flag_spec=""
5460 # Library versioning type.
5463 # Format of library name prefix.
5464 libname_spec="lib\$name"
5466 # List of archive names. First name is the real one, the rest are links.
5467 # The last name is the one that the linker finds with -lNAME.
5468 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
5470 # The coded name of the library, if different from the real name.
5471 soname_spec="\${libname}\${release}\${shared_ext}\$major"
5473 # Commands used to build and install an old-style archive.
5475 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
5476 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
5477 old_postuninstall_cmds=""
5479 # Create an old-style archive from a shared archive.
5480 old_archive_from_new_cmds=""
5482 # Create a temporary old-style archive to link instead of a shared archive.
5483 old_archive_from_expsyms_cmds=""
5485 # Commands used to build and install a shared archive.
5486 archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
5487 archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
5489 postuninstall_cmds=""
5491 # Commands used to build a loadable module (assumed same as above if empty)
5493 module_expsym_cmds=""
5495 # Commands to strip libraries.
5496 old_striplib="strip --strip-debug"
5497 striplib="strip --strip-unneeded"
5499 # Dependencies to place before the objects being linked to create a
5501 predep_objects="/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/../../../crti.o /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/crtbeginS.o"
5503 # Dependencies to place after the objects being linked to create a
5505 postdep_objects="/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/crtendS.o /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/../../../crtn.o"
5507 # Dependencies to place before the objects being linked to create a
5511 # Dependencies to place after the objects being linked to create a
5513 postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
5515 # The library search path used internally by the compiler when linking
5517 compiler_lib_search_path="-L/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1 -L/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1 -L/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/../../.."
5519 # Method to check whether dependent libraries are shared objects.
5520 deplibs_check_method="pass_all"
5522 # Command to use when deplibs_check_method == file_magic.
5523 file_magic_cmd="\$MAGIC_CMD"
5525 # Flag that allows shared libraries with undefined symbols to be built.
5526 allow_undefined_flag=""
5528 # Flag that forces no undefined symbols.
5529 no_undefined_flag=""
5531 # Commands used to finish a libtool library installation in a directory.
5532 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
5534 # Same as above, but a single script fragment to be evaled but not shown.
5537 # Take the output of nm and produce a listing of raw symbols and C names.
5538 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
5540 # Transform the output of nm in a proper C declaration
5541 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
5543 # Transform the output of nm in a C name address pair
5544 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
5546 # This is the shared library runtime path variable.
5547 runpath_var=LD_RUN_PATH
5549 # This is the shared library path variable.
5550 shlibpath_var=LD_LIBRARY_PATH
5552 # Is shlibpath searched before the hard-coded library search path?
5553 shlibpath_overrides_runpath=no
5555 # How to hardcode a shared library path into an executable.
5556 hardcode_action=immediate
5558 # Whether we should hardcode library paths into libraries.
5559 hardcode_into_libs=yes
5561 # Flag to hardcode $libdir into a binary during linking.
5562 # This must work even if $libdir does not exist.
5563 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
5565 # If ld is used when linking, flag to hardcode $libdir into
5566 # a binary during linking. This must work even if $libdir does
5568 hardcode_libdir_flag_spec_ld=""
5570 # Whether we need a single -rpath flag with a separated argument.
5571 hardcode_libdir_separator=""
5573 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
5577 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5581 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5582 # the resulting binary.
5583 hardcode_shlibpath_var=
5585 # Set to yes if building a shared library automatically hardcodes DIR into the library
5586 # and all subsequent libraries and executables linked against it.
5587 hardcode_automatic=no
5589 # Variables whose values should be saved in libtool wrapper scripts and
5590 # restored at relink time.
5591 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5593 # Whether libtool must link a program against all its dependency libraries.
5594 link_all_deplibs=unknown
5596 # Compile-time system search path for libraries
5597 sys_lib_search_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/local/lib include ld.so.conf.d/*.conf /lib /opt/lib /usr/lib /usr/lib/qt3/lib /usr/lib/wine /usr/local/lib /usr/X11R6/lib "
5599 # Run-time system search path for libraries
5600 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib include ld.so.conf.d/*.conf /lib /opt/lib /usr/lib /usr/lib/qt3/lib /usr/lib/wine /usr/local/lib /usr/X11R6/lib "
5602 # Fix the shell variable $srcfile for the compiler.
5605 # Set to yes if exported symbols are required.
5606 always_export_symbols=no
5608 # The commands to list exported symbols.
5609 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
5611 # The commands to extract the exported symbol list from a shared archive.
5612 extract_expsyms_cmds=""
5614 # Symbols that should not be listed in the preloaded symbols.
5617 # Symbols that must always be exported.
5620 # ### END LIBTOOL TAG CONFIG: CXX
5622 # ### BEGIN LIBTOOL TAG CONFIG: F77
5624 # Libtool was configured on host dhcppc0:
5626 # Shell to use when invoking shell scripts.
5629 # Whether or not to build shared libraries.
5630 build_libtool_libs=yes
5632 # Whether or not to build static libraries.
5635 # Whether or not to add -lc for building shared libraries.
5636 build_libtool_need_lc=no
5638 # Whether or not to disallow shared libs when runtime libs are static
5639 allow_libtool_libs_with_static_runtimes=no
5641 # Whether or not to optimize for fast installation.
5646 host=i686-pc-linux-gnu
5648 # An echo program that does not interpret backslashes.
5658 # A language-specific compiler.
5661 # Is the compiler the GNU C compiler?
5667 # The linker used to build libraries.
5670 # Whether we need hard or soft links.
5673 # A BSD-compatible nm program.
5674 NM="/usr//bin/nm -B"
5676 # A symbol stripping program
5679 # Used to examine libraries when file_magic_cmd begins "file"
5682 # Used on cygwin: DLL creation program.
5685 # Used on cygwin: object dumper.
5688 # Used on cygwin: assembler.
5691 # The name of the directory that contains temporary libtool files.
5694 # How to create reloadable object files.
5696 reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
5698 # How to pass a linker flag through the compiler.
5701 # Object file suffix (normally "o").
5704 # Old archive suffix (normally "a").
5707 # Shared library suffix (normally ".so").
5710 # Executable file suffix (normally "").
5713 # Additional compiler flags for building library objects.
5717 # What is the maximum length of a command?
5720 # Does compiler simultaneously support -c and -o options?
5723 # Must we lock files when doing compilation ?
5726 # Do we need the lib prefix for modules?
5729 # Do we need a version for libraries?
5732 # Whether dlopen is supported.
5733 dlopen_support=unknown
5735 # Whether dlopen of programs is supported.
5738 # Whether dlopen of statically linked programs is supported.
5739 dlopen_self_static=unknown
5741 # Compiler flag to prevent dynamic linking.
5742 link_static_flag="-static"
5744 # Compiler flag to turn off builtin functions.
5747 # Compiler flag to allow reflexive dlopens.
5748 export_dynamic_flag_spec="\${wl}--export-dynamic"
5750 # Compiler flag to generate shared objects directly from archives.
5751 whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
5753 # Compiler flag to generate thread-safe objects.
5754 thread_safe_flag_spec=""
5756 # Library versioning type.
5759 # Format of library name prefix.
5760 libname_spec="lib\$name"
5762 # List of archive names. First name is the real one, the rest are links.
5763 # The last name is the one that the linker finds with -lNAME.
5764 library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
5766 # The coded name of the library, if different from the real name.
5767 soname_spec="\${libname}\${release}\${shared_ext}\$major"
5769 # Commands used to build and install an old-style archive.
5771 old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
5772 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
5773 old_postuninstall_cmds=""
5775 # Create an old-style archive from a shared archive.
5776 old_archive_from_new_cmds=""
5778 # Create a temporary old-style archive to link instead of a shared archive.
5779 old_archive_from_expsyms_cmds=""
5781 # Commands used to build and install a shared archive.
5782 archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
5783 archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
5784 cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
5785 \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
5786 \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
5788 postuninstall_cmds=""
5790 # Commands used to build a loadable module (assumed same as above if empty)
5792 module_expsym_cmds=""
5794 # Commands to strip libraries.
5795 old_striplib="strip --strip-debug"
5796 striplib="strip --strip-unneeded"
5798 # Dependencies to place before the objects being linked to create a
5802 # Dependencies to place after the objects being linked to create a
5806 # Dependencies to place before the objects being linked to create a
5810 # Dependencies to place after the objects being linked to create a
5814 # The library search path used internally by the compiler when linking
5816 compiler_lib_search_path=""
5818 # Method to check whether dependent libraries are shared objects.
5819 deplibs_check_method="pass_all"
5821 # Command to use when deplibs_check_method == file_magic.
5822 file_magic_cmd="\$MAGIC_CMD"
5824 # Flag that allows shared libraries with undefined symbols to be built.
5825 allow_undefined_flag=""
5827 # Flag that forces no undefined symbols.
5828 no_undefined_flag=""
5830 # Commands used to finish a libtool library installation in a directory.
5831 finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
5833 # Same as above, but a single script fragment to be evaled but not shown.
5836 # Take the output of nm and produce a listing of raw symbols and C names.
5837 global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
5839 # Transform the output of nm in a proper C declaration
5840 global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
5842 # Transform the output of nm in a C name address pair
5843 global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
5845 # This is the shared library runtime path variable.
5846 runpath_var=LD_RUN_PATH
5848 # This is the shared library path variable.
5849 shlibpath_var=LD_LIBRARY_PATH
5851 # Is shlibpath searched before the hard-coded library search path?
5852 shlibpath_overrides_runpath=no
5854 # How to hardcode a shared library path into an executable.
5855 hardcode_action=immediate
5857 # Whether we should hardcode library paths into libraries.
5858 hardcode_into_libs=yes
5860 # Flag to hardcode $libdir into a binary during linking.
5861 # This must work even if $libdir does not exist.
5862 hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
5864 # If ld is used when linking, flag to hardcode $libdir into
5865 # a binary during linking. This must work even if $libdir does
5867 hardcode_libdir_flag_spec_ld=""
5869 # Whether we need a single -rpath flag with a separated argument.
5870 hardcode_libdir_separator=""
5872 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
5876 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5880 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5881 # the resulting binary.
5882 hardcode_shlibpath_var=unsupported
5884 # Set to yes if building a shared library automatically hardcodes DIR into the library
5885 # and all subsequent libraries and executables linked against it.
5886 hardcode_automatic=no
5888 # Variables whose values should be saved in libtool wrapper scripts and
5889 # restored at relink time.
5890 variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5892 # Whether libtool must link a program against all its dependency libraries.
5893 link_all_deplibs=unknown
5895 # Compile-time system search path for libraries
5896 sys_lib_search_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/local/lib include ld.so.conf.d/*.conf /lib /opt/lib /usr/lib /usr/lib/qt3/lib /usr/lib/wine /usr/local/lib /usr/X11R6/lib "
5898 # Run-time system search path for libraries
5899 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib include ld.so.conf.d/*.conf /lib /opt/lib /usr/lib /usr/lib/qt3/lib /usr/lib/wine /usr/local/lib /usr/X11R6/lib "
5901 # Fix the shell variable $srcfile for the compiler.
5904 # Set to yes if exported symbols are required.
5905 always_export_symbols=no
5907 # The commands to list exported symbols.
5908 export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
5910 # The commands to extract the exported symbol list from a shared archive.
5911 extract_expsyms_cmds=""
5913 # Symbols that should not be listed in the preloaded symbols.
5914 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5916 # Symbols that must always be exported.
5919 # ### END LIBTOOL TAG CONFIG: F77