3 # libtoolT - Provide generalized library-building support services.
4 # Generated automatically by (GNU kgraphinterface 0.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
32 # A sed program that does not truncate output.
35 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
36 Xsed
="/bin/sed -e 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.
45 # ### BEGIN LIBTOOL CONFIG
47 # Libtool was configured on host yannick:
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.
158 # Whether dlopen of programs is supported.
161 # Whether dlopen of statically linked programs is supported.
162 dlopen_self_static
=yes
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 \$compiler_flags \$libobjs \$deplibs \${wl}-soname \$wl\$soname -o \$lib"
206 archive_expsym_cmds
="\$CC -shared \$compiler_flags \$libobjs \$deplibs \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
208 postuninstall_cmds
=""
210 # Commands used to build a loadable module (assumed same as above if empty)
212 module_expsym_cmds
=""
214 # Commands to strip libraries.
215 old_striplib
="strip --strip-debug"
216 striplib
="strip --strip-unneeded"
218 # Dependencies to place before the objects being linked to create a
222 # Dependencies to place after the objects being linked to create a
226 # Dependencies to place before the objects being linked to create a
230 # Dependencies to place after the objects being linked to create a
234 # The library search path used internally by the compiler when linking
236 compiler_lib_search_path
=""
238 # Method to check whether dependent libraries are shared objects.
239 deplibs_check_method
="pass_all"
241 # Command to use when deplibs_check_method == file_magic.
242 file_magic_cmd
="\$MAGIC_CMD"
244 # Flag that allows shared libraries with undefined symbols to be built.
245 allow_undefined_flag
=""
247 # Flag that forces no undefined symbols.
250 # Commands used to finish a libtool library installation in a directory.
251 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
253 # Same as above, but a single script fragment to be evaled but not shown.
256 # Take the output of nm and produce a listing of raw symbols and C names.
257 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGISTW][ABCDGISTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
259 # Transform the output of nm in a proper C declaration
260 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
262 # Transform the output of nm in a C name address pair
263 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
265 # This is the shared library runtime path variable.
266 runpath_var
=LD_RUN_PATH
268 # This is the shared library path variable.
269 shlibpath_var
=LD_LIBRARY_PATH
271 # Is shlibpath searched before the hard-coded library search path?
272 shlibpath_overrides_runpath
=no
274 # How to hardcode a shared library path into an executable.
275 hardcode_action
=immediate
277 # Whether we should hardcode library paths into libraries.
278 hardcode_into_libs
=yes
280 # Flag to hardcode $libdir into a binary during linking.
281 # This must work even if $libdir does not exist.
282 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
284 # If ld is used when linking, flag to hardcode $libdir into
285 # a binary during linking. This must work even if $libdir does
287 hardcode_libdir_flag_spec_ld
=""
289 # Whether we need a single -rpath flag with a separated argument.
290 hardcode_libdir_separator
=""
292 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
296 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
300 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
301 # the resulting binary.
302 hardcode_shlibpath_var
=unsupported
304 # Set to yes if building a shared library automatically hardcodes DIR into the library
305 # and all subsequent libraries and executables linked against it.
306 hardcode_automatic
=no
308 # Variables whose values should be saved in libtool wrapper scripts and
309 # restored at relink time.
310 variables_saved_for_relink
="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
312 # Whether libtool must link a program against all its dependency libraries.
313 link_all_deplibs
=unknown
315 # Compile-time system search path for libraries
316 sys_lib_search_path_spec
="/lib /usr/lib /usr/local/lib"
318 # Run-time system search path for libraries
319 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
321 # Fix the shell variable $srcfile for the compiler.
324 # Set to yes if exported symbols are required.
325 always_export_symbols
=no
327 # The commands to list exported symbols.
328 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
330 # The commands to extract the exported symbol list from a shared archive.
331 extract_expsyms_cmds
=""
333 # Symbols that should not be listed in the preloaded symbols.
334 exclude_expsyms
="_GLOBAL_OFFSET_TABLE_"
336 # Symbols that must always be exported.
339 # ### END LIBTOOL CONFIG
341 # ltmain.sh - Provide generalized library-building support services.
342 # NOTE: Changing this file will not affect anything until you rerun configure.
344 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
345 # Free Software Foundation, Inc.
346 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
348 # This program is free software; you can redistribute it and/or modify
349 # it under the terms of the GNU General Public License as published by
350 # the Free Software Foundation; either version 2 of the License, or
351 # (at your option) any later version.
353 # This program is distributed in the hope that it will be useful, but
354 # WITHOUT ANY WARRANTY; without even the implied warranty of
355 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
356 # General Public License for more details.
358 # You should have received a copy of the GNU General Public License
359 # along with this program; if not, write to the Free Software
360 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
362 # As a special exception to the GNU General Public License, if you
363 # distribute this file as part of a program that contains a
364 # configuration script generated by Autoconf, you may include it under
365 # the same distribution terms that you use for the rest of that program.
367 # Check that we have a working $echo.
368 if test "X$1" = X--no-reexec
; then
369 # Discard the --no-reexec flag, and continue.
371 elif test "X$1" = X--fallback-echo
; then
372 # Avoid inline document here, it may be left over
374 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
375 # Yippee, $echo works!
378 # Restart under the correct shell, and then maybe $echo will work.
379 exec $SHELL "$0" --no-reexec ${1+"$@"}
382 if test "X$1" = X--fallback-echo
; then
383 # used as fallback echo
391 # The name of this program.
392 progname
=`$echo "$0" | ${SED} 's%^.*/%%'`
399 TIMESTAMP
=" (1.1240 2003/06/26 06:55:19)"
402 help="Try \`$progname --help' for more information."
403 magic
="%%%MAGIC variable%%%"
408 # Sed substitution that helps us do robust quoting. It backslashifies
409 # metacharacters that are still active within double-quoted strings.
410 Xsed
="${SED}"' -e 1s/^X//'
411 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
412 # test EBCDIC or ASCII
413 case `echo A|tr A '\301'` in
414 A
) # EBCDIC based system
415 SP2NL
="tr '\100' '\n'"
416 NL2SP
="tr '\r\n' '\100\100'"
418 *) # Assume ASCII based system
419 SP2NL
="tr '\040' '\012'"
420 NL2SP
="tr '\015\012' '\040\040'"
425 # Only set LANG and LC_ALL to C if already set.
426 # These must not be set unconditionally because not all systems understand
427 # e.g. LANG=C (notably SCO).
428 # We save the old values to restore during execute mode.
429 if test "${LC_ALL+set}" = set; then
430 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
432 if test "${LANG+set}" = set; then
433 save_LANG
="$LANG"; LANG
=C
; export LANG
436 # Make sure IFS has a sensible default
439 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
440 $echo "$modename: not configured to build any kind of library" 1>&2
441 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
454 lo2o
="s/\\.lo\$/.${objext}/"
455 o2lo
="s/\\.${objext}\$/.lo/"
457 #####################################
458 # Shell function definitions:
459 # This seems to be the best place for them
461 # Need a lot of goo to handle *both* DLLs and import libs
462 # Has to be a shell function in order to 'eat' the argument
463 # that is supplied when $file_magic_command is called.
465 win32_libid_type
="unknown"
466 win32_fileres
=`file -L $1 2>/dev/null`
467 case $win32_fileres in
468 *ar\ archive\ import\ library
*) # definitely import
469 win32_libid_type
="x86 archive import"
471 *ar\ archive
*) # could be an import, or static
472 if eval $OBJDUMP -f $1 |
$SED -e '10q' 2>/dev
/null | \
473 grep -E 'file format pe-i386(.*architecture: i386)?' >/dev
/null
; then
474 win32_nmres
=`eval $NM -f posix -A $1 | \
475 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
476 if test "X$win32_nmres" = "Ximport" ; then
477 win32_libid_type
="x86 archive import"
479 win32_libid_type
="x86 archive static"
484 win32_libid_type
="x86 DLL"
486 *executable
*) # but shell scripts are "executable" too...
487 case $win32_fileres in
488 *MS\ Windows\ PE\ Intel
*)
489 win32_libid_type
="x86 DLL"
494 $echo $win32_libid_type
497 # End of Shell function definitions
498 #####################################
500 # Parse our command line options once, thoroughly.
501 while test "$#" -gt 0
507 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
511 # If the previous option needs an argument, assign it.
512 if test -n "$prev"; then
515 execute_dlfiles
="$execute_dlfiles $arg"
520 # Check whether tagname contains only valid characters
523 $echo "$progname: invalid tag name: $tagname" 1>&2
530 # Don't test for the "default" C tag, as we know, it's there, but
531 # not specially marked.
534 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev
/null
; then
535 taglist
="$taglist $tagname"
536 # Evaluate the configuration.
537 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
539 $echo "$progname: ignoring unknown tag $tagname" 1>&2
554 # Have we seen a non-optional argument yet?
561 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
563 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
564 $echo "This is free software; see the source for copying conditions. There is NO"
565 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
570 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
571 # Now print the configurations for the tags.
572 for tagname
in $taglist; do
573 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
579 $echo "$progname: enabling shell trace mode"
589 if test "$build_libtool_libs" = yes; then
590 $echo "enable shared libraries"
592 $echo "disable shared libraries"
594 if test "$build_old_libs" = yes; then
595 $echo "enable static libraries"
597 $echo "disable static libraries"
602 --finish) mode
="finish" ;;
604 --mode) prevopt
="--mode" prev
=mode
;;
605 --mode=*) mode
="$optarg" ;;
607 --preserve-dup-deps) duplicate_deps
="yes" ;;
613 --tag) prevopt
="--tag" prev
=tag
;;
615 set tag
"$optarg" ${1+"$@"}
626 $echo "$modename: unrecognized option \`$arg'" 1>&2
638 if test -n "$prevopt"; then
639 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
644 # If this variable is set in any of the actions, the command in it
645 # will be execed at the end. This prevents here-documents from being
646 # left over by shells.
649 if test -z "$show_help"; then
651 # Infer the operation mode.
652 if test -z "$mode"; then
653 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
654 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
656 *cc | cc
* |
*++ | gcc
* |
*-gcc* | g
++* | xlc
*)
668 *db |
*dbx |
*strace |
*truss
)
678 # If we have no mode, but dlfiles were specified, then do execute mode.
679 test -n "$execute_dlfiles" && mode
=execute
681 # Just use the default operation mode.
682 if test -z "$mode"; then
683 if test -n "$nonopt"; then
684 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
686 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
693 # Only execute mode is allowed to have -dlopen flags.
694 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
695 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
700 # Change the help message to a mode-specific one.
702 help="Try \`$modename --help --mode=$mode' for more information."
704 # These modes are in order of execution frequency so that they run quickly.
706 # libtool compile mode
708 modename
="$modename: compile"
709 # Get the compilation command and the source file.
711 srcfile
="$nonopt" # always keep a non-empty value in "srcfile"
720 # do not "continue". Instead, add this to base_compile
732 # Accept any command-line options.
735 if test -n "$libobj" ; then
736 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
759 arg_mode
=arg
# the next one goes into the "base_compile" arg list
760 continue # The current "srcfile" will either be retained or
761 ;; # replaced later. I would guess that would be a bug.
764 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
766 save_ifs
="$IFS"; IFS
=','
770 # Double-quote args containing other shell metacharacters.
771 # Many Bourne shells cannot handle close brackets correctly
772 # in scan sets, so we specify it separately.
774 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
778 lastarg
="$lastarg $arg"
781 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
783 # Add the arguments to base_compile.
784 base_compile
="$base_compile $lastarg"
789 # Accept the current argument as the source file.
790 # The previous "srcfile" becomes the current argument.
797 esac # case $arg_mode
799 # Aesthetically quote the previous argument.
800 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
803 # Double-quote args containing other shell metacharacters.
804 # Many Bourne shells cannot handle close brackets correctly
805 # in scan sets, so we specify it separately.
806 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
807 lastarg
="\"$lastarg\""
811 base_compile
="$base_compile $lastarg"
816 $echo "$modename: you must specify an argument for -Xcompile"
820 $echo "$modename: you must specify a target with \`-o'" 1>&2
824 # Get the name of the library object.
825 [ -z "$libobj" ] && libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
829 # Recognize several different file suffixes.
830 # If the user specifies -o file.o, it is replaced with file.lo
840 *.class
) xform
=class
;;
845 *.java
) xform
=java
;;
848 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
851 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
853 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
858 # Infer tagged configuration to use if any are available and
859 # if one wasn't chosen via the "--tag" command line option.
860 # Only attempt this if the compiler in the base compile
861 # command doesn't match the default compiler.
862 if test -n "$available_tags" && test -z "$tagname"; then
863 case $base_compile in
864 # Blanks in the command may have been stripped by the calling shell,
865 # but not from the CC environment variable when configure was run.
866 " $CC "* |
"$CC "* |
" `$echo $CC` "* |
"`$echo $CC` "*) ;;
867 # Blanks at the start of $base_compile will cause this to fail
868 # if we don't check for them as well.
870 for z
in $available_tags; do
871 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
872 # Evaluate the configuration.
873 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
874 case "$base_compile " in
875 "$CC "* |
" $CC "* |
"`$echo $CC` "* |
" `$echo $CC` "*)
876 # The compiler in the base compile command matches
877 # the one in the tagged configuration.
878 # Assume this is the tagged configuration we want.
885 # If $tagname still isn't set, then no tagged configuration
886 # was found and let the user know that the "--tag" command
887 # line option must be used.
888 if test -z "$tagname"; then
889 $echo "$modename: unable to infer tagged configuration"
890 $echo "$modename: specify a tag with \`--tag'" 1>&2
893 # $echo "$modename: using $tagname tagged configuration"
899 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
900 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
901 if test "X$xdir" = "X$obj"; then
906 lobj
=${xdir}$objdir/$objname
908 if test -z "$base_compile"; then
909 $echo "$modename: you must specify a compilation command" 1>&2
914 # Delete any leftover library objects.
915 if test "$build_old_libs" = yes; then
916 removelist
="$obj $lobj $libobj ${libobj}T"
918 removelist
="$lobj $libobj ${libobj}T"
922 trap "$run $rm $removelist; exit 1" 1 2 15
924 # On Cygwin there's no "real" PIC flag so we must build both object types
926 cygwin
* | mingw
* | pw32
* | os2
*)
930 if test "$pic_mode" = no
&& test "$deplibs_check_method" != pass_all
; then
931 # non-PIC code in shared libraries is not supported
935 # Calculate the filename of the output object if compiler does
936 # not support -o with -c
937 if test "$compiler_c_o" = no
; then
938 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
939 lockfile
="$output_obj.lock"
940 removelist
="$removelist $output_obj $lockfile"
941 trap "$run $rm $removelist; exit 1" 1 2 15
948 # Lock this critical section if it is needed
949 # We use this script file to make the link, it avoids creating a new file
950 if test "$need_locks" = yes; then
951 until $run ln "$0" "$lockfile" 2>/dev
/null
; do
952 $show "Waiting for $lockfile to be removed"
955 elif test "$need_locks" = warn
; then
956 if test -f "$lockfile"; then
958 *** ERROR, $lockfile exists and contains:
959 `cat $lockfile 2>/dev/null`
961 This indicates that another process is trying to use the same
962 temporary object file, and libtool could not work around it because
963 your compiler does not support \`-c' and \`-o' together. If you
964 repeat this compilation, it may succeed, by chance, but you had better
965 avoid parallel builds (make -j) in this platform, or get a better
971 $echo $srcfile > "$lockfile"
974 if test -n "$fix_srcfile_path"; then
975 eval srcfile
=\"$fix_srcfile_path\"
978 $run $rm "$libobj" "${libobj}T"
980 # Create a libtool object file (analogous to a ".la" file),
981 # but don't create it if we're doing a dry run.
982 test -z "$run" && cat > ${libobj}T
<<EOF
983 # $libobj - a libtool object file
984 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
986 # Please DO NOT delete this file!
987 # It is necessary for linking the library.
989 # Name of the PIC object.
992 # Only build a PIC object if we are building libtool libraries.
993 if test "$build_libtool_libs" = yes; then
994 # Without this assignment, base_compile gets emptied.
995 fbsd_hideous_sh_bug
=$base_compile
997 if test "$pic_mode" != no
; then
998 command="$base_compile $srcfile $pic_flag"
1000 # Don't build PIC code
1001 command="$base_compile $srcfile"
1004 if test ! -d "${xdir}$objdir"; then
1005 $show "$mkdir ${xdir}$objdir"
1006 $run $mkdir ${xdir}$objdir
1008 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1013 if test -z "$output_obj"; then
1014 # Place PIC objects in $objdir
1015 command="$command -o $lobj"
1018 $run $rm "$lobj" "$output_obj"
1021 if $run eval "$command"; then :
1023 test -n "$output_obj" && $run $rm $removelist
1027 if test "$need_locks" = warn
&&
1028 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1030 *** ERROR, $lockfile contains:
1031 `cat $lockfile 2>/dev/null`
1033 but it should contain:
1036 This indicates that another process is trying to use the same
1037 temporary object file, and libtool could not work around it because
1038 your compiler does not support \`-c' and \`-o' together. If you
1039 repeat this compilation, it may succeed, by chance, but you had better
1040 avoid parallel builds (make -j) in this platform, or get a better
1043 $run $rm $removelist
1047 # Just move the object if needed, then go on to compile the next one
1048 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1049 $show "$mv $output_obj $lobj"
1050 if $run $mv $output_obj $lobj; then :
1053 $run $rm $removelist
1058 # Append the name of the PIC object to the libtool object file.
1059 test -z "$run" && cat >> ${libobj}T
<<EOF
1060 pic_object='$objdir/$objname'
1064 # Allow error messages only from the first compilation.
1065 suppress_output
=' >/dev/null 2>&1'
1067 # No PIC object so indicate it doesn't exist in the libtool
1069 test -z "$run" && cat >> ${libobj}T
<<EOF
1075 # Only build a position-dependent object if we build old libraries.
1076 if test "$build_old_libs" = yes; then
1077 if test "$pic_mode" != yes; then
1078 # Don't build PIC code
1079 command="$base_compile $srcfile"
1081 command="$base_compile $srcfile $pic_flag"
1083 if test "$compiler_c_o" = yes; then
1084 command="$command -o $obj"
1087 # Suppress compiler output if we already did a PIC compilation.
1088 command="$command$suppress_output"
1089 $run $rm "$obj" "$output_obj"
1091 if $run eval "$command"; then :
1093 $run $rm $removelist
1097 if test "$need_locks" = warn
&&
1098 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1100 *** ERROR, $lockfile contains:
1101 `cat $lockfile 2>/dev/null`
1103 but it should contain:
1106 This indicates that another process is trying to use the same
1107 temporary object file, and libtool could not work around it because
1108 your compiler does not support \`-c' and \`-o' together. If you
1109 repeat this compilation, it may succeed, by chance, but you had better
1110 avoid parallel builds (make -j) in this platform, or get a better
1113 $run $rm $removelist
1117 # Just move the object if needed
1118 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1119 $show "$mv $output_obj $obj"
1120 if $run $mv $output_obj $obj; then :
1123 $run $rm $removelist
1128 # Append the name of the non-PIC object the libtool object file.
1129 # Only append if the libtool object file exists.
1130 test -z "$run" && cat >> ${libobj}T
<<EOF
1131 # Name of the non-PIC object.
1132 non_pic_object='$objname'
1136 # Append the name of the non-PIC object the libtool object file.
1137 # Only append if the libtool object file exists.
1138 test -z "$run" && cat >> ${libobj}T
<<EOF
1139 # Name of the non-PIC object.
1145 $run $mv "${libobj}T" "${libobj}"
1147 # Unlock the critical section if it was locked
1148 if test "$need_locks" != no
; then
1149 $run $rm "$lockfile"
1157 modename
="$modename: link"
1159 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1160 # It is impossible to link a dll without this setting, and
1161 # we shouldn't force the makefile maintainer to figure out
1162 # which system we are compiling for in order to pass an extra
1163 # flag for every libtool invocation.
1164 # allow_undefined=no
1166 # FIXME: Unfortunately, there are problems with the above when trying
1167 # to make a dll which has undefined symbols, in which case not
1168 # even a static library is built. For now, we need to specify
1169 # -no-undefined on the libtool link line when we can be certain
1170 # that all symbols are satisfied, otherwise we get a static library.
1177 libtool_args
="$nonopt"
1178 base_compile
="$nonopt"
1179 compile_command
="$nonopt"
1180 finalize_command
="$nonopt"
1194 lib_search_path
=`pwd`
1203 export_symbols_regex
=
1211 prefer_static_libs
=no
1224 # We need to know -static, to get the right output filenames.
1228 -all-static |
-static)
1229 if test "X$arg" = "X-all-static"; then
1230 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1231 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1233 if test -n "$link_static_flag"; then
1234 dlopen_self
=$dlopen_self_static
1237 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1238 dlopen_self
=$dlopen_self_static
1241 build_libtool_libs
=no
1243 prefer_static_libs
=yes
1249 # See if our shared archives depend on static archives.
1250 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
1252 # Go through the arguments, transforming them on the way.
1253 while test "$#" -gt 0; do
1255 base_compile
="$base_compile $arg"
1258 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1259 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1263 libtool_args
="$libtool_args $qarg"
1265 # If the previous option needs an argument, assign it.
1266 if test -n "$prev"; then
1269 compile_command
="$compile_command @OUTPUT@"
1270 finalize_command
="$finalize_command @OUTPUT@"
1276 if test "$preload" = no
; then
1277 # Add the symbol object into the linking commands.
1278 compile_command
="$compile_command @SYMFILE@"
1279 finalize_command
="$finalize_command @SYMFILE@"
1283 *.la |
*.lo
) ;; # We handle these cases below.
1285 if test "$dlself" = no
; then
1293 if test "$prev" = dlprefiles
; then
1295 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
1305 if test "$prev" = dlfiles
; then
1306 dlfiles
="$dlfiles $arg"
1308 dlprefiles
="$dlprefiles $arg"
1316 export_symbols
="$arg"
1317 if test ! -f "$arg"; then
1318 $echo "$modename: symbol file \`$arg' does not exist"
1325 export_symbols_regex
="$arg"
1330 inst_prefix_dir
="$arg"
1340 if test -f "$arg"; then
1343 for fil
in `cat $save_arg`
1345 # moreargs="$moreargs $fil"
1347 # A libtool-controlled object.
1349 # Check to see that this really is a libtool object.
1350 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1355 # If there is no directory component, then add one.
1357 */* |
*\\*) .
$arg ;;
1361 if test -z "$pic_object" || \
1362 test -z "$non_pic_object" ||
1363 test "$pic_object" = none
&& \
1364 test "$non_pic_object" = none
; then
1365 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1369 # Extract subdirectory from the argument.
1370 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1371 if test "X$xdir" = "X$arg"; then
1377 if test "$pic_object" != none
; then
1378 # Prepend the subdirectory the object is found in.
1379 pic_object
="$xdir$pic_object"
1381 if test "$prev" = dlfiles
; then
1382 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1383 dlfiles
="$dlfiles $pic_object"
1387 # If libtool objects are unsupported, then we need to preload.
1392 # CHECK ME: I think I busted this. -Ossama
1393 if test "$prev" = dlprefiles
; then
1394 # Preload the old-style object.
1395 dlprefiles
="$dlprefiles $pic_object"
1400 libobjs
="$libobjs $pic_object"
1405 if test "$non_pic_object" != none
; then
1406 # Prepend the subdirectory the object is found in.
1407 non_pic_object
="$xdir$non_pic_object"
1409 # A standard non-PIC object
1410 non_pic_objects
="$non_pic_objects $non_pic_object"
1411 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1412 arg
="$non_pic_object"
1416 # Only an error if not doing a dry-run.
1417 if test -z "$run"; then
1418 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1423 # Extract subdirectory from the argument.
1424 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1425 if test "X$xdir" = "X$arg"; then
1431 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1432 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1433 libobjs
="$libobjs $pic_object"
1434 non_pic_objects
="$non_pic_objects $non_pic_object"
1439 $echo "$modename: link input file \`$save_arg' does not exist"
1447 # We need an absolute path.
1449 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1451 $echo "$modename: only absolute run-paths are allowed" 1>&2
1455 if test "$prev" = rpath
; then
1458 *) rpath
="$rpath $arg" ;;
1463 *) xrpath
="$xrpath $arg" ;;
1470 compiler_flags
="$compiler_flags $qarg"
1472 compile_command
="$compile_command $qarg"
1473 finalize_command
="$finalize_command $qarg"
1477 linker_flags
="$linker_flags $qarg"
1478 compiler_flags
="$compiler_flags $wl$qarg"
1480 compile_command
="$compile_command $wl$qarg"
1481 finalize_command
="$finalize_command $wl$qarg"
1485 linker_flags
="$linker_flags $qarg"
1486 compiler_flags
="$compiler_flags $qarg"
1488 compile_command
="$compile_command $qarg"
1489 finalize_command
="$finalize_command $qarg"
1496 *" $qarg.ltframework "*) ;;
1497 *) deplibs
="$deplibs $qarg.ltframework" # this is fixed later
1506 eval "$prev=\"\$arg\""
1511 fi # test -n "$prev"
1517 if test -n "$link_static_flag"; then
1518 compile_command
="$compile_command $link_static_flag"
1519 finalize_command
="$finalize_command $link_static_flag"
1525 # FIXME: remove this flag sometime in the future.
1526 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1550 -export-symbols |
-export-symbols-regex)
1551 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1552 $echo "$modename: more than one -exported-symbols argument is not allowed"
1555 if test "X$arg" = "X-export-symbols"; then
1568 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1569 # so, if we see these flags be careful not to treat them like -L
1571 case $with_gcc/$host in
1572 no
/*-*-irix* |
/*-*-irix*)
1573 compile_command
="$compile_command $arg"
1574 finalize_command
="$finalize_command $arg"
1581 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1582 # We need an absolute path.
1584 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1586 absdir
=`cd "$dir" && pwd`
1587 if test -z "$absdir"; then
1588 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1597 deplibs
="$deplibs -L$dir"
1598 lib_search_path
="$lib_search_path $dir"
1602 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1603 case :$dllsearchpath: in
1605 *) dllsearchpath
="$dllsearchpath:$dir";;
1613 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1615 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1616 # These systems don't actually have a C or math library (as such)
1619 *-*-mingw* |
*-*-os2*)
1620 # These systems don't actually have a C library (as such)
1621 test "X$arg" = "X-lc" && continue
1623 *-*-openbsd* |
*-*-freebsd*)
1624 # Do not include libc due to us having libc/libc_r.
1625 test "X$arg" = "X-lc" && continue
1627 *-*-rhapsody* |
*-*-darwin1.
[012])
1628 # Rhapsody C and math libraries are in the System framework
1629 deplibs
="$deplibs System.ltframework"
1632 elif test "X$arg" = "X-lc_r"; then
1635 # Do not include libc_r directly, use -pthread flag.
1640 deplibs
="$deplibs $arg"
1649 # gcc -m* arguments should be passed to the linker via $compiler_flags
1650 # in order to pass architecture information to the linker
1651 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1652 # but this is not reliable with gcc because gcc may use -mfoo to
1653 # select a different linker, different libraries, etc, while
1654 # -Wl,-mfoo simply passes -mfoo to the linker.
1656 # Unknown arguments in both finalize_command and compile_command need
1657 # to be aesthetically quoted because they are evaled later.
1658 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1660 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1664 compile_command
="$compile_command $arg"
1665 finalize_command
="$finalize_command $arg"
1666 if test "$with_gcc" = "yes" ; then
1667 compiler_flags
="$compiler_flags $arg"
1684 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1685 # The PATH hackery in wrapper scripts is required on Windows
1686 # in order for the loader to find any dlls it needs.
1687 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1688 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1691 *) no_install
=yes ;;
1724 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1725 # We need an absolute path.
1727 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1729 $echo "$modename: only absolute run-paths are allowed" 1>&2
1735 *) xrpath
="$xrpath $dir" ;;
1741 # The effects of -static are defined in a previous loop.
1742 # We used to do the same as -all-static on platforms that
1743 # didn't have a PIC flag, but the assumption that the effects
1744 # would be equivalent was wrong. It would break on at least
1745 # Digital Unix and AIX.
1765 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1767 save_ifs
="$IFS"; IFS
=','
1768 for flag
in $args; do
1771 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1776 compiler_flags
="$compiler_flags $flag"
1779 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1783 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1785 save_ifs
="$IFS"; IFS
=','
1786 for flag
in $args; do
1789 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1794 compiler_flags
="$compiler_flags $wl$flag"
1795 linker_flags
="$linker_flags $flag"
1798 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1821 # Some other compiler flag.
1823 # Unknown arguments in both finalize_command and compile_command need
1824 # to be aesthetically quoted because they are evaled later.
1825 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1827 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1831 add_flags
="$add_flags $arg"
1835 # A standard object.
1840 # A libtool-controlled object.
1842 # Check to see that this really is a libtool object.
1843 if (${SED} -e '2q' $arg |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1848 # If there is no directory component, then add one.
1850 */* |
*\\*) .
$arg ;;
1854 if test -z "$pic_object" || \
1855 test -z "$non_pic_object" ||
1856 test "$pic_object" = none
&& \
1857 test "$non_pic_object" = none
; then
1858 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1862 # Extract subdirectory from the argument.
1863 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1864 if test "X$xdir" = "X$arg"; then
1870 if test "$pic_object" != none
; then
1871 # Prepend the subdirectory the object is found in.
1872 pic_object
="$xdir$pic_object"
1874 if test "$prev" = dlfiles
; then
1875 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1876 dlfiles
="$dlfiles $pic_object"
1880 # If libtool objects are unsupported, then we need to preload.
1885 # CHECK ME: I think I busted this. -Ossama
1886 if test "$prev" = dlprefiles
; then
1887 # Preload the old-style object.
1888 dlprefiles
="$dlprefiles $pic_object"
1893 libobjs
="$libobjs $pic_object"
1898 if test "$non_pic_object" != none
; then
1899 # Prepend the subdirectory the object is found in.
1900 non_pic_object
="$xdir$non_pic_object"
1902 # A standard non-PIC object
1903 non_pic_objects
="$non_pic_objects $non_pic_object"
1904 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1905 arg
="$non_pic_object"
1909 # Only an error if not doing a dry-run.
1910 if test -z "$run"; then
1911 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1916 # Extract subdirectory from the argument.
1917 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1918 if test "X$xdir" = "X$arg"; then
1924 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1925 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1926 libobjs
="$libobjs $pic_object"
1927 non_pic_objects
="$non_pic_objects $non_pic_object"
1934 deplibs
="$deplibs $arg"
1935 old_deplibs
="$old_deplibs $arg"
1940 # A libtool-controlled library.
1942 if test "$prev" = dlfiles
; then
1943 # This library was specified with -dlopen.
1944 dlfiles
="$dlfiles $arg"
1946 elif test "$prev" = dlprefiles
; then
1947 # The library was specified with -dlpreopen.
1948 dlprefiles
="$dlprefiles $arg"
1951 deplibs
="$deplibs $arg"
1956 # Some other compiler argument.
1958 # Unknown arguments in both finalize_command and compile_command need
1959 # to be aesthetically quoted because they are evaled later.
1960 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1962 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1966 add_flags
="$add_flags $arg"
1970 # Now actually substitute the argument into the commands.
1971 if test -n "$arg"; then
1972 compile_command
="$compile_command $arg"
1973 finalize_command
="$finalize_command $arg"
1975 done # argument parsing loop
1977 if test -n "$prev"; then
1978 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1983 # Infer tagged configuration to use if any are available and
1984 # if one wasn't chosen via the "--tag" command line option.
1985 # Only attempt this if the compiler in the base link
1986 # command doesn't match the default compiler.
1987 if test -n "$available_tags" && test -z "$tagname"; then
1988 case $base_compile in
1989 # Blanks in the command may have been stripped by the calling shell,
1990 # but not from the CC environment variable when configure was run.
1991 "$CC "* |
" $CC "* |
"`$echo $CC` "* |
" `$echo $CC` "*) ;;
1992 # Blanks at the start of $base_compile will cause this to fail
1993 # if we don't check for them as well.
1995 for z
in $available_tags; do
1996 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
1997 # Evaluate the configuration.
1998 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1999 case $base_compile in
2000 "$CC "* |
" $CC "* |
"`$echo $CC` "* |
" `$echo $CC` "*)
2001 # The compiler in $compile_command matches
2002 # the one in the tagged configuration.
2003 # Assume this is the tagged configuration we want.
2010 # If $tagname still isn't set, then no tagged configuration
2011 # was found and let the user know that the "--tag" command
2012 # line option must be used.
2013 if test -z "$tagname"; then
2014 $echo "$modename: unable to infer tagged configuration"
2015 $echo "$modename: specify a tag with \`--tag'" 1>&2
2018 # $echo "$modename: using $tagname tagged configuration"
2024 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2025 eval arg
=\"$export_dynamic_flag_spec\"
2026 compile_command
="$compile_command $arg"
2027 finalize_command
="$finalize_command $arg"
2031 # calculate the name of the file, without its directory
2032 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2033 libobjs_save
="$libobjs"
2035 if test -n "$shlibpath_var"; then
2036 # get the directories listed in $shlibpath_var
2037 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2041 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
2042 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
2044 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2045 if test "X$output_objdir" = "X$output"; then
2046 output_objdir
="$objdir"
2048 output_objdir
="$output_objdir/$objdir"
2050 # Create the object directory.
2051 if test ! -d "$output_objdir"; then
2052 $show "$mkdir $output_objdir"
2053 $run $mkdir $output_objdir
2055 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2060 # Determine the type of output
2063 $echo "$modename: you must specify an output file" 1>&2
2067 *.
$libext) linkmode
=oldlib
;;
2068 *.lo |
*.
$objext) linkmode
=obj
;;
2069 *.la
) linkmode
=lib
;;
2070 *) linkmode
=prog
;; # Anything else should be a program.
2074 *cygwin
* |
*mingw
* |
*pw32
*)
2075 # don't eliminate duplcations in $postdeps and $predeps
2076 duplicate_compiler_generated_deps
=yes
2079 duplicate_compiler_generated_deps
=$duplicate_deps
2085 # Find all interdependent deplibs by searching for libraries
2086 # that are linked more than once (e.g. -la -lb -la)
2087 for deplib
in $deplibs; do
2088 if test "X$duplicate_deps" = "Xyes" ; then
2090 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2093 libs
="$libs $deplib"
2096 if test "$linkmode" = lib
; then
2097 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
2099 # Compute libraries that are listed more than once in $predeps
2100 # $postdeps and mark them as special (i.e., whose duplicates are
2101 # not to be eliminated).
2103 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2104 for pre_post_dep
in $predeps $postdeps; do
2105 case "$pre_post_deps " in
2106 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
2108 pre_post_deps
="$pre_post_deps $pre_post_dep"
2117 need_relink
=no
# whether we're linking any uninstalled libtool libraries
2118 notinst_deplibs
= # not-installed libtool libraries
2119 notinst_path
= # paths that contain not-installed libtool libraries
2123 for file in $dlfiles $dlprefiles; do
2127 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2139 passes
="conv scan dlopen dlpreopen link"
2144 for pass
in $passes; do
2145 if test "$linkmode,$pass" = "lib,link" ||
2146 test "$linkmode,$pass" = "prog,scan"; then
2150 if test "$linkmode" = prog
; then
2152 dlopen
) libs
="$dlfiles" ;;
2153 dlpreopen
) libs
="$dlprefiles" ;;
2154 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
2157 if test "$pass" = dlopen
; then
2158 # Collect dlpreopened libraries
2159 save_deplibs
="$deplibs"
2162 for deplib
in $libs; do
2167 if test "$linkmode" != lib
&& test "$linkmode" != prog
; then
2168 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2171 if test "$pass" = conv
&& test "$allow_undefined" = yes; then
2172 deplibs
="$deplib $deplibs"
2175 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2176 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2177 for search_ext
in .la
$shrext .so .a
; do
2178 # Search the libtool library
2179 lib
="$searchdir/lib${name}${search_ext}"
2180 if test -f "$lib"; then
2181 if test "$search_ext" = ".la"; then
2190 if test "$found" != yes; then
2191 # deplib doesn't seem to be a libtool library
2192 if test "$linkmode,$pass" = "prog,link"; then
2193 compile_deplibs
="$deplib $compile_deplibs"
2194 finalize_deplibs
="$deplib $finalize_deplibs"
2196 deplibs
="$deplib $deplibs"
2197 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2200 else # deplib is a libtool library
2201 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2202 # We need to do some special things here, and not later.
2203 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2204 case " $predeps $postdeps " in
2206 if (${SED} -e '2q' $lib |
2207 grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
2211 */* |
*\\*) .
$lib ;;
2214 for l
in $old_library $library_names; do
2217 if test "X$ll" = "X$old_library" ; then # only static version available
2219 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2220 test "X$ladir" = "X$lib" && ladir
="."
2221 lib
=$ladir/$old_library
2222 if test "$linkmode,$pass" = "prog,link"; then
2223 compile_deplibs
="$deplib $compile_deplibs"
2224 finalize_deplibs
="$deplib $finalize_deplibs"
2226 deplibs
="$deplib $deplibs"
2227 test "$linkmode" = lib
&& newdependency_libs
="$deplib $newdependency_libs"
2239 if test "$linkmode,$pass" = "prog,link"; then
2240 compile_deplibs
="$deplib $compile_deplibs"
2241 finalize_deplibs
="$deplib $finalize_deplibs"
2243 deplibs
="$deplib $deplibs"
2244 if test "$linkmode" = lib
; then
2245 newdependency_libs
="$deplib $newdependency_libs"
2253 deplibs
="$deplib $deplibs"
2254 test "$pass" = conv
&& continue
2255 newdependency_libs
="$deplib $newdependency_libs"
2256 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2259 if test "$pass" = conv
; then
2260 deplibs
="$deplib $deplibs"
2263 if test "$pass" = scan
; then
2264 deplibs
="$deplib $deplibs"
2265 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2267 compile_deplibs
="$deplib $compile_deplibs"
2268 finalize_deplibs
="$deplib $finalize_deplibs"
2272 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2278 if test "$pass" = link
; then
2279 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2280 # Make sure the xrpath contains only unique directories.
2283 *) xrpath
="$xrpath $dir" ;;
2286 deplibs
="$deplib $deplibs"
2289 *.la
) lib
="$deplib" ;;
2291 if test "$pass" = conv
; then
2292 deplibs
="$deplib $deplibs"
2297 if test "$deplibs_check_method" != pass_all
; then
2299 $echo "*** Warning: Trying to link with static lib archive $deplib."
2300 $echo "*** I have the capability to make that library automatically link in when"
2301 $echo "*** you link to this library. But I can only do this if you have a"
2302 $echo "*** shared version of the library, which you do not appear to have"
2303 $echo "*** because the file extensions .$libext of this argument makes me believe"
2304 $echo "*** that it is just a static archive that I should not used here."
2307 $echo "*** Warning: Linking the shared library $output against the"
2308 $echo "*** static library $deplib is not portable!"
2309 deplibs
="$deplib $deplibs"
2314 if test "$pass" != link
; then
2315 deplibs
="$deplib $deplibs"
2317 compile_deplibs
="$deplib $compile_deplibs"
2318 finalize_deplibs
="$deplib $finalize_deplibs"
2325 if test "$pass" = conv
; then
2326 deplibs
="$deplib $deplibs"
2327 elif test "$linkmode" = prog
; then
2328 if test "$pass" = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2329 # If there is no dlopen support or we're linking statically,
2330 # we need to preload.
2331 newdlprefiles
="$newdlprefiles $deplib"
2332 compile_deplibs
="$deplib $compile_deplibs"
2333 finalize_deplibs
="$deplib $finalize_deplibs"
2335 newdlfiles
="$newdlfiles $deplib"
2345 if test "$found" = yes ||
test -f "$lib"; then :
2347 $echo "$modename: cannot find the library \`$lib'" 1>&2
2351 # Check to see that this really is a libtool archive.
2352 if (${SED} -e '2q' $lib |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
2354 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2358 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2359 test "X$ladir" = "X$lib" && ladir
="."
2367 # If the library was installed with an old release of libtool,
2368 # it will not redefine variables installed, or shouldnotlink
2374 */* |
*\\*) .
$lib ;;
2380 # Convert "-framework foo" to "foo.ltframework" in dependency_libs
2381 test -n "$dependency_libs" && dependency_libs
=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
2385 if test "$linkmode,$pass" = "lib,link" ||
2386 test "$linkmode,$pass" = "prog,scan" ||
2387 { test "$linkmode" != prog
&& test "$linkmode" != lib
; }; then
2388 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
2389 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
2392 if test "$pass" = conv
; then
2393 # Only check for convenience libraries
2394 deplibs
="$lib $deplibs"
2396 for deplib
in $dependency_libs; do
2397 #echo "Adding $deplib to \$deplibs"
2398 deplibs
="$deplib $deplibs"
2399 if test "X$duplicate_deps" = "Xyes" ; then
2400 case "$tmp_libs " in
2401 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2404 tmp_libs
="$tmp_libs $deplib"
2406 if test -z "$libdir"; then
2407 if test -z "$old_library"; then
2408 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2411 # It is a libtool convenience library, so add in its objects.
2412 convenience
="$convenience $ladir/$objdir/$old_library"
2413 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
2414 elif test "$linkmode" != prog
&& test "$linkmode" != lib
; then
2415 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2422 # Get the name of the library we link against.
2424 for l
in $old_library $library_names; do
2427 if test -z "$linklib"; then
2428 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2432 # This library was specified with -dlopen.
2433 if test "$pass" = dlopen
; then
2434 if test -z "$libdir"; then
2435 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2438 if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
2439 # If there is no dlname, no dlopen support or we're linking
2440 # statically, we need to preload. We also need to preload any
2441 # dependent libraries so libltdl's deplib preloader doesn't
2442 # bomb out in the load deplibs phase.
2443 dlprefiles
="$dlprefiles $lib $dependency_libs"
2445 newdlfiles
="$newdlfiles $lib"
2450 # We need an absolute path.
2452 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
2454 abs_ladir
=`cd "$ladir" && pwd`
2455 if test -z "$abs_ladir"; then
2456 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2457 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2462 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2464 # Find the relevant object directory and library name.
2465 if test "X$installed" = Xyes
; then
2466 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2467 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2476 dir
="$ladir/$objdir"
2477 absdir
="$abs_ladir/$objdir"
2478 # Remove this search path later
2479 notinst_path
="$notinst_path $abs_ladir"
2480 fi # $installed = yes
2481 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2483 # This library was specified with -dlpreopen.
2484 if test "$pass" = dlpreopen
; then
2485 if test -z "$libdir"; then
2486 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2489 # Prefer using a static library (so that no silly _DYNAMIC symbols
2490 # are required to link).
2491 if test -n "$old_library"; then
2492 newdlprefiles
="$newdlprefiles $dir/$old_library"
2493 # Otherwise, use the dlname, so that lt_dlopen finds it.
2494 elif test -n "$dlname"; then
2495 newdlprefiles
="$newdlprefiles $dir/$dlname"
2497 newdlprefiles
="$newdlprefiles $dir/$linklib"
2499 fi # $pass = dlpreopen
2501 if test -z "$libdir"; then
2502 # Link the convenience library
2503 if test "$linkmode" = lib
; then
2504 deplibs
="$dir/$old_library $deplibs"
2505 elif test "$linkmode,$pass" = "prog,link"; then
2506 compile_deplibs
="$dir/$old_library $compile_deplibs"
2507 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
2509 deplibs
="$lib $deplibs" # used for prog,scan pass
2515 if test "$linkmode" = prog
&& test "$pass" != link
; then
2516 newlib_search_path
="$newlib_search_path $ladir"
2517 deplibs
="$lib $deplibs"
2520 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
2521 test "$build_libtool_libs" = no
; then
2526 for deplib
in $dependency_libs; do
2528 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2530 # Need to link against all dependency_libs?
2531 if test "$linkalldeplibs" = yes; then
2532 deplibs
="$deplib $deplibs"
2534 # Need to hardcode shared library paths
2535 # or/and link against static libraries
2536 newdependency_libs
="$deplib $newdependency_libs"
2538 if test "X$duplicate_deps" = "Xyes" ; then
2539 case "$tmp_libs " in
2540 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2543 tmp_libs
="$tmp_libs $deplib"
2546 fi # $linkmode = prog...
2548 if test "$linkmode,$pass" = "prog,link"; then
2549 if test -n "$library_names" &&
2550 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2551 # We need to hardcode the library path
2552 if test -n "$shlibpath_var"; then
2553 # Make sure the rpath contains only unique directories.
2554 case "$temp_rpath " in
2557 *) temp_rpath
="$temp_rpath $dir" ;;
2561 # Hardcode the library path.
2562 # Skip directories that are in the system default run-time
2564 case " $sys_lib_dlsearch_path " in
2567 case "$compile_rpath " in
2569 *) compile_rpath
="$compile_rpath $absdir"
2573 case " $sys_lib_dlsearch_path " in
2576 case "$finalize_rpath " in
2578 *) finalize_rpath
="$finalize_rpath $libdir"
2582 fi # $linkmode,$pass = prog,link...
2584 if test "$alldeplibs" = yes &&
2585 { test "$deplibs_check_method" = pass_all ||
2586 { test "$build_libtool_libs" = yes &&
2587 test -n "$library_names"; }; }; then
2588 # We only need to search for static libraries
2593 link_static
=no
# Whether the deplib will be linked statically
2594 if test -n "$library_names" &&
2595 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2596 if test "$installed" = no
; then
2597 notinst_deplibs
="$notinst_deplibs $lib"
2600 # This is a shared library
2602 # Warn about portability, can't link against -module's on some systems (darwin)
2603 if test "$shouldnotlink" = yes && test "$pass" = link
; then
2605 if test "$linkmode" = prog
; then
2606 $echo "*** Warning: Linking the executable $output against the loadable module"
2608 $echo "*** Warning: Linking the shared library $output against the loadable module"
2610 $echo "*** $linklib is not portable!"
2612 if test "$linkmode" = lib
&&
2613 test "$hardcode_into_libs" = yes; then
2614 # Hardcode the library path.
2615 # Skip directories that are in the system default run-time
2617 case " $sys_lib_dlsearch_path " in
2620 case "$compile_rpath " in
2622 *) compile_rpath
="$compile_rpath $absdir"
2626 case " $sys_lib_dlsearch_path " in
2629 case "$finalize_rpath " in
2631 *) finalize_rpath
="$finalize_rpath $libdir"
2637 if test -n "$old_archive_from_expsyms_cmds"; then
2638 # figure out the soname
2639 set dummy
$library_names
2642 libname
=`eval \\$echo \"$libname_spec\"`
2643 # use dlname if we got it. it's perfectly good, no?
2644 if test -n "$dlname"; then
2646 elif test -n "$soname_spec"; then
2650 major
=`expr $current - $age`
2654 eval soname
=\"$soname_spec\"
2659 # Make a new name for the extract_expsyms_cmds to use
2661 soname
=`$echo $soroot | ${SED} -e 's/^.*\///'`
2662 newlib
="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2664 # If the library has no export list, then create one now
2665 if test -f "$output_objdir/$soname-def"; then :
2667 $show "extracting exported symbol list from \`$soname'"
2668 save_ifs
="$IFS"; IFS
='~'
2669 eval cmds
=\"$extract_expsyms_cmds\"
2670 for cmd
in $cmds; do
2673 $run eval "$cmd" ||
exit $?
2679 if test -f "$output_objdir/$newlib"; then :; else
2680 $show "generating import library for \`$soname'"
2681 save_ifs
="$IFS"; IFS
='~'
2682 eval cmds
=\"$old_archive_from_expsyms_cmds\"
2683 for cmd
in $cmds; do
2686 $run eval "$cmd" ||
exit $?
2690 # make sure the library variables are pointing to the new library
2693 fi # test -n "$old_archive_from_expsyms_cmds"
2695 if test "$linkmode" = prog ||
test "$mode" != relink
; then
2700 case $hardcode_action in
2701 immediate | unsupported
)
2702 if test "$hardcode_direct" = no
; then
2705 *-*-sco3.2v5
* ) add_dir
="-L$dir" ;;
2707 # if the lib is a module then we can not link against it, someone
2708 # is ignoring the new warnings I added
2709 if /usr
/bin
/file -L $add 2> /dev
/null |
grep "bundle" >/dev
/null
; then
2710 $echo "** Warning, lib $linklib is a module, not a shared library"
2711 if test -z "$old_library" ; then
2713 $echo "** And there doesn't seem to be a static archive available"
2714 $echo "** The link will probably fail, sorry"
2716 add
="$dir/$old_library"
2720 elif test "$hardcode_minus_L" = no
; then
2722 *-*-sunos*) add_shlibpath
="$dir" ;;
2726 elif test "$hardcode_shlibpath_var" = no
; then
2727 add_shlibpath
="$dir"
2734 if test "$hardcode_direct" = yes; then
2736 elif test "$hardcode_minus_L" = yes; then
2738 # Try looking first in the location we're being installed to.
2739 if test -n "$inst_prefix_dir"; then
2742 add_dir
="-L$inst_prefix_dir$libdir $add_dir"
2747 elif test "$hardcode_shlibpath_var" = yes; then
2748 add_shlibpath
="$dir"
2757 if test "$lib_linked" != yes; then
2758 $echo "$modename: configuration error: unsupported hardcode properties"
2762 if test -n "$add_shlibpath"; then
2763 case :$compile_shlibpath: in
2764 *":$add_shlibpath:"*) ;;
2765 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2768 if test "$linkmode" = prog
; then
2769 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2770 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2772 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2773 test -n "$add" && deplibs
="$add $deplibs"
2774 if test "$hardcode_direct" != yes && \
2775 test "$hardcode_minus_L" != yes && \
2776 test "$hardcode_shlibpath_var" = yes; then
2777 case :$finalize_shlibpath: in
2779 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2785 if test "$linkmode" = prog ||
test "$mode" = relink
; then
2789 # Finalize command for both is simple: just hardcode it.
2790 if test "$hardcode_direct" = yes; then
2791 add
="$libdir/$linklib"
2792 elif test "$hardcode_minus_L" = yes; then
2795 elif test "$hardcode_shlibpath_var" = yes; then
2796 case :$finalize_shlibpath: in
2798 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2801 elif test "$hardcode_automatic" = yes; then
2802 if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
2803 add
="$inst_prefix_dir$libdir/$linklib"
2805 add
="$libdir/$linklib"
2808 # We cannot seem to hardcode it, guess we'll fake it.
2810 # Try looking first in the location we're being installed to.
2811 if test -n "$inst_prefix_dir"; then
2814 add_dir
="-L$inst_prefix_dir$libdir $add_dir"
2821 if test "$linkmode" = prog
; then
2822 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
2823 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
2825 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2826 test -n "$add" && deplibs
="$add $deplibs"
2829 elif test "$linkmode" = prog
; then
2830 # Here we assume that one of hardcode_direct or hardcode_minus_L
2831 # is not unsupported. This is valid on all known static and
2833 if test "$hardcode_direct" != unsupported
; then
2834 test -n "$old_library" && linklib
="$old_library"
2835 compile_deplibs
="$dir/$linklib $compile_deplibs"
2836 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
2838 compile_deplibs
="-l$name -L$dir $compile_deplibs"
2839 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
2841 elif test "$build_libtool_libs" = yes; then
2842 # Not a shared library
2843 if test "$deplibs_check_method" != pass_all
; then
2844 # We're trying link a shared library against a static one
2845 # but the system doesn't support it.
2847 # Just print a warning and add the library to dependency_libs so
2848 # that the program can be linked against the static library.
2850 $echo "*** Warning: This system can not link to static lib archive $lib."
2851 $echo "*** I have the capability to make that library automatically link in when"
2852 $echo "*** you link to this library. But I can only do this if you have a"
2853 $echo "*** shared version of the library, which you do not appear to have."
2854 if test "$module" = yes; then
2855 $echo "*** But as you try to build a module library, libtool will still create "
2856 $echo "*** a static module, that should work as long as the dlopening application"
2857 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2858 if test -z "$global_symbol_pipe"; then
2860 $echo "*** However, this would only work if libtool was able to extract symbol"
2861 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2862 $echo "*** not find such a program. So, this module is probably useless."
2863 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2865 if test "$build_old_libs" = no
; then
2866 build_libtool_libs
=module
2869 build_libtool_libs
=no
2873 convenience
="$convenience $dir/$old_library"
2874 old_convenience
="$old_convenience $dir/$old_library"
2875 deplibs
="$dir/$old_library $deplibs"
2878 fi # link shared/static library?
2880 if test "$linkmode" = lib
; then
2881 #if test -n "$dependency_libs" &&
2882 # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
2883 # test "$link_static" = yes; }; then
2884 # Extract -R from dependency_libs
2886 for libdir
in $dependency_libs; do
2888 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2890 *" $temp_xrpath "*) ;;
2891 *) xrpath
="$xrpath $temp_xrpath";;
2893 *) temp_deplibs
="$temp_deplibs $libdir";;
2896 dependency_libs
="$temp_deplibs"
2899 newlib_search_path
="$newlib_search_path $absdir"
2900 # Link against this library
2901 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
2902 # ... and its dependency_libs
2904 for deplib
in $dependency_libs; do
2905 newdependency_libs
="$deplib $newdependency_libs"
2906 if test "X$duplicate_deps" = "Xyes" ; then
2907 case "$tmp_libs " in
2908 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2911 tmp_libs
="$tmp_libs $deplib"
2914 if test "$link_all_deplibs" != no
; then
2915 # Add the search paths of all dependency libraries
2916 for deplib
in $dependency_libs; do
2918 -L*) path
="$deplib" ;;
2920 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2921 test "X$dir" = "X$deplib" && dir
="."
2922 # We need an absolute path.
2924 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
2926 absdir
=`cd "$dir" && pwd`
2927 if test -z "$absdir"; then
2928 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2933 if grep "^installed=no" $deplib > /dev
/null
; then
2934 path
="$absdir/$objdir"
2936 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2937 if test -z "$libdir"; then
2938 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2941 if test "$absdir" != "$libdir"; then
2942 # Sure, some shells/systems don't implement the -ef.
2943 # Those will have to live with the warning.
2944 test "$absdir" -ef "$libdir" > /dev
/null
2>&1 ||
2945 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2952 # we do not want to link against static libs, but need to link against shared
2953 eval deplibrary_names
=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2954 if test -n "$deplibrary_names" ; then
2955 for tmp
in $deplibrary_names ; do
2958 if test -f "$path/$depdepl" ; then
2959 depdepl
="$path/$depdepl"
2961 # do not add paths which are already there
2962 case " $newlib_search_path " in
2964 *) newlib_search_path
="$newlib_search_path $path";;
2978 # Again, we only want to link against shared libraries
2979 eval tmp_libs
=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2980 for tmp
in $newlib_search_path ; do
2981 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2982 eval depdepl
="$tmp/lib$tmp_libs.dylib"
3002 case " $deplibs " in
3004 *) deplibs
="$deplibs $depdepl" ;;
3006 case " $deplibs " in
3008 *) deplibs
="$deplibs $path" ;;
3011 fi # link_all_deplibs != no
3013 done # for deplib in $libs
3014 dependency_libs
="$newdependency_libs"
3015 if test "$pass" = dlpreopen
; then
3016 # Link the dlpreopened libraries before other libraries
3017 for deplib
in $save_deplibs; do
3018 deplibs
="$deplib $deplibs"
3021 if test "$pass" != dlopen
; then
3022 if test "$pass" != conv
; then
3023 # Make sure lib_search_path contains only unique directories.
3025 for dir
in $newlib_search_path; do
3026 case "$lib_search_path " in
3028 *) lib_search_path
="$lib_search_path $dir" ;;
3034 if test "$linkmode,$pass" != "prog,link"; then
3037 vars
="compile_deplibs finalize_deplibs"
3039 for var
in $vars dependency_libs
; do
3040 # Add libraries to $var in reverse order
3041 eval tmp_libs
=\"\$
$var\"
3043 for deplib
in $tmp_libs; do
3044 # FIXME: Pedantically, this is the right thing to do, so
3045 # that some nasty dependency loop isn't accidentally
3047 #new_libs="$deplib $new_libs"
3048 # Pragmatically, this seems to cause very few problems in
3051 -L*) new_libs
="$deplib $new_libs" ;;
3054 # And here is the reason: when a library appears more
3055 # than once as an explicit dependence of a library, or
3056 # is implicitly linked in more than once by the
3057 # compiler, it is considered special, and multiple
3058 # occurrences thereof are not removed. Compare this
3059 # with having the same library being listed as a
3060 # dependency of multiple other libraries: in this case,
3061 # we know (pedantically, we assume) the library does not
3062 # need to be listed more than once, so we keep only the
3063 # last copy. This is not always right, but it is rare
3064 # enough that we require users that really mean to play
3065 # such unportable linking tricks to link the library
3066 # using -Wl,-lname, so that libtool does not consider it
3067 # for duplicate removal.
3068 case " $specialdeplibs " in
3069 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
3071 case " $new_libs " in
3073 *) new_libs
="$deplib $new_libs" ;;
3081 for deplib
in $new_libs; do
3084 case " $tmp_libs " in
3086 *) tmp_libs
="$tmp_libs $deplib" ;;
3089 *) tmp_libs
="$tmp_libs $deplib" ;;
3092 eval $var=\"$tmp_libs\"
3095 # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
3097 for i
in $dependency_libs ; do
3098 case " $predeps $postdeps $compiler_lib_search_path " in
3103 if test -n "$i" ; then
3104 tmp_libs
="$tmp_libs $i"
3107 dependency_libs
=$tmp_libs
3109 if test "$linkmode" = prog
; then
3110 dlfiles
="$newdlfiles"
3111 dlprefiles
="$newdlprefiles"
3116 if test -n "$deplibs"; then
3117 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3120 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3121 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3124 if test -n "$rpath"; then
3125 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3128 if test -n "$xrpath"; then
3129 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3132 if test -n "$vinfo"; then
3133 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3136 if test -n "$release"; then
3137 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3140 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
3141 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3144 # Now set the variables for building old libraries.
3145 build_libtool_libs
=no
3147 objs
="$objs$old_deplibs"
3151 # Make sure we only generate libraries of the form `libNAME.la'.
3154 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3155 eval shared_ext
=\"$shrext\"
3156 eval libname
=\"$libname_spec\"
3159 if test "$module" = no
; then
3160 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3164 if test "$need_lib_prefix" != no
; then
3165 # Add the "lib" prefix for modules if required
3166 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3167 eval shared_ext
=\"$shrext\"
3168 eval libname
=\"$libname_spec\"
3170 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3175 if test -n "$objs"; then
3176 if test "$deplibs_check_method" != pass_all
; then
3177 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3181 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3182 $echo "*** objects $objs is not portable!"
3183 libobjs
="$libobjs $objs"
3187 if test "$dlself" != no
; then
3188 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3192 if test "$#" -gt 2; then
3193 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3198 if test -z "$rpath"; then
3199 if test "$build_libtool_libs" = yes; then
3200 # Building a libtool convenience library.
3201 # Some compilers have problems with a `.al' extension so
3202 # convenience libraries should have the same extension an
3203 # archive normally would.
3204 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
3205 build_libtool_libs
=convenience
3209 if test -n "$vinfo"; then
3210 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3213 if test -n "$release"; then
3214 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3218 # Parse the version information argument.
3219 save_ifs
="$IFS"; IFS
=':'
3220 set dummy
$vinfo 0 0 0
3223 if test -n "$8"; then
3224 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3229 # convert absolute version numbers to libtool ages
3230 # this retains compatibility with .la files and attempts
3231 # to make the code below a bit more comprehensible
3233 case $vinfo_number in
3237 number_revision
="$4"
3239 # There are really only two kinds -- those that
3240 # use the current revision as the major version
3241 # and those that subtract age and use age as
3242 # a minor version. But, then there is irix
3243 # which has an extra 1 added just for fun
3245 case $version_type in
3246 darwin|linux|osf|windows
)
3247 current
=`expr $number_major + $number_minor`
3249 revision
="$number_revision"
3251 freebsd-aout|freebsd-elf|sunos
)
3252 current
="$number_major"
3253 revision
="$number_minor"
3257 current
=`expr $number_major + $number_minor - 1`
3259 revision
="$number_minor"
3270 # Check that each of the things are valid numbers.
3272 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3274 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3275 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3281 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3283 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3284 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3290 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
3292 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3293 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3298 if test "$age" -gt "$current"; then
3299 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3300 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3304 # Calculate the version variables.
3308 case $version_type in
3312 # Like Linux, but with the current version available in
3313 # verstring for coding it into the library header
3314 major
=.
`expr $current - $age`
3315 versuffix
="$major.$age.$revision"
3316 # Darwin ld doesn't like 0 for these options...
3317 minor_current
=`expr $current + 1`
3318 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
3323 versuffix
=".$current.$revision";
3328 versuffix
=".$current";
3332 major
=`expr $current - $age + 1`
3334 case $version_type in
3335 nonstopux
) verstring_prefix
=nonstopux
;;
3336 *) verstring_prefix
=sgi
;;
3338 verstring
="$verstring_prefix$major.$revision"
3340 # Add in all the interfaces that we are compatible with.
3342 while test "$loop" -ne 0; do
3343 iface
=`expr $revision - $loop`
3344 loop
=`expr $loop - 1`
3345 verstring
="$verstring_prefix$major.$iface:$verstring"
3348 # Before this point, $major must not contain `.'.
3350 versuffix
="$major.$revision"
3354 major
=.
`expr $current - $age`
3355 versuffix
="$major.$age.$revision"
3359 major
=.
`expr $current - $age`
3360 versuffix
=".$current.$age.$revision"
3361 verstring
="$current.$age.$revision"
3363 # Add in all the interfaces that we are compatible with.
3365 while test "$loop" -ne 0; do
3366 iface
=`expr $current - $loop`
3367 loop
=`expr $loop - 1`
3368 verstring
="$verstring:${iface}.0"
3371 # Make executables depend on our current version.
3372 verstring
="$verstring:${current}.0"
3377 versuffix
=".$current.$revision"
3381 # Use '-' rather than '.', since we only want one
3382 # extension on DOS 8.3 filesystems.
3383 major
=`expr $current - $age`
3388 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3389 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3394 # Clear the version info if we defaulted, and they specified a release.
3395 if test -z "$vinfo" && test -n "$release"; then
3397 case $version_type in
3399 # we can't check for "0.0" in archive_cmds due to quoting
3400 # problems, so we reset it completely
3407 if test "$need_version" = no
; then
3414 # Remove version info from name if versioning should be avoided
3415 if test "$avoid_version" = yes && test "$need_version" = no
; then
3421 # Check to see if the archive will have undefined symbols.
3422 if test "$allow_undefined" = yes; then
3423 if test "$allow_undefined_flag" = unsupported
; then
3424 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3425 build_libtool_libs
=no
3429 # Don't allow undefined symbols.
3430 allow_undefined_flag
="$no_undefined_flag"
3434 if test "$mode" != relink
; then
3435 # Remove our outputs, but don't remove object files since they
3436 # may have been created when compiling PIC objects.
3438 tempremovelist
=`$echo "$output_objdir/*"`
3439 for p
in $tempremovelist; do
3441 *.
$objext |
*$exeext)
3443 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
3444 removelist
="$removelist $p"
3449 if test -n "$removelist"; then
3450 $show "${rm}r $removelist"
3451 $run ${rm}r
$removelist
3455 # Now set the variables for building old libraries.
3456 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
3457 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
3459 # Transform .lo files to .o files.
3460 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3463 # Eliminate all temporary directories.
3464 for path
in $notinst_path; do
3465 lib_search_path
=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3466 deplibs
=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3467 dependency_libs
=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3470 if test -n "$xrpath"; then
3471 # If the user specified any rpath flags, then add them.
3473 for libdir
in $xrpath; do
3474 temp_xrpath
="$temp_xrpath -R$libdir"
3475 case "$finalize_rpath " in
3477 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3480 if true ||
test "$hardcode_into_libs" != yes ||
test "$build_old_libs" = yes; then
3481 dependency_libs
="$temp_xrpath $dependency_libs"
3485 # Make sure dlfiles contains only unique files that won't be dlpreopened
3486 old_dlfiles
="$dlfiles"
3488 for lib
in $old_dlfiles; do
3489 case " $dlprefiles $dlfiles " in
3491 *) dlfiles
="$dlfiles $lib" ;;
3495 # Make sure dlprefiles contains only unique files
3496 old_dlprefiles
="$dlprefiles"
3498 for lib
in $old_dlprefiles; do
3499 case "$dlprefiles " in
3501 *) dlprefiles
="$dlprefiles $lib" ;;
3505 if test "$build_libtool_libs" = yes; then
3506 if test -n "$rpath"; then
3508 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
3509 # these systems don't actually have a c library (as such)!
3511 *-*-rhapsody* |
*-*-darwin1.
[012])
3512 # Rhapsody C library is in the System framework
3513 deplibs
="$deplibs System.ltframework"
3516 # Don't link with libc until the a.out ld.so is fixed.
3518 *-*-openbsd* |
*-*-freebsd*)
3519 # Do not include libc due to us having libc/libc_r.
3520 test "X$arg" = "X-lc" && continue
3523 # Add libc to deplibs on all other systems if necessary.
3524 if test "$build_libtool_need_lc" = "yes"; then
3525 deplibs
="$deplibs -lc"
3531 # Transform deplibs into only deplibs that can be linked in shared.
3533 libname_save
=$libname
3534 release_save
=$release
3535 versuffix_save
=$versuffix
3537 # I'm not sure if I'm treating the release correctly. I think
3538 # release should show up in the -l (ie -lgmp5) so we don't want to
3539 # add it in twice. Is that correct?
3545 case $deplibs_check_method in
3547 # Don't check for shared/static. Everything works.
3548 # This might be a little naive. We might want to check
3549 # whether the library exists or not. But this is on
3550 # osf3 & osf4 and I'm not really sure... Just
3551 # implementing what was already the behavior.
3555 # This code stresses the "libraries are programs" paradigm to its
3556 # limits. Maybe even breaks it. We compile a program, linking it
3557 # against the deplibs as a proxy for the library. Then we can check
3558 # whether they linked in statically or dynamically with ldd.
3560 cat > conftest.c
<<EOF
3561 int main() { return 0; }
3564 $LTCC -o conftest conftest.c
$deplibs
3565 if test "$?" -eq 0 ; then
3566 ldd_output
=`ldd conftest`
3567 for i
in $deplibs; do
3568 name
="`expr $i : '-l\(.*\)'`"
3569 # If $name is empty we are operating on a -L argument.
3570 if test "$name" != "" && test "$name" -ne "0"; then
3571 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3572 case " $predeps $postdeps " in
3574 newdeplibs
="$newdeplibs $i"
3579 if test -n "$i" ; then
3580 libname
=`eval \\$echo \"$libname_spec\"`
3581 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3582 set dummy
$deplib_matches
3584 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3585 newdeplibs
="$newdeplibs $i"
3589 $echo "*** Warning: dynamic linker does not accept needed library $i."
3590 $echo "*** I have the capability to make that library automatically link in when"
3591 $echo "*** you link to this library. But I can only do this if you have a"
3592 $echo "*** shared version of the library, which I believe you do not have"
3593 $echo "*** because a test_compile did reveal that the linker did not use it for"
3594 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3598 newdeplibs
="$newdeplibs $i"
3602 # Error occurred in the first compile. Let's try to salvage
3603 # the situation: Compile a separate program for each library.
3604 for i
in $deplibs; do
3605 name
="`expr $i : '-l\(.*\)'`"
3606 # If $name is empty we are operating on a -L argument.
3607 if test "$name" != "" && test "$name" != "0"; then
3609 $LTCC -o conftest conftest.c
$i
3611 if test "$?" -eq 0 ; then
3612 ldd_output
=`ldd conftest`
3613 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3614 case " $predeps $postdeps " in
3616 newdeplibs
="$newdeplibs $i"
3621 if test -n "$i" ; then
3622 libname
=`eval \\$echo \"$libname_spec\"`
3623 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
3624 set dummy
$deplib_matches
3626 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3627 newdeplibs
="$newdeplibs $i"
3631 $echo "*** Warning: dynamic linker does not accept needed library $i."
3632 $echo "*** I have the capability to make that library automatically link in when"
3633 $echo "*** you link to this library. But I can only do this if you have a"
3634 $echo "*** shared version of the library, which you do not appear to have"
3635 $echo "*** because a test_compile did reveal that the linker did not use this one"
3636 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3642 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3643 $echo "*** make it link in! You will probably need to install it or some"
3644 $echo "*** library that it depends on before this library will be fully"
3645 $echo "*** functional. Installing it before continuing would be even better."
3648 newdeplibs
="$newdeplibs $i"
3654 set dummy
$deplibs_check_method
3655 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3656 for a_deplib
in $deplibs; do
3657 name
="`expr $a_deplib : '-l\(.*\)'`"
3658 # If $name is empty we are operating on a -L argument.
3659 if test "$name" != "" && test "$name" != "0"; then
3660 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3661 case " $predeps $postdeps " in
3663 newdeplibs
="$newdeplibs $a_deplib"
3668 if test -n "$a_deplib" ; then
3669 libname
=`eval \\$echo \"$libname_spec\"`
3670 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3671 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3672 for potent_lib
in $potential_libs; do
3673 # Follow soft links.
3674 if ls -lLd "$potent_lib" 2>/dev
/null \
3675 |
grep " -> " >/dev
/null
; then
3678 # The statement above tries to avoid entering an
3679 # endless loop below, in case of cyclic links.
3680 # We might still enter an endless loop, since a link
3681 # loop can be closed while we follow links,
3683 potlib
="$potent_lib"
3684 while test -h "$potlib" 2>/dev
/null
; do
3685 potliblink
=`ls -ld $potlib | ${SED} 's/.* -> //'`
3687 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
3688 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3691 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
3693 |
$EGREP "$file_magic_regex" > /dev
/null
; then
3694 newdeplibs
="$newdeplibs $a_deplib"
3701 if test -n "$a_deplib" ; then
3704 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3705 $echo "*** I have the capability to make that library automatically link in when"
3706 $echo "*** you link to this library. But I can only do this if you have a"
3707 $echo "*** shared version of the library, which you do not appear to have"
3708 $echo "*** because I did check the linker path looking for a file starting"
3709 if test -z "$potlib" ; then
3710 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3712 $echo "*** with $libname and none of the candidates passed a file format test"
3713 $echo "*** using a file magic. Last file checked: $potlib"
3717 # Add a -L argument.
3718 newdeplibs
="$newdeplibs $a_deplib"
3720 done # Gone through all deplibs.
3723 set dummy
$deplibs_check_method
3724 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3725 for a_deplib
in $deplibs; do
3726 name
="`expr $a_deplib : '-l\(.*\)'`"
3727 # If $name is empty we are operating on a -L argument.
3728 if test -n "$name" && test "$name" != "0"; then
3729 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3730 case " $predeps $postdeps " in
3732 newdeplibs
="$newdeplibs $a_deplib"
3737 if test -n "$a_deplib" ; then
3738 libname
=`eval \\$echo \"$libname_spec\"`
3739 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3740 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
3741 for potent_lib
in $potential_libs; do
3742 potlib
="$potent_lib" # see symlink-check above in file_magic test
3743 if eval $echo \"$potent_lib\" 2>/dev
/null \
3745 |
$EGREP "$match_pattern_regex" > /dev
/null
; then
3746 newdeplibs
="$newdeplibs $a_deplib"
3753 if test -n "$a_deplib" ; then
3756 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3757 $echo "*** I have the capability to make that library automatically link in when"
3758 $echo "*** you link to this library. But I can only do this if you have a"
3759 $echo "*** shared version of the library, which you do not appear to have"
3760 $echo "*** because I did check the linker path looking for a file starting"
3761 if test -z "$potlib" ; then
3762 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3764 $echo "*** with $libname and none of the candidates passed a file format test"
3765 $echo "*** using a regex pattern. Last file checked: $potlib"
3769 # Add a -L argument.
3770 newdeplibs
="$newdeplibs $a_deplib"
3772 done # Gone through all deplibs.
3776 tmp_deplibs
=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3777 -e 's/ -[LR][^ ]*//g'`
3778 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3779 for i
in $predeps $postdeps ; do
3780 # can't use Xsed below, because $i might contain '/'
3781 tmp_deplibs
=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3784 if $echo "X $tmp_deplibs" |
$Xsed -e 's/[ ]//g' \
3785 |
grep .
>/dev
/null
; then
3787 if test "X$deplibs_check_method" = "Xnone"; then
3788 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3790 $echo "*** Warning: inter-library dependencies are not known to be supported."
3792 $echo "*** All declared inter-library dependencies are being dropped."
3797 versuffix
=$versuffix_save
3799 release
=$release_save
3800 libname
=$libname_save
3804 *-*-rhapsody* |
*-*-darwin1.
[012])
3805 # On Rhapsody replace the C library is the System framework
3806 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
3810 if test "$droppeddeps" = yes; then
3811 if test "$module" = yes; then
3813 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3814 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3815 $echo "*** a static module, that should work as long as the dlopening"
3816 $echo "*** application is linked with the -dlopen flag."
3817 if test -z "$global_symbol_pipe"; then
3819 $echo "*** However, this would only work if libtool was able to extract symbol"
3820 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3821 $echo "*** not find such a program. So, this module is probably useless."
3822 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3824 if test "$build_old_libs" = no
; then
3825 oldlibs
="$output_objdir/$libname.$libext"
3826 build_libtool_libs
=module
3829 build_libtool_libs
=no
3832 $echo "*** The inter-library dependencies that have been dropped here will be"
3833 $echo "*** automatically added whenever a program is linked with this library"
3834 $echo "*** or is declared to -dlopen it."
3836 if test "$allow_undefined" = no
; then
3838 $echo "*** Since this library must not contain undefined symbols,"
3839 $echo "*** because either the platform does not support them or"
3840 $echo "*** it was explicitly requested with -no-undefined,"
3841 $echo "*** libtool will only create a static version of it."
3842 if test "$build_old_libs" = no
; then
3843 oldlibs
="$output_objdir/$libname.$libext"
3844 build_libtool_libs
=module
3847 build_libtool_libs
=no
3852 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
3855 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
3856 dependency_libs
=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
3859 # Done checking deplibs!
3863 # All the library-specific variables (install_libdir is set above).
3868 # Test again, we may have decided not to build it any more
3869 if test "$build_libtool_libs" = yes; then
3870 if test "$hardcode_into_libs" = yes; then
3871 # Hardcode the library paths
3874 rpath
="$finalize_rpath"
3875 test "$mode" != relink
&& test "$fast_install" = no
&& rpath
="$compile_rpath$rpath"
3876 for libdir
in $rpath; do
3877 if test -n "$hardcode_libdir_flag_spec"; then
3878 if test -n "$hardcode_libdir_separator"; then
3879 if test -z "$hardcode_libdirs"; then
3880 hardcode_libdirs
="$libdir"
3882 # Just accumulate the unique libdirs.
3883 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3884 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3887 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3892 eval flag
=\"$hardcode_libdir_flag_spec\"
3893 dep_rpath
="$dep_rpath $flag"
3895 elif test -n "$runpath_var"; then
3896 case "$perm_rpath " in
3898 *) perm_rpath
="$perm_rpath $libdir" ;;
3902 # Substitute the hardcoded libdirs into the rpath.
3903 if test -n "$hardcode_libdir_separator" &&
3904 test -n "$hardcode_libdirs"; then
3905 libdir
="$hardcode_libdirs"
3906 if test -n "$hardcode_libdir_flag_spec_ld"; then
3907 eval dep_rpath
=\"$hardcode_libdir_flag_spec_ld\"
3909 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
3912 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3913 # We should set the runpath_var.
3915 for dir
in $perm_rpath; do
3918 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3920 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
3923 shlibpath
="$finalize_shlibpath"
3924 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
3925 if test -n "$shlibpath"; then
3926 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3929 # Get the real and link names of the library.
3930 eval shared_ext
=\"$shrext\"
3931 eval library_names
=\"$library_names_spec\"
3932 set dummy
$library_names
3936 if test -n "$soname_spec"; then
3937 eval soname
=\"$soname_spec\"
3941 if test -z "$dlname"; then
3945 lib
="$output_objdir/$realname"
3948 linknames
="$linknames $link"
3951 # Use standard objects if they are pic
3952 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3954 # Prepare the list of exported symbols
3955 if test -z "$export_symbols"; then
3956 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
3957 $show "generating symbol list for \`$libname.la'"
3958 export_symbols
="$output_objdir/$libname.exp"
3959 $run $rm $export_symbols
3960 eval cmds
=\"$export_symbols_cmds\"
3961 save_ifs
="$IFS"; IFS
='~'
3962 for cmd
in $cmds; do
3964 if len
=`expr "X$cmd" : ".*"` &&
3965 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
3967 $run eval "$cmd" ||
exit $?
3968 skipped_export
=false
3970 # The command line is too long to execute in one step.
3971 $show "using reloadable object file for export list..."
3976 if test -n "$export_symbols_regex"; then
3977 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3978 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3979 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3980 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3985 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3986 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3990 for test_deplib
in $deplibs; do
3991 case " $convenience " in
3992 *" $test_deplib "*) ;;
3994 tmp_deplibs
="$tmp_deplibs $test_deplib"
3998 deplibs
="$tmp_deplibs"
4000 if test -n "$convenience"; then
4001 if test -n "$whole_archive_flag_spec"; then
4002 save_libobjs
=$libobjs
4003 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4005 gentop
="$output_objdir/${outputname}x"
4006 $show "${rm}r $gentop"
4007 $run ${rm}r
"$gentop"
4008 $show "$mkdir $gentop"
4009 $run $mkdir "$gentop"
4011 if test "$status" -ne 0 && test ! -d "$gentop"; then
4014 generated
="$generated $gentop"
4016 for xlib
in $convenience; do
4017 # Extract the objects.
4019 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4020 *) xabs
=`pwd`"/$xlib" ;;
4022 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4023 xdir
="$gentop/$xlib"
4025 $show "${rm}r $xdir"
4027 $show "$mkdir $xdir"
4030 if test "$status" -ne 0 && test ! -d "$xdir"; then
4033 # We will extract separately just the conflicting names and we will no
4034 # longer touch any unique names. It is faster to leave these extract
4035 # automatically by $AR in one run.
4036 $show "(cd $xdir && $AR x $xabs)"
4037 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4038 if ($AR t
"$xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
4041 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4042 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4043 $AR t
"$xabs" |
sort |
uniq -cd |
while read -r count name
4046 while test "$i" -le "$count"
4048 # Put our $i before any first dot (extension)
4049 # Never overwrite any file
4051 while test "X$name_to" = "X$name" ||
test -f "$xdir/$name_to"
4053 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4055 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4056 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
4062 libobjs
="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4067 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4068 eval flag
=\"$thread_safe_flag_spec\"
4069 linker_flags
="$linker_flags $flag"
4072 # Make a backup of the uninstalled library when relinking
4073 if test "$mode" = relink
; then
4074 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
4077 # Add all flags from the command line. We here create a library,
4078 # but those flags were only added to compile_command and
4079 # finalize_command, which are only used when creating executables.
4080 # So do it by hand here.
4081 compiler_flags
="$compiler_flags $add_flags"
4082 # Only add it to commands which use CC, instead of LD, i.e.
4083 # only to $compiler_flags
4084 #linker_flags="$linker_flags $add_flags"
4086 # Do each of the archive commands.
4087 if test "$module" = yes && test -n "$module_cmds" ; then
4088 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4089 eval cmds
=\"$module_expsym_cmds\"
4091 eval cmds
=\"$module_cmds\"
4094 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4095 eval cmds
=\"$archive_expsym_cmds\"
4097 eval cmds
=\"$archive_cmds\"
4101 if test "X$skipped_export" != "X:" && len
=`expr "X$cmds" : ".*"` &&
4102 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
4105 # The command line is too long to link in one step, link piecewise.
4106 $echo "creating reloadable object files..."
4108 # Save the value of $output and $libobjs because we want to
4109 # use them later. If we have whole_archive_flag_spec, we
4110 # want to use save_libobjs as it was before
4111 # whole_archive_flag_spec was expanded, because we can't
4112 # assume the linker understands whole_archive_flag_spec.
4113 # This may have to be revisited, in case too many
4114 # convenience libraries get linked in and end up exceeding
4116 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
4117 save_libobjs
=$libobjs
4121 # Clear the reloadable object creation command queue and
4122 # initialize k to one.
4129 output
=$output_objdir/$save_output-${k}.
$objext
4130 # Loop over the list of objects to be linked.
4131 for obj
in $save_libobjs
4133 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
4134 if test "X$objlist" = X ||
4135 { len
=`expr "X$test_cmds" : ".*"` &&
4136 test "$len" -le "$max_cmd_len"; }; then
4137 objlist
="$objlist $obj"
4139 # The command $test_cmds is almost too long, add a
4140 # command to the queue.
4141 if test "$k" -eq 1 ; then
4142 # The first file doesn't have a previous command to add.
4143 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
4145 # All subsequent reloadable object files will link in
4146 # the last one created.
4147 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
4149 last_robj
=$output_objdir/$save_output-${k}.
$objext
4151 output
=$output_objdir/$save_output-${k}.
$objext
4156 # Handle the remaining objects by creating one last
4157 # reloadable object file. All subsequent reloadable object
4158 # files will link in the last one created.
4159 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4160 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
4162 if ${skipped_export-false}; then
4163 $show "generating symbol list for \`$libname.la'"
4164 export_symbols
="$output_objdir/$libname.exp"
4165 $run $rm $export_symbols
4167 # Append the command to create the export file.
4168 eval concat_cmds
=\"\
$concat_cmds~
$export_symbols_cmds\"
4171 # Set up a command to remove the reloadale object files
4172 # after they are used.
4174 while test "$i" -lt "$k"
4177 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
4180 $echo "creating a temporary reloadable object file: $output"
4182 # Loop through the commands generated above and execute them.
4183 save_ifs
="$IFS"; IFS
='~'
4184 for cmd
in $concat_cmds; do
4187 $run eval "$cmd" ||
exit $?
4192 # Restore the value of output.
4195 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4196 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
4198 # Expand the library linking commands again to reset the
4199 # value of $libobjs for piecewise linking.
4201 # Do each of the archive commands.
4202 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4203 eval cmds
=\"$archive_expsym_cmds\"
4205 eval cmds
=\"$archive_cmds\"
4208 # Append the command to remove the reloadable object files
4209 # to the just-reset $cmds.
4210 eval cmds
=\"\
$cmds~
$rm $delfiles\"
4212 save_ifs
="$IFS"; IFS
='~'
4213 for cmd
in $cmds; do
4216 $run eval "$cmd" ||
exit $?
4220 # Restore the uninstalled library and exit
4221 if test "$mode" = relink
; then
4222 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
4226 # Create links to the real library.
4227 for linkname
in $linknames; do
4228 if test "$realname" != "$linkname"; then
4229 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4230 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
4234 # If -module or -export-dynamic was specified, set the dlname.
4235 if test "$module" = yes ||
test "$export_dynamic" = yes; then
4236 # On all known operating systems, these are identical.
4243 if test -n "$deplibs"; then
4244 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4247 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4248 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4251 if test -n "$rpath"; then
4252 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4255 if test -n "$xrpath"; then
4256 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4259 if test -n "$vinfo"; then
4260 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4263 if test -n "$release"; then
4264 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4269 if test -n "$objs$old_deplibs"; then
4270 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4274 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
4282 # Delete the old objects.
4283 $run $rm $obj $libobj
4285 # Objects from convenience libraries. This assumes
4286 # single-version convenience libraries. Whenever we create
4287 # different ones for PIC/non-PIC, this we'll have to duplicate
4291 # reload_cmds runs $LD directly, so let us get rid of
4292 # -Wl from whole_archive_flag_spec
4295 if test -n "$convenience"; then
4296 if test -n "$whole_archive_flag_spec"; then
4297 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
4299 gentop
="$output_objdir/${obj}x"
4300 $show "${rm}r $gentop"
4301 $run ${rm}r
"$gentop"
4302 $show "$mkdir $gentop"
4303 $run $mkdir "$gentop"
4305 if test "$status" -ne 0 && test ! -d "$gentop"; then
4308 generated
="$generated $gentop"
4310 for xlib
in $convenience; do
4311 # Extract the objects.
4313 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4314 *) xabs
=`pwd`"/$xlib" ;;
4316 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4317 xdir
="$gentop/$xlib"
4319 $show "${rm}r $xdir"
4321 $show "$mkdir $xdir"
4324 if test "$status" -ne 0 && test ! -d "$xdir"; then
4327 # We will extract separately just the conflicting names and we will no
4328 # longer touch any unique names. It is faster to leave these extract
4329 # automatically by $AR in one run.
4330 $show "(cd $xdir && $AR x $xabs)"
4331 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4332 if ($AR t
"$xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
4335 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4336 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4337 $AR t
"$xabs" |
sort |
uniq -cd |
while read -r count name
4340 while test "$i" -le "$count"
4342 # Put our $i before any first dot (extension)
4343 # Never overwrite any file
4345 while test "X$name_to" = "X$name" ||
test -f "$xdir/$name_to"
4347 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4349 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4350 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
4356 reload_conv_objs
="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4361 # Create the old-style object.
4362 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
4365 eval cmds
=\"$reload_cmds\"
4366 save_ifs
="$IFS"; IFS
='~'
4367 for cmd
in $cmds; do
4370 $run eval "$cmd" ||
exit $?
4374 # Exit if we aren't doing a library object file.
4375 if test -z "$libobj"; then
4376 if test -n "$gentop"; then
4377 $show "${rm}r $gentop"
4384 if test "$build_libtool_libs" != yes; then
4385 if test -n "$gentop"; then
4386 $show "${rm}r $gentop"
4390 # Create an invalid libtool object if no PIC, so that we don't
4391 # accidentally link it into a program.
4392 # $show "echo timestamp > $libobj"
4393 # $run eval "echo timestamp > $libobj" || exit $?
4397 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
4398 # Only do commands if we really have different PIC objects.
4399 reload_objs
="$libobjs $reload_conv_objs"
4401 eval cmds
=\"$reload_cmds\"
4402 save_ifs
="$IFS"; IFS
='~'
4403 for cmd
in $cmds; do
4406 $run eval "$cmd" ||
exit $?
4411 if test -n "$gentop"; then
4412 $show "${rm}r $gentop"
4421 *cygwin
*) output
=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4423 if test -n "$vinfo"; then
4424 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4427 if test -n "$release"; then
4428 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4431 if test "$preload" = yes; then
4432 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
4433 test "$dlopen_self_static" = unknown
; then
4434 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4439 *-*-rhapsody* |
*-*-darwin1.
[012])
4440 # On Rhapsody replace the C library is the System framework
4441 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
4442 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
4448 # Don't allow lazy linking, it breaks C++ global constructors
4449 if test "$tagname" = CXX
; then
4450 compile_command
="$compile_command ${wl}-bind_at_load"
4451 finalize_command
="$finalize_command ${wl}-bind_at_load"
4453 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
4454 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
4455 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
4459 compile_command
="$compile_command $compile_deplibs"
4460 finalize_command
="$finalize_command $finalize_deplibs"
4462 if test -n "$rpath$xrpath"; then
4463 # If the user specified any rpath flags, then add them.
4464 for libdir
in $rpath $xrpath; do
4465 # This is the magic to use -rpath.
4466 case "$finalize_rpath " in
4468 *) finalize_rpath
="$finalize_rpath $libdir" ;;
4473 # Now hardcode the library paths
4476 for libdir
in $compile_rpath $finalize_rpath; do
4477 if test -n "$hardcode_libdir_flag_spec"; then
4478 if test -n "$hardcode_libdir_separator"; then
4479 if test -z "$hardcode_libdirs"; then
4480 hardcode_libdirs
="$libdir"
4482 # Just accumulate the unique libdirs.
4483 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4484 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4487 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4492 eval flag
=\"$hardcode_libdir_flag_spec\"
4493 rpath
="$rpath $flag"
4495 elif test -n "$runpath_var"; then
4496 case "$perm_rpath " in
4498 *) perm_rpath
="$perm_rpath $libdir" ;;
4502 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
4503 case :$dllsearchpath: in
4505 *) dllsearchpath
="$dllsearchpath:$libdir";;
4510 # Substitute the hardcoded libdirs into the rpath.
4511 if test -n "$hardcode_libdir_separator" &&
4512 test -n "$hardcode_libdirs"; then
4513 libdir
="$hardcode_libdirs"
4514 eval rpath
=\" $hardcode_libdir_flag_spec\"
4516 compile_rpath
="$rpath"
4520 for libdir
in $finalize_rpath; do
4521 if test -n "$hardcode_libdir_flag_spec"; then
4522 if test -n "$hardcode_libdir_separator"; then
4523 if test -z "$hardcode_libdirs"; then
4524 hardcode_libdirs
="$libdir"
4526 # Just accumulate the unique libdirs.
4527 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4528 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4531 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4536 eval flag
=\"$hardcode_libdir_flag_spec\"
4537 rpath
="$rpath $flag"
4539 elif test -n "$runpath_var"; then
4540 case "$finalize_perm_rpath " in
4542 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
4546 # Substitute the hardcoded libdirs into the rpath.
4547 if test -n "$hardcode_libdir_separator" &&
4548 test -n "$hardcode_libdirs"; then
4549 libdir
="$hardcode_libdirs"
4550 eval rpath
=\" $hardcode_libdir_flag_spec\"
4552 finalize_rpath
="$rpath"
4554 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4555 # Transform all the library objects into standard objects.
4556 compile_command
=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4557 finalize_command
=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4561 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
4562 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4563 dlsyms
="${outputname}S.c"
4565 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4569 if test -n "$dlsyms"; then
4573 # Discover the nlist of each of the dlfiles.
4574 nlist
="$output_objdir/${outputname}.nm"
4576 $show "$rm $nlist ${nlist}S ${nlist}T"
4577 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4579 # Parse the name list into a source file.
4580 $show "creating $output_objdir/$dlsyms"
4582 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4583 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4584 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4590 /* Prevent the only kind of declaration conflicts we can make. */
4591 #define lt_preloaded_symbols some_other_symbol
4593 /* External symbol declarations for the compiler. */\
4596 if test "$dlself" = yes; then
4597 $show "generating symbol list for \`$output'"
4599 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4601 # Add our own program objects to the symbol list.
4602 progfiles
=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4603 for arg
in $progfiles; do
4604 $show "extracting global C symbols from \`$arg'"
4605 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4608 if test -n "$exclude_expsyms"; then
4609 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4610 $run eval '$mv "$nlist"T "$nlist"'
4613 if test -n "$export_symbols_regex"; then
4614 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4615 $run eval '$mv "$nlist"T "$nlist"'
4618 # Prepare the list of exported symbols
4619 if test -z "$export_symbols"; then
4620 export_symbols
="$output_objdir/$output.exp"
4621 $run $rm $export_symbols
4622 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4624 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4625 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4626 $run eval 'mv "$nlist"T "$nlist"'
4630 for arg
in $dlprefiles; do
4631 $show "extracting global C symbols from \`$arg'"
4632 name
=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4633 $run eval '$echo ": $name " >> "$nlist"'
4634 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4637 if test -z "$run"; then
4638 # Make sure we have at least an empty file.
4639 test -f "$nlist" ||
: > "$nlist"
4641 if test -n "$exclude_expsyms"; then
4642 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4643 $mv "$nlist"T
"$nlist"
4646 # Try sorting and uniquifying the output.
4647 if grep -v "^: " < "$nlist" |
4648 if sort -k 3 </dev
/null
>/dev
/null
2>&1; then
4653 uniq > "$nlist"S
; then
4656 grep -v "^: " < "$nlist" > "$nlist"S
4659 if test -f "$nlist"S
; then
4660 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4662 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4665 $echo >> "$output_objdir/$dlsyms" "\
4667 #undef lt_preloaded_symbols
4669 #if defined (__STDC__) && __STDC__
4670 # define lt_ptr void *
4672 # define lt_ptr char *
4676 /* The mapping between symbol names and symbols. */
4681 lt_preloaded_symbols[] =
4685 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4687 $echo >> "$output_objdir/$dlsyms" "\
4691 /* This works around a problem in FreeBSD linker */
4692 #ifdef FREEBSD_WORKAROUND
4693 static const void *lt_preloaded_setup() {
4694 return lt_preloaded_symbols;
4704 pic_flag_for_symtable
=
4706 # compiling the symbol table file with pic_flag works around
4707 # a FreeBSD bug that causes programs to crash when -lm is
4708 # linked before any other PIC object. But we must not use
4709 # pic_flag when linking with -static. The problem exists in
4710 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4711 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
4712 case "$compile_command " in
4714 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
4717 case "$compile_command " in
4719 *) pic_flag_for_symtable
=" $pic_flag";;
4723 # Now compile the dynamic symbol file.
4724 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4725 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
4727 # Clean up the generated files.
4728 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4729 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4731 # Transform the symbol file into the correct name.
4732 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4733 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4736 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4741 # We keep going just in case the user didn't refer to
4742 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4743 # really was required.
4745 # Nullify the symbol file.
4746 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4747 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4750 # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
4751 # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
4752 # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
4753 # This does not apply on AIX for ia64, which uses a SysV linker.
4756 *-*-aix4* |
*-*-aix5*)
4757 compile_command
=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
4758 finalize_command
=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
4761 if test "$need_relink" = no ||
test "$build_libtool_libs" != yes; then
4762 # Replace the output file specification.
4763 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4764 link_command
="$compile_command$compile_rpath"
4766 # We have no uninstalled library dependencies, so finalize right now.
4767 $show "$link_command"
4768 $run eval "$link_command"
4771 # Delete the generated files.
4772 if test -n "$dlsyms"; then
4773 $show "$rm $output_objdir/${outputname}S.${objext}"
4774 $run $rm "$output_objdir/${outputname}S.${objext}"
4780 if test -n "$shlibpath_var"; then
4781 # We should set the shlibpath_var
4783 for dir
in $temp_rpath; do
4785 [\\/]* |
[A-Za-z
]:[\\/]*)
4790 # Relative path: add a thisdir entry.
4791 rpath
="$rpath\$thisdir/$dir:"
4798 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4799 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4801 if test -n "$finalize_shlibpath"; then
4802 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4807 if test -n "$runpath_var"; then
4808 if test -n "$perm_rpath"; then
4809 # We should set the runpath_var.
4811 for dir
in $perm_rpath; do
4814 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4816 if test -n "$finalize_perm_rpath"; then
4817 # We should set the runpath_var.
4819 for dir
in $finalize_perm_rpath; do
4822 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
4826 if test "$no_install" = yes; then
4827 # We don't need to create a wrapper script.
4828 link_command
="$compile_var$compile_command$compile_rpath"
4829 # Replace the output file specification.
4830 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4831 # Delete the old output file.
4833 # Link the executable and exit
4834 $show "$link_command"
4835 $run eval "$link_command" ||
exit $?
4839 if test "$hardcode_action" = relink
; then
4840 # Fast installation is not supported
4841 link_command
="$compile_var$compile_command$compile_rpath"
4842 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4844 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4845 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4847 if test "$fast_install" != no
; then
4848 link_command
="$finalize_var$compile_command$finalize_rpath"
4849 if test "$fast_install" = yes; then
4850 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4852 # fast_install is set to needless
4856 link_command
="$compile_var$compile_command$compile_rpath"
4857 relink_command
="$finalize_var$finalize_command$finalize_rpath"
4861 # Replace the output file specification.
4862 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4864 # Delete the old output files.
4865 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
4867 $show "$link_command"
4868 $run eval "$link_command" ||
exit $?
4870 # Now create the wrapper script.
4871 $show "creating $output"
4873 # Quote the relink command for shipping.
4874 if test -n "$relink_command"; then
4875 # Preserve any variables that may affect compiler behavior
4876 for var
in $variables_saved_for_relink; do
4877 if eval test -z \"\
${$var+set}\"; then
4878 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4879 elif eval var_value
=\$
$var; test -z "$var_value"; then
4880 relink_command
="$var=; export $var; $relink_command"
4882 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4883 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4886 relink_command
="(cd `pwd`; $relink_command)"
4887 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4890 # Quote $echo for shipping.
4891 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
4893 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $0 --fallback-echo";;
4894 *) qecho
="$SHELL `pwd`/$0 --fallback-echo";;
4896 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4898 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4901 # Only actually do things if our run command is non-null.
4902 if test -z "$run"; then
4903 # win32 will think the script is a binary if it has
4904 # a .exe suffix, so we strip it off here.
4906 *.exe
) output
=`$echo $output|${SED} 's,.exe$,,'` ;;
4908 # test for cygwin because mv fails w/o .exe extensions
4912 outputname
=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4917 cwrappersource
=`$echo ${output_objdir}/lt-${outputname}.c`
4918 cwrapper
=`$echo ${output}.exe`
4919 $rm $cwrappersource $cwrapper
4920 trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
4922 cat > $cwrappersource <<EOF
4924 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4925 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4927 The $output program cannot be directly executed until all the libtool
4928 libraries that it depends on are installed.
4930 This wrapper executable should never be moved out of the build directory.
4931 If it is, it will not operate correctly.
4933 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4934 but could eventually absorb all of the scripts functionality and
4935 exec $objdir/$outputname directly.
4938 cat >> $cwrappersource<<"EOF"
4946 #if defined(PATH_MAX)
4947 # define LT_PATHMAX PATH_MAX
4948 #elif defined(MAXPATHLEN)
4949 # define LT_PATHMAX MAXPATHLEN
4951 # define LT_PATHMAX 1024
4954 #ifndef DIR_SEPARATOR
4955 #define DIR_SEPARATOR '/'
4958 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4960 #define HAVE_DOS_BASED_FILE_SYSTEM
4961 #ifndef DIR_SEPARATOR_2
4962 #define DIR_SEPARATOR_2 '\\'
4966 #ifndef DIR_SEPARATOR_2
4967 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4968 #else /* DIR_SEPARATOR_2 */
4969 # define IS_DIR_SEPARATOR(ch) \
4970 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4971 #endif /* DIR_SEPARATOR_2 */
4973 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4974 #define XFREE(stale) do { \
4975 if (stale) { free ((void *) stale); stale = 0; } \
4978 const char *program_name = NULL;
4980 void * xmalloc (size_t num);
4981 char * xstrdup (const char *string);
4982 char * basename (const char *name);
4983 char * fnqualify(const char *path);
4984 char * strendzap(char *str, const char *pat);
4985 void lt_fatal (const char *message, ...);
4988 main (int argc, char *argv[])
4993 program_name = (char *) xstrdup ((char *) basename (argv[0]));
4994 newargz = XMALLOC(char *, argc+2);
4997 cat >> $cwrappersource <<EOF
4998 newargz[0] = "$SHELL";
5001 cat >> $cwrappersource <<"EOF"
5002 newargz
[1] = fnqualify
(argv
[0]);
5003 /* we know the
script has the same name
, without the .exe
*/
5004 /* so
make sure newargz
[1] doesn
't end in .exe */
5005 strendzap(newargz[1],".exe");
5006 for (i = 1; i < argc; i++)
5007 newargz[i+1] = xstrdup(argv[i]);
5008 newargz[argc+1] = NULL;
5011 cat >> $cwrappersource <<EOF
5012 execv("$SHELL",newargz);
5015 cat >> $cwrappersource <<"EOF"
5019 xmalloc (size_t num)
5021 void * p = (void *) malloc (num);
5023 lt_fatal ("Memory exhausted");
5029 xstrdup (const char *string)
5031 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5036 basename (const char *name)
5040 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5041 /* Skip over the disk name in MSDOS pathnames. */
5042 if (isalpha (name[0]) && name[1] == ':')
5046 for (base = name; *name; name++)
5047 if (IS_DIR_SEPARATOR (*name))
5049 return (char *) base;
5053 fnqualify(const char *path)
5057 char tmp[LT_PATHMAX + 1];
5059 assert(path != NULL);
5061 /* Is it qualified already? */
5062 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5063 if (isalpha (path[0]) && path[1] == ':')
5064 return xstrdup (path);
5066 if (IS_DIR_SEPARATOR (path[0]))
5067 return xstrdup (path);
5069 /* prepend the current directory */
5070 /* doesn't handle
'~' */
5071 if (getcwd
(tmp
, LT_PATHMAX
) == NULL
)
5072 lt_fatal
("getcwd failed");
5073 size
= strlen
(tmp
) + 1 + strlen
(path
) + 1; /* +2 for '/' and
'\0' */
5074 p
= XMALLOC
(char
, size
);
5075 sprintf
(p
, "%s%c%s", tmp
, DIR_SEPARATOR
, path
);
5080 strendzap
(char
*str
, const char
*pat
)
5084 assert
(str
!= NULL
);
5085 assert
(pat
!= NULL
);
5088 patlen
= strlen
(pat
);
5092 str
+= len
- patlen
;
5093 if (strcmp
(str
, pat
) == 0)
5100 lt_error_core
(int exit_status
, const char
* mode
,
5101 const char
* message
, va_list ap
)
5103 fprintf
(stderr
, "%s: %s: ", program_name
, mode
);
5104 vfprintf
(stderr
, message
, ap
);
5105 fprintf
(stderr
, ".\n");
5107 if (exit_status
>= 0)
5112 lt_fatal
(const char
*message
, ...
)
5115 va_start
(ap
, message
);
5116 lt_error_core
(EXIT_FAILURE
, "FATAL", message
, ap
);
5120 # we should really use a build-platform specific compiler
5121 # here, but OTOH, the wrappers (shell script and this C one)
5122 # are only useful if you want to execute the "real" binary.
5123 # Since the "real" binary is built for $host, then this
5124 # wrapper might as well be built for $host, too.
5125 $run $LTCC -s -o $cwrapper $cwrappersource
5129 trap "$rm $output; exit 1" 1 2 15
5134 # $output - temporary wrapper script for $objdir/$outputname
5135 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5137 # The $output program cannot be directly executed until all the libtool
5138 # libraries that it depends on are installed.
5140 # This wrapper script should never be moved out of the build directory.
5141 # If it is, it will not operate correctly.
5143 # Sed substitution that helps us do robust quoting. It backslashifies
5144 # metacharacters that are still active within double-quoted strings.
5145 Xsed='${SED} -e 1s/^X//'
5146 sed_quote_subst='$sed_quote_subst'
5148 # The HP-UX ksh and POSIX shell print the target directory to stdout
5150 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5152 relink_command=\"$relink_command\"
5154 # This environment variable determines our operation mode.
5155 if test \"\$libtool_install_magic\" = \"$magic\"; then
5156 # install mode needs the following variable:
5157 notinst_deplibs='$notinst_deplibs'
5159 # When we are sourced in execute mode, \$file and \$echo are already set.
5160 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5163 # Make sure echo works.
5164 if test \"X\$1\" = X--no-reexec; then
5165 # Discard the --no-reexec flag, and continue.
5167 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5168 # Yippee, \$echo works!
5171 # Restart under the correct shell, and then maybe \$echo will work.
5172 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5178 # Find the directory that this script lives in.
5179 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5180 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5182 # Follow symbolic links until we get to the real thisdir.
5183 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5184 while test -n \"\$file\"; do
5185 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5187 # If there was a directory component, then change thisdir.
5188 if test \"x\$destdir\" != \"x\$file\"; then
5189 case \"\$destdir\" in
5190 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5191 *) thisdir=\"\$thisdir/\$destdir\" ;;
5195 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5196 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5199 # Try to get the absolute directory name.
5200 absdir=\`cd \"\$thisdir\" && pwd\`
5201 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5204 if test "$fast_install" = yes; then
5206 program=lt-'$outputname'$exeext
5207 progdir=\"\$thisdir/$objdir\"
5209 if test ! -f \"\$progdir/\$program\" || \\
5210 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5211 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5213 file=\"\$\$-\$program\"
5215 if test ! -d \"\$progdir\"; then
5216 $mkdir \"\$progdir\"
5218 $rm \"\$progdir/\$file\"
5223 # relink executable if necessary
5224 if test -n \"\$relink_command\"; then
5225 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5227 $echo \"\$relink_command_output\" >&2
5228 $rm \"\$progdir/\$file\"
5233 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5234 { $rm \"\$progdir/\$program\";
5235 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5236 $rm \"\$progdir/\$file\"
5240 program='$outputname'
5241 progdir=\"\$thisdir/$objdir\"
5247 if test -f \"\$progdir/\$program\"; then"
5249 # Export our shlibpath_var if we have one.
5250 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5252 # Add our own library path to $shlibpath_var
5253 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5255 # Some systems cannot cope with colon-terminated $shlibpath_var
5256 # The second colon is a workaround for a bug in BeOS R4 sed
5257 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5259 export $shlibpath_var
5263 # fixup the dll searchpath if we need to.
5264 if test -n "$dllsearchpath"; then
5266 # Add the dll search path components to the executable PATH
5267 PATH=$dllsearchpath:\$PATH
5272 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5273 # Run the actual program with our arguments.
5276 # Backslashes separate directories on plain windows
5277 *-*-mingw |
*-*-os2*)
5279 exec \$progdir\\\\\$program \${1+\"\$@\"}
5284 # Need to set LD_LIBRARY_PATH, to the value already
5285 # computed within libtool.
5287 LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"}
5292 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5296 # The program doesn't exist.
5297 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5298 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5299 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5310 # See if we need to build an old-fashioned archive.
5311 for oldlib
in $oldlibs; do
5313 if test "$build_libtool_libs" = convenience
; then
5314 oldobjs
="$libobjs_save"
5315 addlibs
="$convenience"
5316 build_libtool_libs
=no
5318 if test "$build_libtool_libs" = module
; then
5319 oldobjs
="$libobjs_save"
5320 build_libtool_libs
=no
5322 oldobjs
="$old_deplibs $non_pic_objects"
5324 addlibs
="$old_convenience"
5327 if test -n "$addlibs"; then
5328 gentop
="$output_objdir/${outputname}x"
5329 $show "${rm}r $gentop"
5330 $run ${rm}r
"$gentop"
5331 $show "$mkdir $gentop"
5332 $run $mkdir "$gentop"
5334 if test "$status" -ne 0 && test ! -d "$gentop"; then
5337 generated
="$generated $gentop"
5339 # Add in members from convenience archives.
5340 for xlib
in $addlibs; do
5341 # Extract the objects.
5343 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
5344 *) xabs
=`pwd`"/$xlib" ;;
5346 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5347 xdir
="$gentop/$xlib"
5349 $show "${rm}r $xdir"
5351 $show "$mkdir $xdir"
5354 if test "$status" -ne 0 && test ! -d "$xdir"; then
5357 # We will extract separately just the conflicting names and we will no
5358 # longer touch any unique names. It is faster to leave these extract
5359 # automatically by $AR in one run.
5360 $show "(cd $xdir && $AR x $xabs)"
5361 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
5362 if ($AR t
"$xabs" |
sort |
sort -uc >/dev
/null
2>&1); then
5365 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5366 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5367 $AR t
"$xabs" |
sort |
uniq -cd |
while read -r count name
5370 while test "$i" -le "$count"
5372 # Put our $i before any first dot (extension)
5373 # Never overwrite any file
5375 while test "X$name_to" = "X$name" ||
test -f "$xdir/$name_to"
5377 name_to
=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5379 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5380 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" ||
exit $?
5386 oldobjs
="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5390 compiler_flags
="$compiler_flags $add_flags"
5392 # Do each command in the archive commands.
5393 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5394 eval cmds
=\"$old_archive_from_new_cmds\"
5396 eval cmds
=\"$old_archive_cmds\"
5398 if len
=`expr "X$cmds" : ".*"` &&
5399 test "$len" -le "$max_cmd_len" ||
test "$max_cmd_len" -le -1; then
5402 # the command line is too long to link in one step, link in parts
5403 $echo "using piecewise archive linking..."
5408 save_oldobjs
=$oldobjs
5409 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5410 # encoded into archives. This makes 'ar r' malfunction in
5411 # this piecewise linking case whenever conflicting object
5412 # names appear in distinct ar calls; check, warn and compensate.
5413 if (for obj
in $save_oldobjs
5415 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
5416 done |
sort |
sort -uc >/dev
/null
2>&1); then
5419 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5420 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5423 # Is there a better way of finding the last object in the list?
5424 for obj
in $save_oldobjs
5428 for obj
in $save_oldobjs
5430 oldobjs
="$objlist $obj"
5431 objlist
="$objlist $obj"
5432 eval test_cmds
=\"$old_archive_cmds\"
5433 if len
=`expr "X$test_cmds" : ".*"` &&
5434 test "$len" -le "$max_cmd_len"; then
5437 # the above command should be used before it gets too long
5439 if test "$obj" = "$last_oldobj" ; then
5442 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
5443 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
5449 if test "X$oldobjs" = "X" ; then
5450 eval cmds
=\"\
$concat_cmds\"
5452 eval cmds
=\"\
$concat_cmds~
$old_archive_cmds\"
5456 save_ifs
="$IFS"; IFS
='~'
5457 for cmd
in $cmds; do
5460 $run eval "$cmd" ||
exit $?
5465 if test -n "$generated"; then
5466 $show "${rm}r$generated"
5467 $run ${rm}r
$generated
5470 # Now create the libtool archive.
5474 test "$build_old_libs" = yes && old_library
="$libname.$libext"
5475 $show "creating $output"
5477 # Preserve any variables that may affect compiler behavior
5478 for var
in $variables_saved_for_relink; do
5479 if eval test -z \"\
${$var+set}\"; then
5480 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5481 elif eval var_value
=\$
$var; test -z "$var_value"; then
5482 relink_command
="$var=; export $var; $relink_command"
5484 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5485 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
5488 # Quote the link command for shipping.
5489 relink_command
="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
5490 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5491 if test "$hardcode_automatic" = yes ; then
5494 # Only create the output if not a dry run.
5495 if test -z "$run"; then
5496 for installed
in no
yes; do
5497 if test "$installed" = yes; then
5498 if test -z "$install_libdir"; then
5501 output
="$output_objdir/$outputname"i
5502 # Replace all uninstalled libtool libraries with the installed ones
5504 for deplib
in $dependency_libs; do
5507 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5508 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5509 if test -z "$libdir"; then
5510 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5513 newdependency_libs
="$newdependency_libs $libdir/$name"
5515 *) newdependency_libs
="$newdependency_libs $deplib" ;;
5518 dependency_libs
="$newdependency_libs"
5520 for lib
in $dlfiles; do
5521 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5522 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5523 if test -z "$libdir"; then
5524 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5527 newdlfiles
="$newdlfiles $libdir/$name"
5529 dlfiles
="$newdlfiles"
5531 for lib
in $dlprefiles; do
5532 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5533 eval libdir
=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5534 if test -z "$libdir"; then
5535 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5538 newdlprefiles
="$newdlprefiles $libdir/$name"
5540 dlprefiles
="$newdlprefiles"
5543 # place dlname in correct position for cygwin
5545 case $host,$output,$installed,$module,$dlname in
5546 *cygwin
*,*lai
,yes,no
,*.dll |
*mingw
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
5549 # $outputname - a libtool library file
5550 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5552 # Please DO NOT delete this file!
5553 # It is necessary for linking the library.
5555 # The name that we can dlopen(3).
5558 # Names of this library.
5559 library_names='$library_names'
5561 # The name of the static archive.
5562 old_library='$old_library'
5564 # Libraries that this one depends upon.
5565 dependency_libs='$dependency_libs'
5567 # Version information for $libname.
5572 # Is this an already installed library?
5573 installed=$installed
5575 # Should we warn about portability when linking against -modules?
5576 shouldnotlink=$module
5578 # Files to dlopen/dlpreopen
5580 dlpreopen='$dlprefiles'
5582 # Directory that this library needs to be installed in:
5583 libdir='$install_libdir'"
5584 if test "$installed" = no
&& test "$need_relink" = yes && test "$fast_install" = no
; then
5586 relink_command=\"$relink_command\""
5591 # Do a symbolic link so that the libtool archive can be found in
5592 # LD_LIBRARY_PATH before the program is installed.
5593 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5594 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
5600 # libtool install mode
5602 modename
="$modename: install"
5604 # There may be an optional sh(1) argument at the beginning of
5605 # install_prog (especially on Windows NT).
5606 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
5607 # Allow the use of GNU shtool's install command.
5608 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
5609 # Aesthetically quote it.
5610 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5612 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5616 install_prog
="$arg "
5624 # The real first argument should be the name of the installation program.
5625 # Aesthetically quote it.
5626 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5628 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5632 install_prog
="$install_prog$arg"
5634 # We need to accept at least all the BSD install flags.
5644 if test -n "$dest"; then
5645 files
="$files $dest"
5663 # If the previous option needed an argument, then skip it.
5664 if test -n "$prev"; then
5673 # Aesthetically quote the argument.
5674 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5676 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5680 install_prog
="$install_prog $arg"
5683 if test -z "$install_prog"; then
5684 $echo "$modename: you must specify an install program" 1>&2
5689 if test -n "$prev"; then
5690 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5695 if test -z "$files"; then
5696 if test -z "$dest"; then
5697 $echo "$modename: no file or destination specified" 1>&2
5699 $echo "$modename: you must specify a destination" 1>&2
5705 # Strip any trailing slash from the destination.
5706 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5708 # Check to see that the destination is a directory.
5709 test -d "$dest" && isdir
=yes
5710 if test "$isdir" = yes; then
5714 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5715 test "X$destdir" = "X$dest" && destdir
=.
5716 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5718 # Not a directory, so check to see that there is only one file specified.
5720 if test "$#" -gt 2; then
5721 $echo "$modename: \`$dest' is not a directory" 1>&2
5727 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
5729 for file in $files; do
5733 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5742 # This variable tells wrapper scripts just to set variables rather
5743 # than running their programs.
5744 libtool_install_magic
="$magic"
5749 for file in $files; do
5751 # Do each installation.
5754 # Do the static libraries later.
5755 staticlibs
="$staticlibs $file"
5759 # Check to see that this really is a libtool archive.
5760 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5762 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5770 # If there is no directory component, then add one.
5772 */* |
*\\*) .
$file ;;
5776 # Add the libdir to current_libdirs if it is the destination.
5777 if test "X$destdir" = "X$libdir"; then
5778 case "$current_libdirs " in
5780 *) current_libdirs
="$current_libdirs $libdir" ;;
5783 # Note the libdir as a future libdir.
5784 case "$future_libdirs " in
5786 *) future_libdirs
="$future_libdirs $libdir" ;;
5790 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5791 test "X$dir" = "X$file/" && dir
=
5794 if test -n "$relink_command"; then
5795 # Determine the prefix the user has applied to our future dir.
5796 inst_prefix_dir
=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5798 # Don't allow the user to place us outside of our expected
5799 # location b/c this prevents finding dependent libraries that
5800 # are installed to the same prefix.
5801 # At present, this check doesn't affect windows .dll's that
5802 # are installed into $libdir/../bin (currently, that works fine)
5803 # but it's something to keep an eye on.
5804 if test "$inst_prefix_dir" = "$destdir"; then
5805 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5809 if test -n "$inst_prefix_dir"; then
5810 # Stick the inst_prefix_dir data into the link command.
5811 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5813 relink_command
=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5816 $echo "$modename: warning: relinking \`$file'" 1>&2
5817 $show "$relink_command"
5818 if $run eval "$relink_command"; then :
5820 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5825 # See the names of the shared library.
5826 set dummy
$library_names
5827 if test -n "$2"; then
5833 test -n "$relink_command" && srcname
="$realname"T
5835 # Install the shared library and build the symlinks.
5836 $show "$install_prog $dir/$srcname $destdir/$realname"
5837 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
5838 if test -n "$stripme" && test -n "$striplib"; then
5839 $show "$striplib $destdir/$realname"
5840 $run eval "$striplib $destdir/$realname" ||
exit $?
5843 if test "$#" -gt 0; then
5844 # Delete the old symlinks, and create new ones.
5847 if test "$linkname" != "$realname"; then
5848 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5849 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5854 # Do each command in the postinstall commands.
5855 lib
="$destdir/$realname"
5856 eval cmds
=\"$postinstall_cmds\"
5857 save_ifs
="$IFS"; IFS
='~'
5858 for cmd
in $cmds; do
5861 $run eval "$cmd" ||
exit $?
5866 # Install the pseudo-library for information purposes.
5867 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5868 instname
="$dir/$name"i
5869 $show "$install_prog $instname $destdir/$name"
5870 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
5872 # Maybe install the static library, too.
5873 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
5877 # Install (i.e. copy) a libtool object.
5879 # Figure out destination file name, if it wasn't already specified.
5880 if test -n "$destname"; then
5881 destfile
="$destdir/$destname"
5883 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5884 destfile
="$destdir/$destfile"
5887 # Deduce the name of the destination old-style object file.
5890 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5893 staticdest
="$destfile"
5897 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5903 # Install the libtool object if requested.
5904 if test -n "$destfile"; then
5905 $show "$install_prog $file $destfile"
5906 $run eval "$install_prog $file $destfile" ||
exit $?
5909 # Install the old object if enabled.
5910 if test "$build_old_libs" = yes; then
5911 # Deduce the name of the old-style object file.
5912 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
5914 $show "$install_prog $staticobj $staticdest"
5915 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
5921 # Figure out destination file name, if it wasn't already specified.
5922 if test -n "$destname"; then
5923 destfile
="$destdir/$destname"
5925 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5926 destfile
="$destdir/$destfile"
5929 # If the file is missing, and there is a .exe on the end, strip it
5930 # because it is most likely a libtool script we actually want to
5935 if test ! -f "$file"; then
5936 file=`$echo $file|${SED} 's,.exe$,,'`
5942 # Do a test to see if this is really a libtool program.
5945 wrapper
=`$echo $file | ${SED} -e 's,.exe$,,'`
5951 if (${SED} -e '4q' $wrapper |
grep "^# Generated by .*$PACKAGE")>/dev
/null
2>&1; then
5955 # To insure that "foo" is sourced, and not "foo.exe",
5956 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5957 # which disallows the automatic-append-.exe behavior.
5959 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
5960 *) wrapperdot
=${wrapper} ;;
5962 # If there is no directory component, then add one.
5964 */* |
*\\*) .
${wrapperdot} ;;
5965 *) . .
/${wrapperdot} ;;
5968 # Check the variables that should have been set.
5969 if test -z "$notinst_deplibs"; then
5970 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5975 for lib
in $notinst_deplibs; do
5976 # Check to see that each library is installed.
5978 if test -f "$lib"; then
5979 # If there is no directory component, then add one.
5981 */* |
*\\*) .
$lib ;;
5985 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
5986 if test -n "$libdir" && test ! -f "$libfile"; then
5987 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
5993 # To insure that "foo" is sourced, and not "foo.exe",
5994 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5995 # which disallows the automatic-append-.exe behavior.
5997 *cygwin
* |
*mingw
*) wrapperdot
=${wrapper}.
;;
5998 *) wrapperdot
=${wrapper} ;;
6000 # If there is no directory component, then add one.
6002 */* |
*\\*) .
${wrapperdot} ;;
6003 *) . .
/${wrapperdot} ;;
6007 if test "$fast_install" = no
&& test -n "$relink_command"; then
6008 if test "$finalize" = yes && test -z "$run"; then
6010 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
6011 tmpdir
="$tmpdir/libtool-$$"
6012 if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
6014 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6017 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6018 outputname
="$tmpdir/$file"
6019 # Replace the output file specification.
6020 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6022 $show "$relink_command"
6023 if $run eval "$relink_command"; then :
6025 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6031 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6034 # Install the binary that we compiled earlier.
6035 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6039 # remove .exe since cygwin /usr/bin/install will append another
6041 case $install_prog,$host in
6042 */usr
/bin
/install*,*cygwin
*)
6043 case $file:$destfile in
6048 destfile
=$destfile.exe
6051 destfile
=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6056 $show "$install_prog$stripme $file $destfile"
6057 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
6058 test -n "$outputname" && ${rm}r
"$tmpdir"
6063 for file in $staticlibs; do
6064 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6066 # Set up the ranlib parameters.
6067 oldlib
="$destdir/$name"
6069 $show "$install_prog $file $oldlib"
6070 $run eval "$install_prog \$file \$oldlib" ||
exit $?
6072 if test -n "$stripme" && test -n "$striplib"; then
6073 $show "$old_striplib $oldlib"
6074 $run eval "$old_striplib $oldlib" ||
exit $?
6077 # Do each command in the postinstall commands.
6078 eval cmds
=\"$old_postinstall_cmds\"
6079 save_ifs
="$IFS"; IFS
='~'
6080 for cmd
in $cmds; do
6083 $run eval "$cmd" ||
exit $?
6088 if test -n "$future_libdirs"; then
6089 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6092 if test -n "$current_libdirs"; then
6093 # Maybe just do a dry run.
6094 test -n "$run" && current_libdirs
=" -n$current_libdirs"
6095 exec_cmd
='$SHELL $0 --finish$current_libdirs'
6101 # libtool finish mode
6103 modename
="$modename: finish"
6107 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6110 libdirs
="$libdirs $dir"
6113 for libdir
in $libdirs; do
6114 if test -n "$finish_cmds"; then
6115 # Do each command in the finish commands.
6116 eval cmds
=\"$finish_cmds\"
6117 save_ifs
="$IFS"; IFS
='~'
6118 for cmd
in $cmds; do
6121 $run eval "$cmd" || admincmds
="$admincmds
6126 if test -n "$finish_eval"; then
6127 # Do the single finish_eval.
6128 eval cmds
=\"$finish_eval\"
6129 $run eval "$cmds" || admincmds
="$admincmds
6135 # Exit here if they wanted silent mode.
6138 $echo "----------------------------------------------------------------------"
6139 $echo "Libraries have been installed in:"
6140 for libdir
in $libdirs; do
6144 $echo "If you ever happen to want to link against installed libraries"
6145 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6146 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6147 $echo "flag during linking and do at least one of the following:"
6148 if test -n "$shlibpath_var"; then
6149 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6150 $echo " during execution"
6152 if test -n "$runpath_var"; then
6153 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6154 $echo " during linking"
6156 if test -n "$hardcode_libdir_flag_spec"; then
6158 eval flag
=\"$hardcode_libdir_flag_spec\"
6160 $echo " - use the \`$flag' linker flag"
6162 if test -n "$admincmds"; then
6163 $echo " - have your system administrator run these commands:$admincmds"
6165 if test -f /etc
/ld.so.conf
; then
6166 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6169 $echo "See any operating system documentation about shared libraries for"
6170 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6171 $echo "----------------------------------------------------------------------"
6175 # libtool execute mode
6177 modename
="$modename: execute"
6179 # The first argument is the command name.
6181 if test -z "$cmd"; then
6182 $echo "$modename: you must specify a COMMAND" 1>&2
6187 # Handle -dlopen flags immediately.
6188 for file in $execute_dlfiles; do
6189 if test ! -f "$file"; then
6190 $echo "$modename: \`$file' is not a file" 1>&2
6198 # Check to see that this really is a libtool archive.
6199 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
6201 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6206 # Read the libtool library.
6210 # If there is no directory component, then add one.
6212 */* |
*\\*) .
$file ;;
6216 # Skip this library if it cannot be dlopened.
6217 if test -z "$dlname"; then
6218 # Warn if it was a shared library.
6219 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6223 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6224 test "X$dir" = "X$file" && dir
=.
6226 if test -f "$dir/$objdir/$dlname"; then
6229 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6235 # Just add the directory containing the .lo file.
6236 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6237 test "X$dir" = "X$file" && dir
=.
6241 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6246 # Get the absolute pathname.
6247 absdir
=`cd "$dir" && pwd`
6248 test -n "$absdir" && dir
="$absdir"
6250 # Now add the directory to shlibpath_var.
6251 if eval "test -z \"\$$shlibpath_var\""; then
6252 eval "$shlibpath_var=\"\$dir\""
6254 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6258 # This variable tells wrapper scripts just to set shlibpath_var
6259 # rather than running their programs.
6260 libtool_execute_magic
="$magic"
6262 # Check if any of the arguments is a wrapper script.
6269 # Do a test to see if this is really a libtool program.
6270 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6271 # If there is no directory component, then add one.
6273 */* |
*\\*) .
$file ;;
6277 # Transform arg to wrapped name.
6278 file="$progdir/$program"
6282 # Quote arguments (to preserve shell metacharacters).
6283 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6284 args
="$args \"$file\""
6287 if test -z "$run"; then
6288 if test -n "$shlibpath_var"; then
6289 # Export the shlibpath_var.
6290 eval "export $shlibpath_var"
6293 # Restore saved environment variables
6294 if test "${save_LC_ALL+set}" = set; then
6295 LC_ALL
="$save_LC_ALL"; export LC_ALL
6297 if test "${save_LANG+set}" = set; then
6298 LANG
="$save_LANG"; export LANG
6301 # Now prepare to actually exec the command.
6302 exec_cmd
="\$cmd$args"
6304 # Display what would be done.
6305 if test -n "$shlibpath_var"; then
6306 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6307 $echo "export $shlibpath_var"
6314 # libtool clean and uninstall mode
6316 modename
="$modename: $mode"
6322 # This variable tells wrapper scripts just to set variables rather
6323 # than running their programs.
6324 libtool_install_magic
="$magic"
6329 -f) rm="$rm $arg"; rmforce
=yes ;;
6330 -*) rm="$rm $arg" ;;
6331 *) files
="$files $arg" ;;
6335 if test -z "$rm"; then
6336 $echo "$modename: you must specify an RM program" 1>&2
6343 origobjdir
="$objdir"
6344 for file in $files; do
6345 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6346 if test "X$dir" = "X$file"; then
6348 objdir
="$origobjdir"
6350 objdir
="$dir/$origobjdir"
6352 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6353 test "$mode" = uninstall
&& objdir
="$dir"
6355 # Remember objdir for removal later, being careful to avoid duplicates
6356 if test "$mode" = clean
; then
6359 *) rmdirs
="$rmdirs $objdir" ;;
6363 # Don't error if the file doesn't exist and rm -f was used.
6364 if (test -L "$file") >/dev
/null
2>&1 \
6365 ||
(test -h "$file") >/dev
/null
2>&1 \
6366 ||
test -f "$file"; then
6368 elif test -d "$file"; then
6371 elif test "$rmforce" = yes; then
6379 # Possibly a libtool archive, so verify it.
6380 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6383 # Delete the libtool libraries and symlinks.
6384 for n
in $library_names; do
6385 rmfiles
="$rmfiles $objdir/$n"
6387 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
6388 test "$mode" = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
6390 if test "$mode" = uninstall
; then
6391 if test -n "$library_names"; then
6392 # Do each command in the postuninstall commands.
6393 eval cmds
=\"$postuninstall_cmds\"
6394 save_ifs
="$IFS"; IFS
='~'
6395 for cmd
in $cmds; do
6399 if test "$?" -ne 0 && test "$rmforce" != yes; then
6406 if test -n "$old_library"; then
6407 # Do each command in the old_postuninstall commands.
6408 eval cmds
=\"$old_postuninstall_cmds\"
6409 save_ifs
="$IFS"; IFS
='~'
6410 for cmd
in $cmds; do
6414 if test "$?" -ne 0 && test "$rmforce" != yes; then
6420 # FIXME: should reinstall the best remaining shared library.
6426 # Possibly a libtool object, so verify it.
6427 if (${SED} -e '2q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6432 # Add PIC object to the list of files to remove.
6433 if test -n "$pic_object" \
6434 && test "$pic_object" != none
; then
6435 rmfiles
="$rmfiles $dir/$pic_object"
6438 # Add non-PIC object to the list of files to remove.
6439 if test -n "$non_pic_object" \
6440 && test "$non_pic_object" != none
; then
6441 rmfiles
="$rmfiles $dir/$non_pic_object"
6447 if test "$mode" = clean
; then
6451 file=`$echo $file|${SED} 's,.exe$,,'`
6452 noexename
=`$echo $name|${SED} 's,.exe$,,'`
6453 # $file with .exe has already been added to rmfiles,
6454 # add $file without .exe
6455 rmfiles
="$rmfiles $file"
6458 # Do a test to see if this is a libtool program.
6459 if (${SED} -e '4q' $file |
grep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
6463 # note $name still contains .exe if it was in $file originally
6464 # as does the version of $file that was added into $rmfiles
6465 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6466 if test "$fast_install" = yes && test -n "$relink_command"; then
6467 rmfiles
="$rmfiles $objdir/lt-$name"
6469 if test "X$noexename" != "X$name" ; then
6470 rmfiles
="$rmfiles $objdir/lt-${noexename}.c"
6476 $show "$rm $rmfiles"
6477 $run $rm $rmfiles || exit_status
=1
6479 objdir
="$origobjdir"
6481 # Try to remove the ${objdir}s in the directories where we deleted files
6482 for dir
in $rmdirs; do
6483 if test -d "$dir"; then
6485 $run rmdir $dir >/dev
/null
2>&1
6493 $echo "$modename: you must specify a MODE" 1>&2
6494 $echo "$generic_help" 1>&2
6499 if test -z "$exec_cmd"; then
6500 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6501 $echo "$generic_help" 1>&2
6504 fi # test -z "$show_help"
6506 if test -n "$exec_cmd"; then
6511 # We need to display help for each of the modes.
6514 "Usage: $modename [OPTION]... [MODE-ARG]...
6516 Provide generalized library-building support services.
6518 --config show all configuration variables
6519 --debug enable verbose shell tracing
6520 -n, --dry-run display commands without modifying any files
6521 --features display basic configuration information and exit
6522 --finish same as \`--mode=finish'
6523 --help display this help message and exit
6524 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6525 --quiet same as \`--silent'
6526 --silent don't print informational messages
6527 --tag=TAG use configuration variables from tag TAG
6528 --version print version information
6530 MODE must be one of the following:
6532 clean remove files from the build directory
6533 compile compile a source file into a libtool object
6534 execute automatically set library path, then run a program
6535 finish complete the installation of libtool libraries
6536 install install libraries or executables
6537 link create a library or an executable
6538 uninstall remove libraries from an installed directory
6540 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6541 a more detailed description of MODE.
6543 Report bugs to <bug-libtool@gnu.org>."
6549 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6551 Remove files from the build directory.
6553 RM is the name of the program to use to delete files associated with each FILE
6554 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6557 If FILE is a libtool library, object or program, all the files associated
6558 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6563 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6565 Compile a source file into a libtool library object.
6567 This mode accepts the following additional options:
6569 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6570 -prefer-pic try to building PIC objects only
6571 -prefer-non-pic try to building non-PIC objects only
6572 -static always build a \`.o' file suitable for static linking
6574 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6575 from the given SOURCEFILE.
6577 The output file name is determined by removing the directory component from
6578 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6579 library object suffix, \`.lo'."
6584 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6586 Automatically set library path, then run a program.
6588 This mode accepts the following additional options:
6590 -dlopen FILE add the directory containing FILE to the library path
6592 This mode sets the library path environment variable according to \`-dlopen'
6595 If any of the ARGS are libtool executable wrappers, then they are translated
6596 into their corresponding uninstalled binary, and any of their required library
6597 directories are added to the library path.
6599 Then, COMMAND is executed, with ARGS as arguments."
6604 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6606 Complete the installation of libtool libraries.
6608 Each LIBDIR is a directory that contains libtool libraries.
6610 The commands that this mode executes may require superuser privileges. Use
6611 the \`--dry-run' option if you just want to see what would be executed."
6616 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6618 Install executables or libraries.
6620 INSTALL-COMMAND is the installation command. The first component should be
6621 either the \`install' or \`cp' program.
6623 The rest of the components are interpreted as arguments to that command (only
6624 BSD-compatible install options are recognized)."
6629 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6631 Link object files or libraries together to form another library, or to
6632 create an executable program.
6634 LINK-COMMAND is a command using the C compiler that you would use to create
6635 a program from several object files.
6637 The following components of LINK-COMMAND are treated specially:
6639 -all-static do not do any dynamic linking at all
6640 -avoid-version do not add a version suffix if possible
6641 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6642 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6643 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6644 -export-symbols SYMFILE
6645 try to export only the symbols listed in SYMFILE
6646 -export-symbols-regex REGEX
6647 try to export only the symbols matching REGEX
6648 -LLIBDIR search LIBDIR for required installed libraries
6649 -lNAME OUTPUT-FILE requires the installed library libNAME
6650 -module build a library that can dlopened
6651 -no-fast-install disable the fast-install mode
6652 -no-install link a not-installable executable
6653 -no-undefined declare that a library does not refer to external symbols
6654 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6655 -objectlist FILE Use a list of object files found in FILE to specify objects
6656 -release RELEASE specify package release information
6657 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6658 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6659 -static do not do any dynamic linking of libtool libraries
6660 -version-info CURRENT[:REVISION[:AGE]]
6661 specify library version info [each variable defaults to 0]
6663 All other options (arguments beginning with \`-') are ignored.
6665 Every other argument is treated as a filename. Files ending in \`.la' are
6666 treated as uninstalled libtool libraries, other files are standard or library
6669 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6670 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6671 required, except when creating a convenience library.
6673 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6674 using \`ar' and \`ranlib', or on Windows using \`lib'.
6676 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6677 is created, otherwise an executable program is created."
6682 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6684 Remove libraries from an installation directory.
6686 RM is the name of the program to use to delete files associated with each FILE
6687 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6690 If FILE is a libtool library, all the files associated with it are deleted.
6691 Otherwise, only FILE itself is deleted using RM."
6695 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6702 $echo "Try \`$modename --help' for more information about other modes."
6706 # The TAGs below are defined such that we never get into a situation
6707 # in which we disable both kinds of libraries. Given conflicting
6708 # choices, we go for a static library, that is the most portable,
6709 # since we can't tell whether shared libraries were disabled because
6710 # the user asked for that or because the platform doesn't support
6711 # them. This is particularly important on AIX, because we don't
6712 # support having both static and shared libraries enabled at the same
6713 # time on that platform, so we default to a shared-only configuration.
6714 # If a disable-shared tag is given, we'll fallback to a static-only
6715 # configuration. But we'll never go from static-only to shared-only.
6717 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6718 build_libtool_libs
=no
6720 # ### END LIBTOOL TAG CONFIG: disable-shared
6722 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6723 build_old_libs
=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6724 # ### END LIBTOOL TAG CONFIG: disable-static
6730 # ### BEGIN LIBTOOL TAG CONFIG: CXX
6732 # Libtool was configured on host yannick:
6734 # Shell to use when invoking shell scripts.
6737 # Whether or not to build shared libraries.
6738 build_libtool_libs
=yes
6740 # Whether or not to build static libraries.
6743 # Whether or not to add -lc for building shared libraries.
6744 build_libtool_need_lc
=no
6746 # Whether or not to disallow shared libs when runtime libs are static
6747 allow_libtool_libs_with_static_runtimes
=no
6749 # Whether or not to optimize for fast installation.
6754 host=i686-pc-linux-gnu
6756 # An echo program that does not interpret backslashes.
6766 # A language-specific compiler.
6769 # Is the compiler the GNU C compiler?
6775 # The linker used to build libraries.
6778 # Whether we need hard or soft links.
6781 # A BSD-compatible nm program.
6784 # A symbol stripping program
6787 # Used to examine libraries when file_magic_cmd begins "file"
6790 # Used on cygwin: DLL creation program.
6793 # Used on cygwin: object dumper.
6796 # Used on cygwin: assembler.
6799 # The name of the directory that contains temporary libtool files.
6802 # How to create reloadable object files.
6804 reload_cmds
="\$LD\$reload_flag -o \$output\$reload_objs"
6806 # How to pass a linker flag through the compiler.
6809 # Object file suffix (normally "o").
6812 # Old archive suffix (normally "a").
6815 # Shared library suffix (normally ".so").
6818 # Executable file suffix (normally "").
6821 # Additional compiler flags for building library objects.
6822 pic_flag
=" -fPIC -DPIC"
6825 # What is the maximum length of a command?
6828 # Does compiler simultaneously support -c and -o options?
6831 # Must we lock files when doing compilation ?
6834 # Do we need the lib prefix for modules?
6837 # Do we need a version for libraries?
6840 # Whether dlopen is supported.
6843 # Whether dlopen of programs is supported.
6846 # Whether dlopen of statically linked programs is supported.
6847 dlopen_self_static
=yes
6849 # Compiler flag to prevent dynamic linking.
6850 link_static_flag
="-static"
6852 # Compiler flag to turn off builtin functions.
6853 no_builtin_flag
=" -fno-builtin"
6855 # Compiler flag to allow reflexive dlopens.
6856 export_dynamic_flag_spec
="\${wl}--export-dynamic"
6858 # Compiler flag to generate shared objects directly from archives.
6859 whole_archive_flag_spec
="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
6861 # Compiler flag to generate thread-safe objects.
6862 thread_safe_flag_spec
=""
6864 # Library versioning type.
6867 # Format of library name prefix.
6868 libname_spec
="lib\$name"
6870 # List of archive names. First name is the real one, the rest are links.
6871 # The last name is the one that the linker finds with -lNAME.
6872 library_names_spec
="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6874 # The coded name of the library, if different from the real name.
6875 soname_spec
="\${libname}\${release}\${shared_ext}\$major"
6877 # Commands used to build and install an old-style archive.
6879 old_archive_cmds
="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6880 old_postinstall_cmds
="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6881 old_postuninstall_cmds
=""
6883 # Create an old-style archive from a shared archive.
6884 old_archive_from_new_cmds
=""
6886 # Create a temporary old-style archive to link instead of a shared archive.
6887 old_archive_from_expsyms_cmds
=""
6889 # Commands used to build and install a shared archive.
6890 archive_cmds
="\$CC -shared -nostdlib \$compiler_flags \$predep_objects \$libobjs \$deplibs \$postdep_objects \${wl}-soname \$wl\$soname -o \$lib"
6891 archive_expsym_cmds
="\$CC -shared -nostdlib \$compiler_flags \$predep_objects \$libobjs \$deplibs \$postdep_objects \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
6893 postuninstall_cmds
=""
6895 # Commands used to build a loadable module (assumed same as above if empty)
6897 module_expsym_cmds
=""
6899 # Commands to strip libraries.
6900 old_striplib
="strip --strip-debug"
6901 striplib
="strip --strip-unneeded"
6903 # Dependencies to place before the objects being linked to create a
6905 predep_objects
="/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.1.2/crtbeginS.o"
6907 # Dependencies to place after the objects being linked to create a
6909 postdep_objects
="/usr/lib/gcc/i486-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o"
6911 # Dependencies to place before the objects being linked to create a
6915 # Dependencies to place after the objects being linked to create a
6917 postdeps
="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
6919 # The library search path used internally by the compiler when linking
6921 compiler_lib_search_path
="-L/usr/lib/gcc/i486-linux-gnu/4.1.2 -L/usr/lib/gcc/i486-linux-gnu/4.1.2 -L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib"
6923 # Method to check whether dependent libraries are shared objects.
6924 deplibs_check_method
="pass_all"
6926 # Command to use when deplibs_check_method == file_magic.
6927 file_magic_cmd
="\$MAGIC_CMD"
6929 # Flag that allows shared libraries with undefined symbols to be built.
6930 allow_undefined_flag
=""
6932 # Flag that forces no undefined symbols.
6933 no_undefined_flag
=""
6935 # Commands used to finish a libtool library installation in a directory.
6936 finish_cmds
="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
6938 # Same as above, but a single script fragment to be evaled but not shown.
6941 # Take the output of nm and produce a listing of raw symbols and C names.
6942 global_symbol_pipe
="sed -n -e 's/^.*[ ]\\([ABCDGISTW][ABCDGISTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
6944 # Transform the output of nm in a proper C declaration
6945 global_symbol_to_cdecl
="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
6947 # Transform the output of nm in a C name address pair
6948 global_symbol_to_c_name_address
="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
6950 # This is the shared library runtime path variable.
6951 runpath_var
=LD_RUN_PATH
6953 # This is the shared library path variable.
6954 shlibpath_var
=LD_LIBRARY_PATH
6956 # Is shlibpath searched before the hard-coded library search path?
6957 shlibpath_overrides_runpath
=no
6959 # How to hardcode a shared library path into an executable.
6960 hardcode_action
=immediate
6962 # Whether we should hardcode library paths into libraries.
6963 hardcode_into_libs
=yes
6965 # Flag to hardcode $libdir into a binary during linking.
6966 # This must work even if $libdir does not exist.
6967 hardcode_libdir_flag_spec
="\${wl}--rpath \${wl}\$libdir"
6969 # If ld is used when linking, flag to hardcode $libdir into
6970 # a binary during linking. This must work even if $libdir does
6972 hardcode_libdir_flag_spec_ld
=""
6974 # Whether we need a single -rpath flag with a separated argument.
6975 hardcode_libdir_separator
=""
6977 # Set to yes if using DIR/libNAME during linking hardcodes DIR into the
6981 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6985 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6986 # the resulting binary.
6987 hardcode_shlibpath_var
=
6989 # Set to yes if building a shared library automatically hardcodes DIR into the library
6990 # and all subsequent libraries and executables linked against it.
6991 hardcode_automatic
=no
6993 # Variables whose values should be saved in libtool wrapper scripts and
6994 # restored at relink time.
6995 variables_saved_for_relink
="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6997 # Whether libtool must link a program against all its dependency libraries.
6998 link_all_deplibs
=unknown
7000 # Compile-time system search path for libraries
7001 sys_lib_search_path_spec
="/lib /usr/lib /usr/local/lib"
7003 # Run-time system search path for libraries
7004 sys_lib_dlsearch_path_spec
="/lib /usr/lib"
7006 # Fix the shell variable $srcfile for the compiler.
7009 # Set to yes if exported symbols are required.
7010 always_export_symbols
=no
7012 # The commands to list exported symbols.
7013 export_symbols_cmds
="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7015 # The commands to extract the exported symbol list from a shared archive.
7016 extract_expsyms_cmds
=""
7018 # Symbols that should not be listed in the preloaded symbols.
7021 # Symbols that must always be exported.
7024 # ### END LIBTOOL TAG CONFIG: CXX