1 # ltmain.sh - Provide generalized library-building support services.
2 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5 # Free Software Foundation, Inc.
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
27 # Check that we have a working $echo.
28 if test "X$1" = X--no-reexec
; then
29 # Discard the --no-reexec flag, and continue.
31 elif test "X$1" = X--fallback-echo
; then
32 # Avoid inline document here, it may be left over
34 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
35 # Yippee, $echo works!
38 # Restart under the correct shell, and then maybe $echo will work.
39 exec $SHELL "$0" --no-reexec ${1+"$@"}
42 if test "X$1" = X--fallback-echo
; then
43 # used as fallback echo
51 # The name of this program.
52 progname
=`$echo "$0" | sed 's%^.*/%%'`
59 TIMESTAMP
=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
62 help="Try \`$progname --help' for more information."
63 magic
="%%%MAGIC variable%%%"
68 # Sed substitution that helps us do robust quoting. It backslashifies
69 # metacharacters that are still active within double-quoted strings.
71 sed_quote_subst
='s/\([\\`\\"$\\\\]\)/\\\1/g'
73 NL2SP
='tr \015\012 \040\040'
76 # Only set LANG and LC_ALL to C if already set.
77 # These must not be set unconditionally because not all systems understand
78 # e.g. LANG=C (notably SCO).
79 # We save the old values to restore during execute mode.
80 if test "${LC_ALL+set}" = set; then
81 save_LC_ALL
="$LC_ALL"; LC_ALL
=C
; export LC_ALL
83 if test "${LANG+set}" = set; then
84 save_LANG
="$LANG"; LANG
=C
; export LANG
87 if test "$LTCONFIG_VERSION" != "$VERSION"; then
88 echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
89 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
93 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
94 echo "$modename: not configured to build any kind of library" 1>&2
95 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
108 lo2o
="s/\\.lo\$/.${objext}/"
109 o2lo
="s/\\.${objext}\$/.lo/"
112 # Parse our command line options once, thoroughly.
119 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
123 # If the previous option needs an argument, assign it.
124 if test -n "$prev"; then
127 execute_dlfiles
="$execute_dlfiles $arg"
132 # Check whether tagname contains only valid characters
135 echo "$progname: invalid tag name: $tagname" 1>&2
142 # Don't test for the "default" C tag, as we know, it's there, but
143 # not specially marked.
144 taglist
="$taglist $tagname"
147 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev
/null
; then
148 taglist
="$taglist $tagname"
149 # Evaluate the configuration.
150 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
152 echo "$progname: ignoring unknown tag $tagname" 1>&2
167 # Have we seen a non-optional argument yet?
174 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
179 sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
180 # Now print the configurations for the tags.
181 for tagname
in $taglist; do
182 sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
188 echo "$progname: enabling shell trace mode"
198 if test "$build_libtool_libs" = yes; then
199 echo "enable shared libraries"
201 echo "disable shared libraries"
203 if test "$build_old_libs" = yes; then
204 echo "enable static libraries"
206 echo "disable static libraries"
211 --finish) mode
="finish" ;;
213 --mode) prevopt
="--mode" prev
=mode
;;
214 --mode=*) mode
="$optarg" ;;
220 --tag) prevopt
="--tag" prev
=tag
;;
222 set tag
"$optarg" ${1+"$@"}
233 $echo "$modename: unrecognized option \`$arg'" 1>&2
245 if test -n "$prevopt"; then
246 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
251 # If this variable is set in any of the actions, the command in it
252 # will be execed at the end. This prevents here-documents from being
253 # left over by shells.
256 if test -z "$show_help"; then
258 # Infer the operation mode.
259 if test -z "$mode"; then
261 *cc |
*++ | gcc
* |
*-gcc*)
273 *db |
*dbx |
*strace |
*truss
)
283 # If we have no mode, but dlfiles were specified, then do execute mode.
284 test -n "$execute_dlfiles" && mode
=execute
286 # Just use the default operation mode.
287 if test -z "$mode"; then
288 if test -n "$nonopt"; then
289 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
291 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
298 # Only execute mode is allowed to have -dlopen flags.
299 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
300 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
305 # Change the help message to a mode-specific one.
307 help="Try \`$modename --help --mode=$mode' for more information."
309 # These modes are in order of execution frequency so that they run quickly.
311 # libtool compile mode
313 modename
="$modename: compile"
314 # Get the compilation command and the source file.
327 # Aesthetically quote the previous argument.
329 lastarg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
332 # Double-quote args containing other shell metacharacters.
333 # Many Bourne shells cannot handle close brackets correctly
334 # in scan sets, so we specify it separately.
335 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
340 # Add the previous argument to base_compile.
341 if test -z "$base_compile"; then
342 base_compile
="$lastarg"
344 base_compile
="$base_compile $lastarg"
350 # Accept any command-line options.
353 if test "$user_target" != "no"; then
354 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
381 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
383 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
387 # Double-quote args containing other shell metacharacters.
388 # Many Bourne shells cannot handle close brackets correctly
389 # in scan sets, so we specify it separately.
391 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
395 lastarg
="$lastarg $arg"
398 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
400 # Add the arguments to base_compile.
401 if test -z "$base_compile"; then
402 base_compile
="$lastarg"
404 base_compile
="$base_compile $lastarg"
412 # The next one is the -o target name
417 # We got the output file
424 # Accept the current argument as the source file.
428 # Aesthetically quote the previous argument.
430 # Backslashify any backslashes, double quotes, and dollar signs.
431 # These are the only characters that are still specially
432 # interpreted inside of double-quoted scrings.
433 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
435 # Double-quote args containing other shell metacharacters.
436 # Many Bourne shells cannot handle close brackets correctly
437 # in scan sets, so we specify it separately.
439 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
440 lastarg
="\"$lastarg\""
444 # Add the previous argument to base_compile.
445 if test -z "$base_compile"; then
446 base_compile
="$lastarg"
448 base_compile
="$base_compile $lastarg"
456 # Get the name of the library object.
457 libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
460 $echo "$modename: you must specify a target with \`-o'" 1>&2
465 # Recognize several different file suffixes.
466 # If the user specifies -o file.o, it is replaced with file.lo
475 *.class
) xform
=class
;;
480 *.java
) xform
=java
;;
483 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
486 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
488 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
493 # Infer tagged configuration to use if any are available and
494 # if one wasn't chosen via the "--tag" command line option.
495 # Only attempt this if the compiler in the base compile
496 # command doesn't match the default compiler.
497 if test -n "$available_tags" && test -z "$tagname"; then
498 case $base_compile in
500 # Blanks in the command may have been stripped by the calling shell,
501 # but not from the CC environment variable when ltconfig was run.
504 for z
in $available_tags; do
505 if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
506 # Evaluate the configuration.
507 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
508 case $base_compile in
510 # The compiler in the base compile command matches
511 # the one in the tagged configuration.
512 # Assume this is the tagged configuration we want.
523 # If $tagname still isn't set, then no tagged configuration
524 # was found and let the user know that the "--tag" command
525 # line option must be used.
526 if test -z "$tagname"; then
527 echo "$modename: unable to infer tagged configuration"
528 echo "$modename: specify a tag with \`--tag'" 1>&2
531 # echo "$modename: using $tagname tagged configuration"
537 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
538 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
539 if test "X$xdir" = "X$obj"; then
544 lobj
=${xdir}$objdir/$objname
546 if test -z "$base_compile"; then
547 $echo "$modename: you must specify a compilation command" 1>&2
552 # Delete any leftover library objects.
553 if test "$build_old_libs" = yes; then
554 removelist
="$obj $lobj $libobj ${libobj}T"
556 removelist
="$lobj $libobj ${libobj}T"
560 trap "$run $rm $removelist; exit 1" 1 2 15
562 # On Cygwin there's no "real" PIC flag so we must build both object types
564 cygwin
* | mingw
* | pw32
* | os2
*)
568 if test $pic_mode = no
&& test "$deplibs_check_method" != pass_all
; then
569 # non-PIC code in shared libraries is not supported
573 # Calculate the filename of the output object if compiler does
574 # not support -o with -c
575 if test "$compiler_c_o" = no
; then
576 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
577 lockfile
="$output_obj.lock"
578 removelist
="$removelist $output_obj $lockfile"
579 trap "$run $rm $removelist; exit 1" 1 2 15
586 # Lock this critical section if it is needed
587 # We use this script file to make the link, it avoids creating a new file
588 if test "$need_locks" = yes; then
589 until $run ln "$0" "$lockfile" 2>/dev
/null
; do
590 $show "Waiting for $lockfile to be removed"
593 elif test "$need_locks" = warn
; then
594 if test -f "$lockfile"; then
596 *** ERROR, $lockfile exists and contains:
597 `cat $lockfile 2>/dev/null`
599 This indicates that another process is trying to use the same
600 temporary object file, and libtool could not work around it because
601 your compiler does not support \`-c' and \`-o' together. If you
602 repeat this compilation, it may succeed, by chance, but you had better
603 avoid parallel builds (make -j) in this platform, or get a better
609 echo $srcfile > "$lockfile"
612 if test -n "$fix_srcfile_path"; then
613 eval srcfile
=\"$fix_srcfile_path\"
616 $run $rm "$libobj" "${libobj}T"
618 # Create a libtool object file (analogous to a ".la" file),
619 # but don't create it if we're doing a dry run.
620 test -z "$run" && cat > ${libobj}T
<<EOF
621 # $libobj - a libtool object file
622 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
624 # Please DO NOT delete this file!
625 # It is necessary for linking the library.
627 # Name of the PIC object.
630 # Only build a PIC object if we are building libtool libraries.
631 if test "$build_libtool_libs" = yes; then
632 # Without this assignment, base_compile gets emptied.
633 fbsd_hideous_sh_bug
=$base_compile
635 if test "$pic_mode" != no
; then
636 command="$base_compile $srcfile $pic_flag"
638 # Don't build PIC code
639 command="$base_compile $srcfile"
642 if test ! -d ${xdir}$objdir; then
643 $show "$mkdir ${xdir}$objdir"
644 $run $mkdir ${xdir}$objdir
646 if test $status -ne 0 && test ! -d ${xdir}$objdir; then
651 if test -z "$output_obj"; then
652 # Place PIC objects in $objdir
653 command="$command -o $lobj"
656 $run $rm "$lobj" "$output_obj"
659 if $run eval "$command"; then :
661 test -n "$output_obj" && $run $rm $removelist
665 if test "$need_locks" = warn
&&
666 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
668 *** ERROR, $lockfile contains:
669 `cat $lockfile 2>/dev/null`
671 but it should contain:
674 This indicates that another process is trying to use the same
675 temporary object file, and libtool could not work around it because
676 your compiler does not support \`-c' and \`-o' together. If you
677 repeat this compilation, it may succeed, by chance, but you had better
678 avoid parallel builds (make -j) in this platform, or get a better
685 # Just move the object if needed, then go on to compile the next one
686 if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
687 $show "$mv $output_obj $lobj"
688 if $run $mv $output_obj $lobj; then :
696 # Append the name of the PIC object to the libtool object file.
697 test -z "$run" && cat >> ${libobj}T
<<EOF
698 pic_object='$objdir/$objname'
702 # Allow error messages only from the first compilation.
703 suppress_output
=' >/dev/null 2>&1'
705 # No PIC object so indicate it doesn't exist in the libtool
707 test -z "$run" && cat >> ${libobj}T
<<EOF
713 # Only build a position-dependent object if we build old libraries.
714 if test "$build_old_libs" = yes; then
715 if test "$pic_mode" != yes; then
716 # Don't build PIC code
717 command="$base_compile $srcfile"
719 command="$base_compile $srcfile $pic_flag"
721 if test "$compiler_c_o" = yes; then
722 command="$command -o $obj"
725 # Suppress compiler output if we already did a PIC compilation.
726 command="$command$suppress_output"
727 $run $rm "$obj" "$output_obj"
729 if $run eval "$command"; then :
735 if test "$need_locks" = warn
&&
736 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
738 *** ERROR, $lockfile contains:
739 `cat $lockfile 2>/dev/null`
741 but it should contain:
744 This indicates that another process is trying to use the same
745 temporary object file, and libtool could not work around it because
746 your compiler does not support \`-c' and \`-o' together. If you
747 repeat this compilation, it may succeed, by chance, but you had better
748 avoid parallel builds (make -j) in this platform, or get a better
755 # Just move the object if needed
756 if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
757 $show "$mv $output_obj $obj"
758 if $run $mv $output_obj $obj; then :
766 # Append the name of the non-PIC object the libtool object file.
767 # Only append if the libtool object file exists.
768 test -z "$run" && cat >> ${libobj}T
<<EOF
769 # Name of the non-PIC object.
770 non_pic_object='$objname'
774 # Append the name of the non-PIC object the libtool object file.
775 # Only append if the libtool object file exists.
776 test -z "$run" && cat >> ${libobj}T
<<EOF
777 # Name of the non-PIC object.
783 $run $mv "${libobj}T" "${libobj}"
785 # Unlock the critical section if it was locked
786 if test "$need_locks" != no
; then
795 modename
="$modename: link"
797 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
798 # It is impossible to link a dll without this setting, and
799 # we shouldn't force the makefile maintainer to figure out
800 # which system we are compiling for in order to pass an extra
801 # flag for every libtool invokation.
804 # FIXME: Unfortunately, there are problems with the above when trying
805 # to make a dll which has undefined symbols, in which case not
806 # even a static library is built. For now, we need to specify
807 # -no-undefined on the libtool link line when we can be certain
808 # that all symbols are satisfied, otherwise we get a static library.
815 libtool_args
="$nonopt"
816 base_compile
="$nonopt"
817 compile_command
="$nonopt"
818 finalize_command
="$nonopt"
831 lib_search_path
=`pwd`
839 export_symbols_regex
=
847 prefer_static_libs
=no
859 # We need to know -static, to get the right output filenames.
863 -all-static |
-static)
864 if test "X$arg" = "X-all-static"; then
865 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
866 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
868 if test -n "$link_static_flag"; then
869 dlopen_self
=$dlopen_self_static
872 if test -z "$pic_flag" && test -n "$link_static_flag"; then
873 dlopen_self
=$dlopen_self_static
876 build_libtool_libs
=no
878 prefer_static_libs
=yes
884 # See if our shared archives depend on static archives.
885 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
887 # Go through the arguments, transforming them on the way.
888 while test $# -gt 0; do
890 base_compile
="$base_compile $arg"
893 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
894 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
898 libtool_args
="$libtool_args $qarg"
900 # If the previous option needs an argument, assign it.
901 if test -n "$prev"; then
904 compile_command
="$compile_command @OUTPUT@"
905 finalize_command
="$finalize_command @OUTPUT@"
911 if test "$preload" = no
; then
912 # Add the symbol object into the linking commands.
913 compile_command
="$compile_command @SYMFILE@"
914 finalize_command
="$finalize_command @SYMFILE@"
918 *.la |
*.lo
) ;; # We handle these cases below.
920 if test "$dlself" = no
; then
928 if test "$prev" = dlprefiles
; then
930 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
940 if test "$prev" = dlfiles
; then
941 dlfiles
="$dlfiles $arg"
943 dlprefiles
="$dlprefiles $arg"
951 export_symbols
="$arg"
952 if test ! -f "$arg"; then
953 $echo "$modename: symbol file \`$arg' does not exist"
960 export_symbols_regex
="$arg"
970 if test -f "$arg"; then
973 for fil
in `cat $save_arg`
975 # moreargs="$moreargs $fil"
977 # A libtool-controlled object.
979 # Check to see that this really is a libtool object.
980 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
985 # If there is no directory component, then add one.
987 */* |
*\\*) .
$arg ;;
991 if test -z "$pic_object" || \
992 test -z "$non_pic_object" ||
993 test "$pic_object" = none
&& \
994 test "$non_pic_object" = none
; then
995 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
999 # Extract subdirectory from the argument.
1000 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1001 if test "X$xdir" = "X$arg"; then
1007 if test "$pic_object" != none
; then
1008 # Prepend the subdirectory the object is found in.
1009 pic_object
="$xdir$pic_object"
1011 if test "$prev" = dlfiles
; then
1012 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1013 dlfiles
="$dlfiles $pic_object"
1017 # If libtool objects are unsupported, then we need to preload.
1022 # CHECK ME: I think I busted this. -Ossama
1023 if test "$prev" = dlprefiles
; then
1024 # Preload the old-style object.
1025 dlprefiles
="$dlprefiles $pic_object"
1030 libobjs
="$libobjs $pic_object"
1035 if test "$non_pic_object" != none
; then
1036 # Prepend the subdirectory the object is found in.
1037 non_pic_object
="$xdir$non_pic_object"
1039 # A standard non-PIC object
1040 non_pic_objects
="$non_pic_objects $non_pic_object"
1041 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1042 arg
="$non_pic_object"
1046 # Only an error if not doing a dry-run.
1047 if test -z "$run"; then
1048 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1053 # Extract subdirectory from the argument.
1054 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1055 if test "X$xdir" = "X$arg"; then
1061 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1062 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1063 libobjs
="$libobjs $pic_object"
1064 non_pic_objects
="$non_pic_objects $non_pic_object"
1069 $echo "$modename: link input file \`$save_arg' does not exist"
1077 # We need an absolute path.
1079 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1081 $echo "$modename: only absolute run-paths are allowed" 1>&2
1085 if test "$prev" = rpath
; then
1088 *) rpath
="$rpath $arg" ;;
1093 *) xrpath
="$xrpath $arg" ;;
1100 compiler_flags
="$compiler_flags $qarg"
1102 compile_command
="$compile_command $qarg"
1103 finalize_command
="$finalize_command $qarg"
1107 linker_flags
="$linker_flags $qarg"
1108 compiler_flags
="$compiler_flags $wl$qarg"
1110 compile_command
="$compile_command $wl$qarg"
1111 finalize_command
="$finalize_command $wl$qarg"
1115 eval "$prev=\"\$arg\""
1126 if test -n "$link_static_flag"; then
1127 compile_command
="$compile_command $link_static_flag"
1128 finalize_command
="$finalize_command $link_static_flag"
1134 # FIXME: remove this flag sometime in the future.
1135 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1159 -export-symbols |
-export-symbols-regex)
1160 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1161 $echo "$modename: more than one -exported-symbols argument is not allowed"
1164 if test "X$arg" = "X-export-symbols"; then
1172 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1173 # so, if we see these flags be careful not to treat them like -L
1175 case $with_gcc/$host in
1177 compile_command
="$compile_command $arg"
1178 finalize_command
="$finalize_command $arg"
1185 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1186 # We need an absolute path.
1188 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1190 absdir
=`cd "$dir" && pwd`
1191 if test -z "$absdir"; then
1192 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1201 deplibs
="$deplibs -L$dir"
1202 lib_search_path
="$lib_search_path $dir"
1206 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1207 case :$dllsearchpath: in
1209 *) dllsearchpath
="$dllsearchpath:$dir";;
1217 if test "X$arg" = "X-lc" ||
test "X$arg" = "X-lm"; then
1219 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1220 # These systems don't actually have a C or math library (as such)
1223 *-*-mingw* |
*-*-os2*)
1224 # These systems don't actually have a C library (as such)
1225 test "X$arg" = "X-lc" && continue
1229 deplibs
="$deplibs $arg"
1245 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1246 # The PATH hackery in wrapper scripts is required on Windows
1247 # in order for the loader to find any dlls it needs.
1248 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1249 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1252 *) no_install
=yes ;;
1285 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1286 # We need an absolute path.
1288 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1290 $echo "$modename: only absolute run-paths are allowed" 1>&2
1296 *) xrpath
="$xrpath $dir" ;;
1302 # The effects of -static are defined in a previous loop.
1303 # We used to do the same as -all-static on platforms that
1304 # didn't have a PIC flag, but the assumption that the effects
1305 # would be equivalent was wrong. It would break on at least
1306 # Digital Unix and AIX.
1321 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1323 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
1324 for flag
in $args; do
1327 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1332 compiler_flags
="$compiler_flags $flag"
1335 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1339 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1341 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
1342 for flag
in $args; do
1345 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1350 compiler_flags
="$compiler_flags $wl$flag"
1351 linker_flags
="$linker_flags $flag"
1354 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1367 # Some other compiler flag.
1369 # Unknown arguments in both finalize_command and compile_command need
1370 # to be aesthetically quoted because they are evaled later.
1371 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1373 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1380 # A standard object.
1385 # A libtool-controlled object.
1387 # Check to see that this really is a libtool object.
1388 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1393 # If there is no directory component, then add one.
1395 */* |
*\\*) .
$arg ;;
1399 if test -z "$pic_object" || \
1400 test -z "$non_pic_object" ||
1401 test "$pic_object" = none
&& \
1402 test "$non_pic_object" = none
; then
1403 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1407 # Extract subdirectory from the argument.
1408 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1409 if test "X$xdir" = "X$arg"; then
1415 if test "$pic_object" != none
; then
1416 # Prepend the subdirectory the object is found in.
1417 pic_object
="$xdir$pic_object"
1419 if test "$prev" = dlfiles
; then
1420 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1421 dlfiles
="$dlfiles $pic_object"
1425 # If libtool objects are unsupported, then we need to preload.
1430 # CHECK ME: I think I busted this. -Ossama
1431 if test "$prev" = dlprefiles
; then
1432 # Preload the old-style object.
1433 dlprefiles
="$dlprefiles $pic_object"
1438 libobjs
="$libobjs $pic_object"
1443 if test "$non_pic_object" != none
; then
1444 # Prepend the subdirectory the object is found in.
1445 non_pic_object
="$xdir$non_pic_object"
1447 # A standard non-PIC object
1448 non_pic_objects
="$non_pic_objects $non_pic_object"
1449 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1450 arg
="$non_pic_object"
1454 # Only an error if not doing a dry-run.
1455 if test -z "$run"; then
1456 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1461 # Extract subdirectory from the argument.
1462 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1463 if test "X$xdir" = "X$arg"; then
1469 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1470 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1471 libobjs
="$libobjs $pic_object"
1472 non_pic_objects
="$non_pic_objects $non_pic_object"
1479 deplibs
="$deplibs $arg"
1480 old_deplibs
="$old_deplibs $arg"
1485 # A libtool-controlled library.
1487 if test "$prev" = dlfiles
; then
1488 # This library was specified with -dlopen.
1489 dlfiles
="$dlfiles $arg"
1491 elif test "$prev" = dlprefiles
; then
1492 # The library was specified with -dlpreopen.
1493 dlprefiles
="$dlprefiles $arg"
1496 deplibs
="$deplibs $arg"
1501 # Some other compiler argument.
1503 # Unknown arguments in both finalize_command and compile_command need
1504 # to be aesthetically quoted because they are evaled later.
1505 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1507 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1514 # Now actually substitute the argument into the commands.
1515 if test -n "$arg"; then
1516 compile_command
="$compile_command $arg"
1517 finalize_command
="$finalize_command $arg"
1519 done # argument parsing loop
1521 if test -n "$prev"; then
1522 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1527 # Infer tagged configuration to use if any are available and
1528 # if one wasn't chosen via the "--tag" command line option.
1529 # Only attempt this if the compiler in the base link
1530 # command doesn't match the default compiler.
1531 if test -n "$available_tags" && test -z "$tagname"; then
1532 case $base_compile in
1534 # Blanks in the command may have been stripped by the calling shell,
1535 # but not from the CC environment variable when ltconfig was run.
1538 for z
in $available_tags; do
1539 if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
1540 # Evaluate the configuration.
1541 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1542 case $base_compile in
1544 # The compiler in $compile_command matches
1545 # the one in the tagged configuration.
1546 # Assume this is the tagged configuration we want.
1557 # If $tagname still isn't set, then no tagged configuration
1558 # was found and let the user know that the "--tag" command
1559 # line option must be used.
1560 if test -z "$tagname"; then
1561 echo "$modename: unable to infer tagged configuration"
1562 echo "$modename: specify a tag with \`--tag'" 1>&2
1565 # echo "$modename: using $tagname tagged configuration"
1571 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1572 eval arg
=\"$export_dynamic_flag_spec\"
1573 compile_command
="$compile_command $arg"
1574 finalize_command
="$finalize_command $arg"
1577 # calculate the name of the file, without its directory
1578 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1579 libobjs_save
="$libobjs"
1581 if test -n "$shlibpath_var"; then
1582 # get the directories listed in $shlibpath_var
1583 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1587 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
1588 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
1590 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1591 if test "X$output_objdir" = "X$output"; then
1592 output_objdir
="$objdir"
1594 output_objdir
="$output_objdir/$objdir"
1596 # Create the object directory.
1597 if test ! -d $output_objdir; then
1598 $show "$mkdir $output_objdir"
1599 $run $mkdir $output_objdir
1601 if test $status -ne 0 && test ! -d $output_objdir; then
1606 # Determine the type of output
1609 $echo "$modename: you must specify an output file" 1>&2
1613 *.
$libext) linkmode
=oldlib
;;
1614 *.lo |
*.
$objext) linkmode
=obj
;;
1615 *.la
) linkmode
=lib
;;
1616 *) linkmode
=prog
;; # Anything else should be a program.
1621 # Find all interdependent deplibs by searching for libraries
1622 # that are linked more than once (e.g. -la -lb -la)
1623 for deplib
in $deplibs; do
1625 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1627 libs
="$libs $deplib"
1630 if test $linkmode = lib
; then
1631 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
1633 # Compute libraries that are listed more than once in $predeps
1634 # $postdeps and mark them as special (i.e., whose duplicates are
1635 # not to be eliminated).
1637 for pre_post_dep
in $predeps $postdeps; do
1638 case "$pre_post_deps " in
1639 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
1641 pre_post_deps
="$pre_post_deps $pre_post_dep"
1649 need_relink
=no
# whether we're linking any uninstalled libtool libraries
1650 notinst_deplibs
= # not-installed libtool libraries
1651 notinst_path
= # paths that contain not-installed libtool libraries
1655 for file in $dlfiles $dlprefiles; do
1659 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1671 passes
="conv scan dlopen dlpreopen link"
1676 for pass
in $passes; do
1677 if test $linkmode = prog
; then
1678 # Determine which files to process
1682 save_deplibs
="$deplibs" # Collect dlpreopened libraries
1685 dlpreopen
) libs
="$dlprefiles" ;;
1686 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
1689 for deplib
in $libs; do
1694 if test $linkmode = oldlib
&& test $linkmode = obj
; then
1695 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
1698 if test $pass = conv
; then
1699 deplibs
="$deplib $deplibs"
1702 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1703 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1704 # Search the libtool library
1705 lib
="$searchdir/lib${name}.la"
1706 if test -f "$lib"; then
1711 if test "$found" != yes; then
1712 # deplib doesn't seem to be a libtool library
1713 if test "$linkmode,$pass" = "prog,link"; then
1714 compile_deplibs
="$deplib $compile_deplibs"
1715 finalize_deplibs
="$deplib $finalize_deplibs"
1717 deplibs
="$deplib $deplibs"
1718 test $linkmode = lib
&& newdependency_libs
="$deplib $newdependency_libs"
1726 deplibs
="$deplib $deplibs"
1727 test $pass = conv
&& continue
1728 newdependency_libs
="$deplib $newdependency_libs"
1729 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1732 if test $pass = conv
; then
1733 deplibs
="$deplib $deplibs"
1736 if test $pass = scan
; then
1737 deplibs
="$deplib $deplibs"
1738 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1740 compile_deplibs
="$deplib $compile_deplibs"
1741 finalize_deplibs
="$deplib $finalize_deplibs"
1745 $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
1751 if test $pass = link
; then
1752 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1753 # Make sure the xrpath contains only unique directories.
1756 *) xrpath
="$xrpath $dir" ;;
1759 deplibs
="$deplib $deplibs"
1762 *.la
) lib
="$deplib" ;;
1764 if test $pass = conv
; then
1765 deplibs
="$deplib $deplibs"
1770 if test "$deplibs_check_method" != pass_all
; then
1772 echo "*** Warning: This library needs some functionality provided by $deplib."
1773 echo "*** I have the capability to make that library automatically link in when"
1774 echo "*** you link to this library. But I can only do this if you have a"
1775 echo "*** shared version of the library, which you do not appear to have."
1778 echo "*** Warning: Linking the shared library $output against the"
1779 echo "*** static library $deplib is not portable!"
1780 deplibs
="$deplib $deplibs"
1785 if test $pass != link
; then
1786 deplibs
="$deplib $deplibs"
1788 compile_deplibs
="$deplib $compile_deplibs"
1789 finalize_deplibs
="$deplib $finalize_deplibs"
1796 if test $pass = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
1797 # If there is no dlopen support or we're linking statically,
1798 # we need to preload.
1799 newdlprefiles
="$newdlprefiles $deplib"
1800 compile_deplibs
="$deplib $compile_deplibs"
1801 finalize_deplibs
="$deplib $finalize_deplibs"
1803 newdlfiles
="$newdlfiles $deplib"
1812 if test $found = yes ||
test -f "$lib"; then :
1814 $echo "$modename: cannot find the library \`$lib'" 1>&2
1818 # Check to see that this really is a libtool archive.
1819 if (sed -e '2q' $lib |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
1821 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1825 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1826 test "X$ladir" = "X$lib" && ladir
="."
1834 # If the library was installed with an old release of libtool,
1835 # it will not redefine variable installed.
1840 */* |
*\\*) .
$lib ;;
1844 if test "$linkmode,$pass" = "lib,link" ||
1845 test "$linkmode,$pass" = "prog,scan" ||
1846 { test $linkmode = oldlib
&& test $linkmode = obj
; }; then
1847 # Add dl[pre]opened files of deplib
1848 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
1849 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
1852 if test $pass = conv
; then
1853 # Only check for convenience libraries
1854 deplibs
="$lib $deplibs"
1855 if test -z "$libdir"; then
1856 if test -z "$old_library"; then
1857 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1860 # It is a libtool convenience library, so add in its objects.
1861 convenience
="$convenience $ladir/$objdir/$old_library"
1862 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
1864 for deplib
in $dependency_libs; do
1865 deplibs
="$deplib $deplibs"
1866 case "$tmp_libs " in
1867 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1869 tmp_libs
="$tmp_libs $deplib"
1871 elif test $linkmode != prog
&& test $linkmode != lib
; then
1872 $echo "$modename: \`$lib' is not a convenience library" 1>&2
1878 # Get the name of the library we link against.
1880 for l
in $old_library $library_names; do
1883 if test -z "$linklib"; then
1884 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1888 # This library was specified with -dlopen.
1889 if test $pass = dlopen
; then
1890 if test -z "$libdir"; then
1891 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1894 if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
1895 # If there is no dlname, no dlopen support or we're linking
1896 # statically, we need to preload.
1897 dlprefiles
="$dlprefiles $lib"
1899 newdlfiles
="$newdlfiles $lib"
1904 # We need an absolute path.
1906 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
1908 abs_ladir
=`cd "$ladir" && pwd`
1909 if test -z "$abs_ladir"; then
1910 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1911 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1916 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1918 # Find the relevant object directory and library name.
1919 if test "X$installed" = Xyes
; then
1920 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1921 $echo "$modename: warning: library \`$lib' was moved." 1>&2
1930 dir
="$ladir/$objdir"
1931 absdir
="$abs_ladir/$objdir"
1932 # Remove this search path later
1933 notinst_path
="$notinst_path $abs_ladir"
1934 fi # $installed = yes
1935 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1937 # This library was specified with -dlpreopen.
1938 if test $pass = dlpreopen
; then
1939 if test -z "$libdir"; then
1940 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1943 # Prefer using a static library (so that no silly _DYNAMIC symbols
1944 # are required to link).
1945 if test -n "$old_library"; then
1946 newdlprefiles
="$newdlprefiles $dir/$old_library"
1947 # Otherwise, use the dlname, so that lt_dlopen finds it.
1948 elif test -n "$dlname"; then
1949 newdlprefiles
="$newdlprefiles $dir/$dlname"
1951 newdlprefiles
="$newdlprefiles $dir/$linklib"
1953 fi # $pass = dlpreopen
1955 if test -z "$libdir"; then
1956 # Link the convenience library
1957 if test $linkmode = lib
; then
1958 deplibs
="$dir/$old_library $deplibs"
1959 elif test "$linkmode,$pass" = "prog,link"; then
1960 compile_deplibs
="$dir/$old_library $compile_deplibs"
1961 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
1963 deplibs
="$lib $deplibs"
1968 if test $linkmode = prog
&& test $pass != link
; then
1969 newlib_search_path
="$newlib_search_path $ladir"
1970 deplibs
="$lib $deplibs"
1973 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
1974 test "$build_libtool_libs" = no
; then
1979 for deplib
in $dependency_libs; do
1981 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1983 # Need to link against all dependency_libs?
1984 if test $linkalldeplibs = yes; then
1985 deplibs
="$deplib $deplibs"
1987 # Need to hardcode shared library paths
1988 # or/and link against static libraries
1989 newdependency_libs
="$deplib $newdependency_libs"
1991 case "$tmp_libs " in
1992 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1994 tmp_libs
="$tmp_libs $deplib"
1997 fi # $linkmode = prog...
1999 link_static
=no
# Whether the deplib will be linked statically
2000 if test -n "$library_names" &&
2001 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2002 # Link against this shared library
2004 if test "$linkmode,$pass" = "prog,link" ||
2005 { test $linkmode = lib
&& test $hardcode_into_libs = yes; }; then
2006 # Hardcode the library path.
2007 # Skip directories that are in the system default run-time
2009 case " $sys_lib_dlsearch_path " in
2012 case "$compile_rpath " in
2014 *) compile_rpath
="$compile_rpath $absdir"
2018 case " $sys_lib_dlsearch_path " in
2021 case "$finalize_rpath " in
2023 *) finalize_rpath
="$finalize_rpath $libdir"
2027 if test $linkmode = prog
; then
2028 # We need to hardcode the library path
2029 if test -n "$shlibpath_var"; then
2030 # Make sure the rpath contains only unique directories.
2031 case "$temp_rpath " in
2034 *) temp_rpath
="$temp_rpath $dir" ;;
2038 fi # $linkmode,$pass = prog,link...
2040 if test "$alldeplibs" = yes &&
2041 { test "$deplibs_check_method" = pass_all ||
2042 { test "$build_libtool_libs" = yes &&
2043 test -n "$library_names"; }; }; then
2044 # We only need to search for static libraries
2048 if test "$installed" = no
; then
2049 notinst_deplibs
="$notinst_deplibs $lib"
2053 if test -n "$old_archive_from_expsyms_cmds"; then
2054 # figure out the soname
2055 set dummy
$library_names
2058 libname
=`eval \\$echo \"$libname_spec\"`
2059 # use dlname if we got it. it's perfectly good, no?
2060 if test -n "$dlname"; then
2062 elif test -n "$soname_spec"; then
2066 major
=`expr $current - $age`
2070 eval soname
=\"$soname_spec\"
2075 # Make a new name for the extract_expsyms_cmds to use
2077 soname
=`echo $soroot | sed -e 's/^.*\///'`
2078 newlib
="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
2080 # If the library has no export list, then create one now
2081 if test -f "$output_objdir/$soname-def"; then :
2083 $show "extracting exported symbol list from \`$soname'"
2084 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2085 eval cmds
=\"$extract_expsyms_cmds\"
2086 for cmd
in $cmds; do
2089 $run eval "$cmd" ||
exit $?
2095 if test -f "$output_objdir/$newlib"; then :; else
2096 $show "generating import library for \`$soname'"
2097 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2098 eval cmds
=\"$old_archive_from_expsyms_cmds\"
2099 for cmd
in $cmds; do
2102 $run eval "$cmd" ||
exit $?
2106 # make sure the library variables are pointing to the new library
2109 fi # test -n $old_archive_from_expsyms_cmds
2111 if test $linkmode = prog ||
test "$mode" != relink
; then
2116 case $hardcode_action in
2117 immediate | unsupported
)
2118 if test "$hardcode_direct" = no
; then
2120 elif test "$hardcode_minus_L" = no
; then
2122 *-*-sunos*) add_shlibpath
="$dir" ;;
2126 elif test "$hardcode_shlibpath_var" = no
; then
2127 add_shlibpath
="$dir"
2134 if test "$hardcode_direct" = yes; then
2136 elif test "$hardcode_minus_L" = yes; then
2139 elif test "$hardcode_shlibpath_var" = yes; then
2140 add_shlibpath
="$dir"
2149 if test "$lib_linked" != yes; then
2150 $echo "$modename: configuration error: unsupported hardcode properties"
2154 if test -n "$add_shlibpath"; then
2155 case :$compile_shlibpath: in
2156 *":$add_shlibpath:"*) ;;
2157 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2160 if test $linkmode = prog
; then
2161 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2162 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2164 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2165 test -n "$add" && deplibs
="$add $deplibs"
2166 if test "$hardcode_direct" != yes && \
2167 test "$hardcode_minus_L" != yes && \
2168 test "$hardcode_shlibpath_var" = yes; then
2169 case :$finalize_shlibpath: in
2171 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2177 if test $linkmode = prog ||
test "$mode" = relink
; then
2181 # Finalize command for both is simple: just hardcode it.
2182 if test "$hardcode_direct" = yes; then
2183 add
="$libdir/$linklib"
2184 elif test "$hardcode_minus_L" = yes; then
2187 elif test "$hardcode_shlibpath_var" = yes; then
2188 case :$finalize_shlibpath: in
2190 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2194 # We cannot seem to hardcode it, guess we'll fake it.
2199 if test $linkmode = prog
; then
2200 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
2201 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
2203 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2204 test -n "$add" && deplibs
="$add $deplibs"
2207 elif test $linkmode = prog
; then
2208 if test "$alldeplibs" = yes &&
2209 { test "$deplibs_check_method" = pass_all ||
2210 { test "$build_libtool_libs" = yes &&
2211 test -n "$library_names"; }; }; then
2212 # We only need to search for static libraries
2216 # Try to link the static library
2217 # Here we assume that one of hardcode_direct or hardcode_minus_L
2218 # is not unsupported. This is valid on all known static and
2220 if test "$hardcode_direct" != unsupported
; then
2221 test -n "$old_library" && linklib
="$old_library"
2222 compile_deplibs
="$dir/$linklib $compile_deplibs"
2223 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
2225 compile_deplibs
="-l$name -L$dir $compile_deplibs"
2226 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
2228 elif test "$build_libtool_libs" = yes; then
2229 # Not a shared library
2230 if test "$deplibs_check_method" != pass_all
; then
2231 # We're trying link a shared library against a static one
2232 # but the system doesn't support it.
2234 # Just print a warning and add the library to dependency_libs so
2235 # that the program can be linked against the static library.
2237 echo "*** Warning: This library needs some functionality provided by $lib."
2238 echo "*** I have the capability to make that library automatically link in when"
2239 echo "*** you link to this library. But I can only do this if you have a"
2240 echo "*** shared version of the library, which you do not appear to have."
2241 if test "$module" = yes; then
2242 echo "*** Therefore, libtool will create a static module, that should work "
2243 echo "*** as long as the dlopening application is linked with the -dlopen flag."
2244 if test -z "$global_symbol_pipe"; then
2246 echo "*** However, this would only work if libtool was able to extract symbol"
2247 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2248 echo "*** not find such a program. So, this module is probably useless."
2249 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2251 if test "$build_old_libs" = no
; then
2252 build_libtool_libs
=module
2255 build_libtool_libs
=no
2259 convenience
="$convenience $dir/$old_library"
2260 old_convenience
="$old_convenience $dir/$old_library"
2261 deplibs
="$dir/$old_library $deplibs"
2264 fi # link shared/static library?
2266 if test $linkmode = lib
; then
2267 if test -n "$dependency_libs" &&
2268 { test $hardcode_into_libs != yes ||
test $build_old_libs = yes ||
2269 test $link_static = yes; }; then
2270 # Extract -R from dependency_libs
2272 for libdir
in $dependency_libs; do
2274 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2276 *" $temp_xrpath "*) ;;
2277 *) xrpath
="$xrpath $temp_xrpath";;
2279 *) temp_deplibs
="$temp_deplibs $libdir";;
2282 dependency_libs
="$temp_deplibs"
2285 newlib_search_path
="$newlib_search_path $absdir"
2286 # Link against this library
2287 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
2288 # ... and its dependency_libs
2290 for deplib
in $dependency_libs; do
2291 newdependency_libs
="$deplib $newdependency_libs"
2292 case "$tmp_libs " in
2293 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2295 tmp_libs
="$tmp_libs $deplib"
2298 if test $link_all_deplibs != no
; then
2299 # Add the search paths of all dependency libraries
2300 for deplib
in $dependency_libs; do
2302 -L*) path
="$deplib" ;;
2304 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2305 test "X$dir" = "X$deplib" && dir
="."
2306 # We need an absolute path.
2308 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
2310 absdir
=`cd "$dir" && pwd`
2311 if test -z "$absdir"; then
2312 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2317 if grep "^installed=no" $deplib > /dev
/null
; then
2318 path
="-L$absdir/$objdir"
2320 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2321 if test -z "$libdir"; then
2322 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2325 if test "$absdir" != "$libdir"; then
2326 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2333 case " $deplibs " in
2335 *) deplibs
="$path $deplibs" ;;
2338 fi # link_all_deplibs != no
2340 done # for deplib in $libs
2341 if test $pass = dlpreopen
; then
2342 # Link the dlpreopened libraries before other libraries
2343 for deplib
in $save_deplibs; do
2344 deplibs
="$deplib $deplibs"
2347 if test $pass != dlopen
; then
2348 test $pass != scan
&& dependency_libs
="$newdependency_libs"
2349 if test $pass != conv
; then
2350 # Make sure lib_search_path contains only unique directories.
2352 for dir
in $newlib_search_path; do
2353 case "$lib_search_path " in
2355 *) lib_search_path
="$lib_search_path $dir" ;;
2361 if test "$linkmode,$pass" != "prog,link"; then
2364 vars
="compile_deplibs finalize_deplibs"
2366 for var
in $vars dependency_libs
; do
2367 # Add libraries to $var in reverse order
2368 eval tmp_libs
=\"\$
$var\"
2370 for deplib
in $tmp_libs; do
2372 -L*) new_libs
="$deplib $new_libs" ;;
2374 case " $specialdeplibs " in
2375 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
2377 case " $new_libs " in
2379 *) new_libs
="$deplib $new_libs" ;;
2387 for deplib
in $new_libs; do
2390 case " $tmp_libs " in
2392 *) tmp_libs
="$tmp_libs $deplib" ;;
2395 *) tmp_libs
="$tmp_libs $deplib" ;;
2398 eval $var=\"$tmp_libs\"
2401 if test "$pass" = "conv" &&
2402 { test "$linkmode" = "lib" ||
test "$linkmode" = "prog"; }; then
2403 libs
="$deplibs" # reset libs
2407 if test $linkmode = prog
; then
2408 dlfiles
="$newdlfiles"
2409 dlprefiles
="$newdlprefiles"
2414 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
2415 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2418 if test -n "$rpath"; then
2419 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2422 if test -n "$xrpath"; then
2423 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2426 if test -n "$vinfo"; then
2427 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2430 if test -n "$release"; then
2431 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2434 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
2435 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2438 # Now set the variables for building old libraries.
2439 build_libtool_libs
=no
2441 objs
="$objs$old_deplibs"
2445 # Make sure we only generate libraries of the form `libNAME.la'.
2448 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2449 eval libname
=\"$libname_spec\"
2452 if test "$module" = no
; then
2453 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2457 if test "$need_lib_prefix" != no
; then
2458 # Add the "lib" prefix for modules if required
2459 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2460 eval libname
=\"$libname_spec\"
2462 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2467 if test -n "$objs"; then
2468 if test "$deplibs_check_method" != pass_all
; then
2469 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2473 echo "*** Warning: Linking the shared library $output against the non-libtool"
2474 echo "*** objects $objs is not portable!"
2475 libobjs
="$libobjs $objs"
2479 if test "$dlself" != no
; then
2480 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2484 if test $# -gt 2; then
2485 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2490 if test -z "$rpath"; then
2491 if test "$build_libtool_libs" = yes; then
2492 # Building a libtool convenience library.
2493 # Some compilers have problems with a `.al' extension so
2494 # convenience libraries should have the same extension an
2495 # archive normally would.
2496 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
2497 build_libtool_libs
=convenience
2501 if test -n "$vinfo"; then
2502 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2505 if test -n "$release"; then
2506 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2510 # Parse the version information argument.
2511 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=':'
2512 set dummy
$vinfo 0 0 0
2515 if test -n "$8"; then
2516 $echo "$modename: too many parameters to \`-version-info'" 1>&2
2525 # Check that each of the things are valid numbers.
2527 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
2529 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2530 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2536 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
2538 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2539 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2545 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
2547 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2548 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2553 if test $age -gt $current; then
2554 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2555 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2559 # Calculate the version variables.
2563 case $version_type in
2567 # Like Linux, but with the current version available in
2568 # verstring for coding it into the library header
2569 major
=.
`expr $current - $age`
2570 versuffix
="$major.$age.$revision"
2571 # Darwin ld doesn't like 0 for these options...
2572 minor_current
=`expr $current + 1`
2573 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
2578 versuffix
=".$current.$revision";
2583 versuffix
=".$current";
2587 major
=`expr $current - $age + 1`
2588 verstring
="sgi$major.$revision"
2590 # Add in all the interfaces that we are compatible with.
2592 while test $loop != 0; do
2593 iface
=`expr $revision - $loop`
2594 loop
=`expr $loop - 1`
2595 verstring
="sgi$major.$iface:$verstring"
2598 # Before this point, $major must not contain `.'.
2600 versuffix
="$major.$revision"
2604 major
=.
`expr $current - $age`
2605 versuffix
="$major.$age.$revision"
2609 major
=`expr $current - $age`
2610 versuffix
=".$current.$age.$revision"
2611 verstring
="$current.$age.$revision"
2613 # Add in all the interfaces that we are compatible with.
2615 while test $loop != 0; do
2616 iface
=`expr $current - $loop`
2617 loop
=`expr $loop - 1`
2618 verstring
="$verstring:${iface}.0"
2621 # Make executables depend on our current version.
2622 verstring
="$verstring:${current}.0"
2627 versuffix
=".$current.$revision"
2631 # Use '-' rather than '.', since we only want one
2632 # extension on DOS 8.3 filesystems.
2633 major
=`expr $current - $age`
2638 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2639 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2644 # Clear the version info if we defaulted, and they specified a release.
2645 if test -z "$vinfo" && test -n "$release"; then
2648 if test "$need_version" = no
; then
2655 # Remove version info from name if versioning should be avoided
2656 if test "$avoid_version" = yes && test "$need_version" = no
; then
2662 # Check to see if the archive will have undefined symbols.
2663 if test "$allow_undefined" = yes; then
2664 if test "$allow_undefined_flag" = unsupported
; then
2665 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2666 build_libtool_libs
=no
2670 # Don't allow undefined symbols.
2671 allow_undefined_flag
="$no_undefined_flag"
2675 if test "$mode" != relink
; then
2676 # Remove our outputs, but don't remove object files since they
2677 # may have been created when compiling PIC objects.
2679 tempremovelist
=`echo "$output_objdir/*"`
2680 for p
in $tempremovelist; do
2684 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
2685 removelist
="$removelist $p"
2690 if test -n "$removelist"; then
2691 $show "${rm}r $removelist"
2692 $run ${rm}r
$removelist
2696 # Now set the variables for building old libraries.
2697 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
2698 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
2700 # Transform .lo files to .o files.
2701 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2704 # Eliminate all temporary directories.
2705 for path
in $notinst_path; do
2706 lib_search_path
=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2707 deplibs
=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2708 dependency_libs
=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2711 if test -n "$xrpath"; then
2712 # If the user specified any rpath flags, then add them.
2714 for libdir
in $xrpath; do
2715 temp_xrpath
="$temp_xrpath -R$libdir"
2716 case "$finalize_rpath " in
2718 *) finalize_rpath
="$finalize_rpath $libdir" ;;
2721 if test $hardcode_into_libs != yes ||
test $build_old_libs = yes; then
2722 dependency_libs
="$temp_xrpath $dependency_libs"
2726 # Make sure dlfiles contains only unique files that won't be dlpreopened
2727 old_dlfiles
="$dlfiles"
2729 for lib
in $old_dlfiles; do
2730 case " $dlprefiles $dlfiles " in
2732 *) dlfiles
="$dlfiles $lib" ;;
2736 # Make sure dlprefiles contains only unique files
2737 old_dlprefiles
="$dlprefiles"
2739 for lib
in $old_dlprefiles; do
2740 case "$dlprefiles " in
2742 *) dlprefiles
="$dlprefiles $lib" ;;
2746 if test "$build_libtool_libs" = yes; then
2747 if test -n "$rpath"; then
2749 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
2750 # these systems don't actually have a c library (as such)!
2752 *-*-rhapsody* |
*-*-darwin1.
[012])
2753 # Rhapsody C library is in the System framework
2754 deplibs
="$deplibs -framework System"
2757 # Don't link with libc until the a.out ld.so is fixed.
2760 # Add libc to deplibs on all other systems if necessary.
2761 if test $build_libtool_need_lc = "yes"; then
2762 deplibs
="$deplibs -lc"
2768 # Transform deplibs into only deplibs that can be linked in shared.
2770 libname_save
=$libname
2771 release_save
=$release
2772 versuffix_save
=$versuffix
2774 # I'm not sure if I'm treating the release correctly. I think
2775 # release should show up in the -l (ie -lgmp5) so we don't want to
2776 # add it in twice. Is that correct?
2782 case $deplibs_check_method in
2784 # Don't check for shared/static. Everything works.
2785 # This might be a little naive. We might want to check
2786 # whether the library exists or not. But this is on
2787 # osf3 & osf4 and I'm not really sure... Just
2788 # implementing what was already the behaviour.
2792 # This code stresses the "libraries are programs" paradigm to its
2793 # limits. Maybe even breaks it. We compile a program, linking it
2794 # against the deplibs as a proxy for the library. Then we can check
2795 # whether they linked in statically or dynamically with ldd.
2797 cat > conftest.c
<<EOF
2798 int main() { return 0; }
2801 $LTCC -o conftest conftest.c
$deplibs
2802 if test $?
-eq 0 ; then
2803 ldd_output
=`ldd conftest`
2804 for i
in $deplibs; do
2805 name
="`expr $i : '-l\(.*\)'`"
2806 # If $name is empty we are operating on a -L argument.
2807 if test -n "$name" && test "$name" != "0"; then
2808 libname
=`eval \\$echo \"$libname_spec\"`
2809 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
2810 set dummy
$deplib_matches
2812 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2813 newdeplibs
="$newdeplibs $i"
2817 echo "*** Warning: This library needs some functionality provided by $i."
2818 echo "*** I have the capability to make that library automatically link in when"
2819 echo "*** you link to this library. But I can only do this if you have a"
2820 echo "*** shared version of the library, which you do not appear to have."
2823 newdeplibs
="$newdeplibs $i"
2827 # Error occured in the first compile. Let's try to salvage the situation:
2828 # Compile a seperate program for each library.
2829 for i
in $deplibs; do
2830 name
="`expr $i : '-l\(.*\)'`"
2831 # If $name is empty we are operating on a -L argument.
2832 if test -n "$name" && test "$name" != "0"; then
2834 $LTCC -o conftest conftest.c
$i
2836 if test $?
-eq 0 ; then
2837 ldd_output
=`ldd conftest`
2838 libname
=`eval \\$echo \"$libname_spec\"`
2839 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
2840 set dummy
$deplib_matches
2842 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2843 newdeplibs
="$newdeplibs $i"
2847 echo "*** Warning: This library needs some functionality provided by $i."
2848 echo "*** I have the capability to make that library automatically link in when"
2849 echo "*** you link to this library. But I can only do this if you have a"
2850 echo "*** shared version of the library, which you do not appear to have."
2855 echo "*** Warning! Library $i is needed by this library but I was not able to"
2856 echo "*** make it link in! You will probably need to install it or some"
2857 echo "*** library that it depends on before this library will be fully"
2858 echo "*** functional. Installing it before continuing would be even better."
2861 newdeplibs
="$newdeplibs $i"
2867 set dummy
$deplibs_check_method
2868 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2869 for a_deplib
in $deplibs; do
2870 name
="`expr $a_deplib : '-l\(.*\)'`"
2871 # If $name is empty we are operating on a -L argument.
2872 if test -n "$name" && test "$name" != "0"; then
2873 libname
=`eval \\$echo \"$libname_spec\"`
2874 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2875 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
2876 for potent_lib
in $potential_libs; do
2877 # Follow soft links.
2878 if ls -lLd "$potent_lib" 2>/dev
/null \
2879 |
grep " -> " >/dev
/null
; then
2882 # The statement above tries to avoid entering an
2883 # endless loop below, in case of cyclic links.
2884 # We might still enter an endless loop, since a link
2885 # loop can be closed while we follow links,
2887 potlib
="$potent_lib"
2888 while test -h "$potlib" 2>/dev
/null
; do
2889 potliblink
=`ls -ld $potlib | sed 's/.* -> //'`
2891 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
2892 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2895 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
2897 |
egrep "$file_magic_regex" > /dev
/null
; then
2898 newdeplibs
="$newdeplibs $a_deplib"
2904 if test -n "$a_deplib" ; then
2907 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2908 echo "*** I have the capability to make that library automatically link in when"
2909 echo "*** you link to this library. But I can only do this if you have a"
2910 echo "*** shared version of the library, which you do not appear to have."
2913 # Add a -L argument.
2914 newdeplibs
="$newdeplibs $a_deplib"
2916 done # Gone through all deplibs.
2919 set dummy
$deplibs_check_method
2920 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2921 for a_deplib
in $deplibs; do
2922 name
="`expr $a_deplib : '-l\(.*\)'`"
2923 # If $name is empty we are operating on a -L argument.
2924 if test -n "$name" && test "$name" != "0"; then
2925 libname
=`eval \\$echo \"$libname_spec\"`
2926 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2927 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
2928 for potent_lib
in $potential_libs; do
2929 if eval echo \"$potent_lib\" 2>/dev
/null \
2931 |
egrep "$match_pattern_regex" > /dev
/null
; then
2932 newdeplibs
="$newdeplibs $a_deplib"
2938 if test -n "$a_deplib" ; then
2941 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2942 echo "*** I have the capability to make that library automatically link in when"
2943 echo "*** you link to this library. But I can only do this if you have a"
2944 echo "*** shared version of the library, which you do not appear to have."
2947 # Add a -L argument.
2948 newdeplibs
="$newdeplibs $a_deplib"
2950 done # Gone through all deplibs.
2954 if $echo "X $deplibs" |
$Xsed -e 's/ -lc$//' \
2955 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2956 grep .
>/dev
/null
; then
2958 if test "X$deplibs_check_method" = "Xnone"; then
2959 echo "*** Warning: inter-library dependencies are not supported in this platform."
2961 echo "*** Warning: inter-library dependencies are not known to be supported."
2963 echo "*** All declared inter-library dependencies are being dropped."
2968 versuffix
=$versuffix_save
2970 release
=$release_save
2971 libname
=$libname_save
2975 *-*-rhapsody* |
*-*-darwin1.
[012])
2976 # On Rhapsody replace the C library is the System framework
2977 newdeplibs
=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
2981 if test "$droppeddeps" = yes; then
2982 if test "$module" = yes; then
2984 echo "*** Warning: libtool could not satisfy all declared inter-library"
2985 echo "*** dependencies of module $libname. Therefore, libtool will create"
2986 echo "*** a static module, that should work as long as the dlopening"
2987 echo "*** application is linked with the -dlopen flag."
2988 if test -z "$global_symbol_pipe"; then
2990 echo "*** However, this would only work if libtool was able to extract symbol"
2991 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2992 echo "*** not find such a program. So, this module is probably useless."
2993 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2995 if test "$build_old_libs" = no
; then
2996 oldlibs
="$output_objdir/$libname.$libext"
2997 build_libtool_libs
=module
3000 build_libtool_libs
=no
3003 echo "*** The inter-library dependencies that have been dropped here will be"
3004 echo "*** automatically added whenever a program is linked with this library"
3005 echo "*** or is declared to -dlopen it."
3007 if test $allow_undefined = no
; then
3009 echo "*** Since this library must not contain undefined symbols,"
3010 echo "*** because either the platform does not support them or"
3011 echo "*** it was explicitly requested with -no-undefined,"
3012 echo "*** libtool will only create a static version of it."
3013 if test "$build_old_libs" = no
; then
3014 oldlibs
="$output_objdir/$libname.$libext"
3015 build_libtool_libs
=module
3018 build_libtool_libs
=no
3023 # Done checking deplibs!
3027 # All the library-specific variables (install_libdir is set above).
3032 # Test again, we may have decided not to build it any more
3033 if test "$build_libtool_libs" = yes; then
3034 if test $hardcode_into_libs = yes; then
3035 # Hardcode the library paths
3038 rpath
="$finalize_rpath"
3039 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
3040 for libdir
in $rpath; do
3041 if test -n "$hardcode_libdir_flag_spec"; then
3042 if test -n "$hardcode_libdir_separator"; then
3043 if test -z "$hardcode_libdirs"; then
3044 hardcode_libdirs
="$libdir"
3046 # Just accumulate the unique libdirs.
3047 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3048 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3051 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3056 eval flag
=\"$hardcode_libdir_flag_spec\"
3057 dep_rpath
="$dep_rpath $flag"
3059 elif test -n "$runpath_var"; then
3060 case "$perm_rpath " in
3062 *) perm_rpath
="$perm_rpath $libdir" ;;
3066 # Substitute the hardcoded libdirs into the rpath.
3067 if test -n "$hardcode_libdir_separator" &&
3068 test -n "$hardcode_libdirs"; then
3069 libdir
="$hardcode_libdirs"
3070 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
3072 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3073 # We should set the runpath_var.
3075 for dir
in $perm_rpath; do
3078 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3080 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
3083 shlibpath
="$finalize_shlibpath"
3084 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
3085 if test -n "$shlibpath"; then
3086 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3089 # Get the real and link names of the library.
3090 eval library_names
=\"$library_names_spec\"
3091 set dummy
$library_names
3095 if test -n "$soname_spec"; then
3096 eval soname
=\"$soname_spec\"
3100 test -z "$dlname" && dlname
=$soname
3102 lib
="$output_objdir/$realname"
3105 linknames
="$linknames $link"
3108 # # Ensure that we have .o objects for linkers which dislike .lo
3109 # # (e.g. aix) in case we are running --disable-static
3110 # for obj in $libobjs; do
3111 # xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
3112 # if test "X$xdir" = "X$obj"; then
3117 # baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
3118 # oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3119 # if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then
3120 # $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
3121 # $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
3125 # Use standard objects if they are pic
3126 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3128 # Prepare the list of exported symbols
3129 if test -z "$export_symbols"; then
3130 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
3131 $show "generating symbol list for \`$libname.la'"
3132 export_symbols
="$output_objdir/$libname.exp"
3133 $run $rm $export_symbols
3134 eval cmds
=\"$export_symbols_cmds\"
3135 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3136 for cmd
in $cmds; do
3139 $run eval "$cmd" ||
exit $?
3142 if test -n "$export_symbols_regex"; then
3143 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3144 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3145 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3146 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3151 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3152 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3155 if test -n "$convenience"; then
3156 if test -n "$whole_archive_flag_spec"; then
3157 save_libobjs
=$libobjs
3158 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3160 gentop
="$output_objdir/${outputname}x"
3161 $show "${rm}r $gentop"
3162 $run ${rm}r
"$gentop"
3163 $show "$mkdir $gentop"
3164 $run $mkdir "$gentop"
3166 if test $status -ne 0 && test ! -d "$gentop"; then
3169 generated
="$generated $gentop"
3171 for xlib
in $convenience; do
3172 # Extract the objects.
3174 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
3175 *) xabs
=`pwd`"/$xlib" ;;
3177 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3178 xdir
="$gentop/$xlib"
3180 $show "${rm}r $xdir"
3182 $show "$mkdir $xdir"
3185 if test $status -ne 0 && test ! -d "$xdir"; then
3188 $show "(cd $xdir && $AR x $xabs)"
3189 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
3191 libobjs
="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3196 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3197 eval flag
=\"$thread_safe_flag_spec\"
3198 linker_flags
="$linker_flags $flag"
3201 # Make a backup of the uninstalled library when relinking
3202 if test "$mode" = relink
; then
3203 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
3206 # Do each of the archive commands.
3207 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3208 eval cmds
=\"$archive_expsym_cmds\"
3210 eval cmds
=\"$archive_cmds\"
3212 if len
=`expr "X$cmds" : ".*"` &&
3213 test $len -le $max_cmd_len; then
3216 # The command line is too long to link in one step, link piecewise.
3217 $echo "creating reloadable object files..."
3219 # Save the value of $output and $libobjs because we want to
3220 # use them later. If we have whole_archive_flag_spec, we
3221 # want to use save_libobjs as it was before
3222 # whole_archive_flag_spec was expanded, because we can't
3223 # assume the linker understands whole_archive_flag_spec.
3224 # This may have to be revisited, in case too many
3225 # convenience libraries get linked in and end up exceeding
3227 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
3228 save_libobjs
=$libobjs
3232 # Clear the reloadable object creation command queue and
3233 # initialize k to one.
3240 output
=$output_objdir/$save_output-${k}.
$objext
3241 # Loop over the list of objects to be linked.
3242 for obj
in $save_libobjs
3244 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
3245 if test "X$objlist" = X ||
3246 { len
=`expr "X$test_cmds" : ".*"` &&
3247 test $len -le $max_cmd_len; }; then
3248 objlist
="$objlist $obj"
3250 # The command $test_cmds is almost too long, add a
3251 # command to the queue.
3252 if test $k -eq 1 ; then
3253 # The first file doesn't have a previous command to add.
3254 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
3256 # All subsequent reloadable object files will link in
3257 # the last one created.
3258 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
3260 last_robj
=$output_objdir/$save_output-${k}.
$objext
3262 output
=$output_objdir/$save_output-${k}.
$objext
3267 # Handle the remaining objects by creating one last
3268 # reloadable object file. All subsequent reloadable object
3269 # files will link in the last one created.
3270 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
3271 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
3273 # Set up a command to remove the reloadale object files
3274 # after they are used.
3276 while test $i -lt $k
3279 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
3282 $echo "creating a temporary reloadable object file: $output"
3284 # Loop through the commands generated above and execute them.
3285 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3286 for cmd
in $concat_cmds; do
3289 $run eval "$cmd" ||
exit $?
3294 # Restore the value of output.
3297 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
3298 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3300 # Expand the library linking commands again to reset the
3301 # value of $libobjs for piecewise linking.
3303 # Do each of the archive commands.
3304 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3305 eval cmds
=\"$archive_expsym_cmds\"
3307 eval cmds
=\"$archive_cmds\"
3310 # Append the command to remove the reloadable object files
3311 # to the just-reset $cmds.
3312 eval cmds
=\"\
$cmds~
$rm $delfiles\"
3314 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3315 for cmd
in $cmds; do
3318 $run eval "$cmd" ||
exit $?
3322 # Restore the uninstalled library and exit
3323 if test "$mode" = relink
; then
3324 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
3328 # Create links to the real library.
3329 for linkname
in $linknames; do
3330 if test "$realname" != "$linkname"; then
3331 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
3332 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
3336 # If -module or -export-dynamic was specified, set the dlname.
3337 if test "$module" = yes ||
test "$export_dynamic" = yes; then
3338 # On all known operating systems, these are identical.
3345 if test -n "$deplibs"; then
3346 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
3349 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3350 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3353 if test -n "$rpath"; then
3354 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3357 if test -n "$xrpath"; then
3358 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
3361 if test -n "$vinfo"; then
3362 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3365 if test -n "$release"; then
3366 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3371 if test -n "$objs$old_deplibs"; then
3372 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3376 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
3384 # Delete the old objects.
3385 $run $rm $obj $libobj
3387 # Objects from convenience libraries. This assumes
3388 # single-version convenience libraries. Whenever we create
3389 # different ones for PIC/non-PIC, this we'll have to duplicate
3393 # reload_cmds runs $LD directly, so let us get rid of
3394 # -Wl from whole_archive_flag_spec
3397 if test -n "$convenience"; then
3398 if test -n "$whole_archive_flag_spec"; then
3399 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
3401 gentop
="$output_objdir/${obj}x"
3402 $show "${rm}r $gentop"
3403 $run ${rm}r
"$gentop"
3404 $show "$mkdir $gentop"
3405 $run $mkdir "$gentop"
3407 if test $status -ne 0 && test ! -d "$gentop"; then
3410 generated
="$generated $gentop"
3412 for xlib
in $convenience; do
3413 # Extract the objects.
3415 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
3416 *) xabs
=`pwd`"/$xlib" ;;
3418 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3419 xdir
="$gentop/$xlib"
3421 $show "${rm}r $xdir"
3423 $show "$mkdir $xdir"
3426 if test $status -ne 0 && test ! -d "$xdir"; then
3429 $show "(cd $xdir && $AR x $xabs)"
3430 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
3432 reload_conv_objs
="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3437 # Create the old-style object.
3438 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
3441 eval cmds
=\"$reload_cmds\"
3442 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3443 for cmd
in $cmds; do
3446 $run eval "$cmd" ||
exit $?
3450 # Exit if we aren't doing a library object file.
3451 if test -z "$libobj"; then
3452 if test -n "$gentop"; then
3453 $show "${rm}r $gentop"
3460 if test "$build_libtool_libs" != yes; then
3461 if test -n "$gentop"; then
3462 $show "${rm}r $gentop"
3466 # Create an invalid libtool object if no PIC, so that we don't
3467 # accidentally link it into a program.
3468 # $show "echo timestamp > $libobj"
3469 # $run eval "echo timestamp > $libobj" || exit $?
3473 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
3474 # Only do commands if we really have different PIC objects.
3475 reload_objs
="$libobjs $reload_conv_objs"
3477 eval cmds
=\"$reload_cmds\"
3478 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3479 for cmd
in $cmds; do
3482 $run eval "$cmd" ||
exit $?
3486 # # Just create a symlink.
3489 # xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3490 # if test "X$xdir" = "X$libobj"; then
3495 # baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3496 # oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3497 # $show "(cd $xdir && $LN_S $oldobj $baseobj)"
3498 # $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
3501 if test -n "$gentop"; then
3502 $show "${rm}r $gentop"
3511 *cygwin
*) output
=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
3513 if test -n "$vinfo"; then
3514 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3517 if test -n "$release"; then
3518 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3521 if test "$preload" = yes; then
3522 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
3523 test "$dlopen_self_static" = unknown
; then
3524 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3529 *-*-rhapsody* |
*-*-darwin1.
[012])
3530 # On Rhapsody replace the C library is the System framework
3531 compile_deplibs
=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3532 finalize_deplibs
=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3536 compile_command
="$compile_command $compile_deplibs"
3537 finalize_command
="$finalize_command $finalize_deplibs"
3539 if test -n "$rpath$xrpath"; then
3540 # If the user specified any rpath flags, then add them.
3541 for libdir
in $rpath $xrpath; do
3542 # This is the magic to use -rpath.
3543 case "$finalize_rpath " in
3545 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3550 # Now hardcode the library paths
3553 for libdir
in $compile_rpath; do
3554 if test -n "$hardcode_libdir_flag_spec"; then
3555 if test -n "$hardcode_libdir_separator"; then
3556 if test -z "$hardcode_libdirs"; then
3557 hardcode_libdirs
="$libdir"
3559 # Just accumulate the unique libdirs.
3560 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3561 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3564 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3569 eval flag
=\"$hardcode_libdir_flag_spec\"
3570 rpath
="$rpath $flag"
3572 elif test -n "$runpath_var"; then
3573 case "$perm_rpath " in
3575 *) perm_rpath
="$perm_rpath $libdir" ;;
3579 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
3580 case :$dllsearchpath: in
3582 *) dllsearchpath
="$dllsearchpath:$libdir";;
3587 # Substitute the hardcoded libdirs into the rpath.
3588 if test -n "$hardcode_libdir_separator" &&
3589 test -n "$hardcode_libdirs"; then
3590 libdir
="$hardcode_libdirs"
3591 eval rpath
=\" $hardcode_libdir_flag_spec\"
3593 compile_rpath
="$rpath"
3597 for libdir
in $finalize_rpath; do
3598 if test -n "$hardcode_libdir_flag_spec"; then
3599 if test -n "$hardcode_libdir_separator"; then
3600 if test -z "$hardcode_libdirs"; then
3601 hardcode_libdirs
="$libdir"
3603 # Just accumulate the unique libdirs.
3604 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3605 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3608 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3613 eval flag
=\"$hardcode_libdir_flag_spec\"
3614 rpath
="$rpath $flag"
3616 elif test -n "$runpath_var"; then
3617 case "$finalize_perm_rpath " in
3619 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
3623 # Substitute the hardcoded libdirs into the rpath.
3624 if test -n "$hardcode_libdir_separator" &&
3625 test -n "$hardcode_libdirs"; then
3626 libdir
="$hardcode_libdirs"
3627 eval rpath
=\" $hardcode_libdir_flag_spec\"
3629 finalize_rpath
="$rpath"
3632 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3633 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3634 dlsyms
="${outputname}S.c"
3636 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3640 if test -n "$dlsyms"; then
3644 # Discover the nlist of each of the dlfiles.
3645 nlist
="$output_objdir/${outputname}.nm"
3647 $show "$rm $nlist ${nlist}S ${nlist}T"
3648 $run $rm "$nlist" "${nlist}S" "${nlist}T"
3650 # Parse the name list into a source file.
3651 $show "creating $output_objdir/$dlsyms"
3653 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3654 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3655 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3661 /* Prevent the only kind of declaration conflicts we can make. */
3662 #define lt_preloaded_symbols some_other_symbol
3664 /* External symbol declarations for the compiler. */\
3667 if test "$dlself" = yes; then
3668 $show "generating symbol list for \`$output'"
3670 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3672 # Add our own program objects to the symbol list.
3673 progfiles
="$objs$old_deplibs"
3674 for arg
in $progfiles; do
3675 $show "extracting global C symbols from \`$arg'"
3676 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3679 if test -n "$exclude_expsyms"; then
3680 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3681 $run eval '$mv "$nlist"T "$nlist"'
3684 if test -n "$export_symbols_regex"; then
3685 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3686 $run eval '$mv "$nlist"T "$nlist"'
3689 # Prepare the list of exported symbols
3690 if test -z "$export_symbols"; then
3691 export_symbols
="$output_objdir/$output.exp"
3692 $run $rm $export_symbols
3693 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3695 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3696 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3697 $run eval 'mv "$nlist"T "$nlist"'
3701 for arg
in $dlprefiles; do
3702 $show "extracting global C symbols from \`$arg'"
3703 name
=`echo "$arg" | sed -e 's%^.*/%%'`
3704 $run eval 'echo ": $name " >> "$nlist"'
3705 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3708 if test -z "$run"; then
3709 # Make sure we have at least an empty file.
3710 test -f "$nlist" ||
: > "$nlist"
3712 if test -n "$exclude_expsyms"; then
3713 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3714 $mv "$nlist"T
"$nlist"
3717 # Try sorting and uniquifying the output.
3718 if grep -v "^: " < "$nlist" |
sort +2 |
uniq > "$nlist"S
; then
3721 grep -v "^: " < "$nlist" > "$nlist"S
3724 if test -f "$nlist"S
; then
3725 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3727 echo '/* NONE */' >> "$output_objdir/$dlsyms"
3730 $echo >> "$output_objdir/$dlsyms" "\
3732 #undef lt_preloaded_symbols
3734 #if defined (__STDC__) && __STDC__
3735 # define lt_ptr_t void *
3737 # define lt_ptr_t char *
3741 /* The mapping between symbol names and symbols. */
3746 lt_preloaded_symbols[] =
3750 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
3751 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
3752 < "$nlist" >> "$output_objdir/$dlsyms"
3754 $echo >> "$output_objdir/$dlsyms" "\
3758 /* This works around a problem in FreeBSD linker */
3759 #ifdef FREEBSD_WORKAROUND
3760 static const void *lt_preloaded_setup() {
3761 return lt_preloaded_symbols;
3771 pic_flag_for_symtable
=
3773 # compiling the symbol table file with pic_flag works around
3774 # a FreeBSD bug that causes programs to crash when -lm is
3775 # linked before any other PIC object. But we must not use
3776 # pic_flag when linking with -static. The problem exists in
3777 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3778 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
3779 case "$compile_command " in
3781 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
3784 case "$compile_command " in
3786 *) pic_flag_for_symtable
=" $pic_flag";;
3790 # Now compile the dynamic symbol file.
3791 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3792 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
3794 # Clean up the generated files.
3795 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3796 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3798 # Transform the symbol file into the correct name.
3799 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3800 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3803 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3808 # We keep going just in case the user didn't refer to
3809 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3810 # really was required.
3812 # Nullify the symbol file.
3813 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3814 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3817 if test $need_relink = no ||
test "$build_libtool_libs" != yes; then
3818 # Replace the output file specification.
3819 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3820 link_command
="$compile_command$compile_rpath"
3822 # We have no uninstalled library dependencies, so finalize right now.
3823 $show "$link_command"
3824 $run eval "$link_command"
3827 # Delete the generated files.
3828 if test -n "$dlsyms"; then
3829 $show "$rm $output_objdir/${outputname}S.${objext}"
3830 $run $rm "$output_objdir/${outputname}S.${objext}"
3836 if test -n "$shlibpath_var"; then
3837 # We should set the shlibpath_var
3839 for dir
in $temp_rpath; do
3841 [\\/]* |
[A-Za-z
]:[\\/]*)
3846 # Relative path: add a thisdir entry.
3847 rpath
="$rpath\$thisdir/$dir:"
3854 if test -n "$compile_shlibpath$finalize_shlibpath"; then
3855 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3857 if test -n "$finalize_shlibpath"; then
3858 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3863 if test -n "$runpath_var"; then
3864 if test -n "$perm_rpath"; then
3865 # We should set the runpath_var.
3867 for dir
in $perm_rpath; do
3870 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
3872 if test -n "$finalize_perm_rpath"; then
3873 # We should set the runpath_var.
3875 for dir
in $finalize_perm_rpath; do
3878 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
3882 if test "$no_install" = yes; then
3883 # We don't need to create a wrapper script.
3884 link_command
="$compile_var$compile_command$compile_rpath"
3885 # Replace the output file specification.
3886 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3887 # Delete the old output file.
3889 # Link the executable and exit
3890 $show "$link_command"
3891 $run eval "$link_command" ||
exit $?
3895 if test "$hardcode_action" = relink
; then
3896 # Fast installation is not supported
3897 link_command
="$compile_var$compile_command$compile_rpath"
3898 relink_command
="$finalize_var$finalize_command$finalize_rpath"
3900 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3901 $echo "$modename: \`$output' will be relinked during installation" 1>&2
3903 if test "$fast_install" != no
; then
3904 link_command
="$finalize_var$compile_command$finalize_rpath"
3905 if test "$fast_install" = yes; then
3906 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3908 # fast_install is set to needless
3912 link_command
="$compile_var$compile_command$compile_rpath"
3913 relink_command
="$finalize_var$finalize_command$finalize_rpath"
3917 # Replace the output file specification.
3918 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3920 # Delete the old output files.
3921 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
3923 $show "$link_command"
3924 $run eval "$link_command" ||
exit $?
3926 # Now create the wrapper script.
3927 $show "creating $output"
3929 # Quote the relink command for shipping.
3930 if test -n "$relink_command"; then
3931 # Preserve any variables that may affect compiler behavior
3932 for var
in $variables_saved_for_relink; do
3933 if eval test -z \"\
${$var+set}\"; then
3934 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3935 elif eval var_value
=\$
$var; test -z "$var_value"; then
3936 relink_command
="$var=; export $var; $relink_command"
3938 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3939 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
3942 relink_command
="cd `pwd`; $relink_command"
3943 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3946 # Quote $echo for shipping.
3947 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3949 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $0 --fallback-echo";;
3950 *) qecho
="$SHELL `pwd`/$0 --fallback-echo";;
3952 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3954 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3957 # Only actually do things if our run command is non-null.
3958 if test -z "$run"; then
3959 # win32 will think the script is a binary if it has
3960 # a .exe suffix, so we strip it off here.
3962 *.exe
) output
=`echo $output|sed 's,.exe$,,'` ;;
3964 # test for cygwin because mv fails w/o .exe extensions
3966 *cygwin
*) exeext
=.exe
;;
3970 trap "$rm $output; exit 1" 1 2 15
3975 # $output - temporary wrapper script for $objdir/$outputname
3976 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3978 # The $output program cannot be directly executed until all the libtool
3979 # libraries that it depends on are installed.
3981 # This wrapper script should never be moved out of the build directory.
3982 # If it is, it will not operate correctly.
3984 # Sed substitution that helps us do robust quoting. It backslashifies
3985 # metacharacters that are still active within double-quoted strings.
3986 Xsed='sed -e 1s/^X//'
3987 sed_quote_subst='$sed_quote_subst'
3989 # The HP-UX ksh and POSIX shell print the target directory to stdout
3991 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3993 relink_command=\"$relink_command\"
3995 # This environment variable determines our operation mode.
3996 if test \"\$libtool_install_magic\" = \"$magic\"; then
3997 # install mode needs the following variable:
3998 notinst_deplibs='$notinst_deplibs'
4000 # When we are sourced in execute mode, \$file and \$echo are already set.
4001 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4004 # Make sure echo works.
4005 if test \"X\$1\" = X--no-reexec; then
4006 # Discard the --no-reexec flag, and continue.
4008 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
4009 # Yippee, \$echo works!
4012 # Restart under the correct shell, and then maybe \$echo will work.
4013 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
4019 # Find the directory that this script lives in.
4020 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
4021 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4023 # Follow symbolic links until we get to the real thisdir.
4024 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
4025 while test -n \"\$file\"; do
4026 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
4028 # If there was a directory component, then change thisdir.
4029 if test \"x\$destdir\" != \"x\$file\"; then
4030 case \"\$destdir\" in
4031 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4032 *) thisdir=\"\$thisdir/\$destdir\" ;;
4036 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
4037 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
4040 # Try to get the absolute directory name.
4041 absdir=\`cd \"\$thisdir\" && pwd\`
4042 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4045 if test "$fast_install" = yes; then
4047 program=lt-'$outputname'$exeext
4048 progdir=\"\$thisdir/$objdir\"
4050 if test ! -f \"\$progdir/\$program\" || \\
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
4052 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4054 file=\"\$\$-\$program\"
4056 if test ! -d \"\$progdir\"; then
4057 $mkdir \"\$progdir\"
4059 $rm \"\$progdir/\$file\"
4064 # relink executable if necessary
4065 if test -n \"\$relink_command\"; then
4066 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4068 $echo \"\$relink_command_output\" >&2
4069 $rm \"\$progdir/\$file\"
4074 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4075 { $rm \"\$progdir/\$program\";
4076 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4077 $rm \"\$progdir/\$file\"
4081 program='$outputname'
4082 progdir=\"\$thisdir/$objdir\"
4088 if test -f \"\$progdir/\$program\"; then"
4090 # Export our shlibpath_var if we have one.
4091 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4093 # Add our own library path to $shlibpath_var
4094 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4096 # Some systems cannot cope with colon-terminated $shlibpath_var
4097 # The second colon is a workaround for a bug in BeOS R4 sed
4098 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
4100 export $shlibpath_var
4104 # fixup the dll searchpath if we need to.
4105 if test -n "$dllsearchpath"; then
4107 # Add the dll search path components to the executable PATH
4108 PATH=$dllsearchpath:\$PATH
4113 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4114 # Run the actual program with our arguments.
4117 # win32 systems need to use the prog path for dll
4119 *-*-cygwin* |
*-*-pw32*)
4121 exec \$progdir/\$program \${1+\"\$@\"}
4125 # Backslashes separate directories on plain windows
4126 *-*-mingw |
*-*-os2*)
4128 exec \$progdir\\\\\$program \${1+\"\$@\"}
4134 # Export the path to the program.
4135 PATH=\"\$progdir:\$PATH\"
4138 exec \$program \${1+\"\$@\"}
4143 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
4147 # The program doesn't exist.
4148 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
4149 \$echo \"This script is just a wrapper for \$program.\" 1>&2
4150 echo \"See the $PACKAGE documentation for more information.\" 1>&2
4161 # See if we need to build an old-fashioned archive.
4162 for oldlib
in $oldlibs; do
4164 if test "$build_libtool_libs" = convenience
; then
4165 oldobjs
="$libobjs_save"
4166 addlibs
="$convenience"
4167 build_libtool_libs
=no
4169 if test "$build_libtool_libs" = module
; then
4170 oldobjs
="$libobjs_save"
4171 build_libtool_libs
=no
4173 oldobjs
="$objs$old_deplibs $non_pic_objects"
4175 addlibs
="$old_convenience"
4178 if test -n "$addlibs"; then
4179 gentop
="$output_objdir/${outputname}x"
4180 $show "${rm}r $gentop"
4181 $run ${rm}r
"$gentop"
4182 $show "$mkdir $gentop"
4183 $run $mkdir "$gentop"
4185 if test $status -ne 0 && test ! -d "$gentop"; then
4188 generated
="$generated $gentop"
4190 # Add in members from convenience archives.
4191 for xlib
in $addlibs; do
4192 # Extract the objects.
4194 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4195 *) xabs
=`pwd`"/$xlib" ;;
4197 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4198 xdir
="$gentop/$xlib"
4200 $show "${rm}r $xdir"
4202 $show "$mkdir $xdir"
4205 if test $status -ne 0 && test ! -d "$xdir"; then
4208 $show "(cd $xdir && $AR x $xabs)"
4209 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4211 oldobjs
="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP`
4215 # Do each command in the archive commands.
4216 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
4217 eval cmds
=\"$old_archive_from_new_cmds\"
4219 # # Ensure that we have .o objects in place in case we decided
4220 # # not to build a shared library, and have fallen back to building
4221 # # static libs even though --disable-static was passed!
4222 # for oldobj in $oldobjs; do
4223 # if test ! -f $oldobj; then
4224 # xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
4225 # if test "X$xdir" = "X$oldobj"; then
4230 # baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
4231 # obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
4232 # $show "(cd $xdir && ${LN_S} $obj $baseobj)"
4233 # $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
4237 # POSIX demands no paths to be encoded in archives. We have
4238 # to avoid creating archives with duplicate basenames if we
4239 # might have to extract them afterwards, e.g., when creating a
4240 # static archive out of a convenience library, or when linking
4241 # the entirety of a libtool archive into another (currently
4242 # not supported by libtool).
4243 if (for obj
in $oldobjs
4245 $echo "X$obj" |
$Xsed -e 's%^.*/%%'
4246 done |
sort |
sort -uc >/dev
/null
2>&1); then
4249 $echo "copying selected object files to avoid basename conflicts..."
4251 if test -z "$gentop"; then
4252 gentop
="$output_objdir/${outputname}x"
4254 $show "${rm}r $gentop"
4255 $run ${rm}r
"$gentop"
4256 $show "$mkdir $gentop"
4257 $run $mkdir "$gentop"
4259 if test $status -ne 0 && test ! -d "$gentop"; then
4262 generated
="$generated $gentop"
4265 save_oldobjs
=$oldobjs
4268 for obj
in $save_oldobjs
4270 objbase
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
4271 case " $oldobjs " in
4272 " ") oldobjs
=$obj ;;
4275 # Make sure we don't pick an alternate name that also
4277 newobj
=lt
$counter-$objbase
4278 counter
=`expr $counter + 1`
4279 case " $oldobjs " in
4280 *[\
/]"$newobj "*) ;;
4281 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
4284 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
4285 $run ln "$obj" "$gentop/$newobj" ||
4286 $run cp "$obj" "$gentop/$newobj"
4287 oldobjs
="$oldobjs $gentop/$newobj"
4289 *) oldobjs
="$oldobjs $obj" ;;
4294 eval cmds
=\"$old_archive_cmds\"
4296 if len
=`expr "X$cmds" : ".*"` &&
4297 test $len -le $max_cmd_len; then
4300 # the command line is too long to link in one step, link in parts
4301 $echo "using piecewise archive linking..."
4306 save_oldobjs
=$oldobjs
4308 for obj
in $save_oldobjs
4310 oldobjs
="$objlist $obj"
4311 objlist
="$objlist $obj"
4312 eval test_cmds
=\"$old_archive_cmds\"
4313 if len
=`expr "X$test_cmds" : ".*"` &&
4314 test $len -le $max_cmd_len; then
4317 # the above command should be used before it gets too long
4319 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4320 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
4326 eval cmds
=\"\
$concat_cmds~
$old_archive_cmds\"
4329 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4330 for cmd
in $cmds; do
4333 $run eval "$cmd" ||
exit $?
4338 if test -n "$generated"; then
4339 $show "${rm}r$generated"
4340 $run ${rm}r
$generated
4343 # Now create the libtool archive.
4347 test "$build_old_libs" = yes && old_library
="$libname.$libext"
4348 $show "creating $output"
4350 # Preserve any variables that may affect compiler behavior
4351 for var
in $variables_saved_for_relink; do
4352 if eval test -z \"\
${$var+set}\"; then
4353 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4354 elif eval var_value
=\$
$var; test -z "$var_value"; then
4355 relink_command
="$var=; export $var; $relink_command"
4357 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4358 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4361 # Quote the link command for shipping.
4363 for tag
in $taglist; do
4364 tagopts
="$tagopts --tag $tag"
4366 relink_command
="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)"
4367 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4369 # Only create the output if not a dry run.
4370 if test -z "$run"; then
4371 for installed
in no
yes; do
4372 if test "$installed" = yes; then
4373 if test -z "$install_libdir"; then
4376 output
="$output_objdir/$outputname"i
4377 # Replace all uninstalled libtool libraries with the installed ones
4379 for deplib
in $dependency_libs; do
4382 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
4383 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
4384 if test -z "$libdir"; then
4385 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
4388 newdependency_libs
="$newdependency_libs $libdir/$name"
4390 *) newdependency_libs
="$newdependency_libs $deplib" ;;
4393 dependency_libs
="$newdependency_libs"
4395 for lib
in $dlfiles; do
4396 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4397 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4398 if test -z "$libdir"; then
4399 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4402 newdlfiles
="$newdlfiles $libdir/$name"
4404 dlfiles
="$newdlfiles"
4406 for lib
in $dlprefiles; do
4407 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4408 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4409 if test -z "$libdir"; then
4410 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4413 newdlprefiles
="$newdlprefiles $libdir/$name"
4415 dlprefiles
="$newdlprefiles"
4418 # place dlname in correct position for cygwin
4420 case $host,$output,$installed,$module,$dlname in
4421 *cygwin
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
4424 # $outputname - a libtool library file
4425 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4427 # Please DO NOT delete this file!
4428 # It is necessary for linking the library.
4430 # The name that we can dlopen(3).
4433 # Names of this library.
4434 library_names='$library_names'
4436 # The name of the static archive.
4437 old_library='$old_library'
4439 # Libraries that this one depends upon.
4440 dependency_libs='$dependency_libs'
4442 # Version information for $libname.
4447 # Is this an already installed library?
4448 installed=$installed
4450 # Files to dlopen/dlpreopen
4452 dlpreopen='$dlprefiles'
4454 # Directory that this library needs to be installed in:
4455 libdir='$install_libdir'"
4456 if test "$installed" = no
&& test $need_relink = yes; then
4458 relink_command=\"$relink_command\""
4463 # Do a symbolic link so that the libtool archive can be found in
4464 # LD_LIBRARY_PATH before the program is installed.
4465 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4466 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
4472 # libtool install mode
4474 modename
="$modename: install"
4476 # There may be an optional sh(1) argument at the beginning of
4477 # install_prog (especially on Windows NT).
4478 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
4479 # Allow the use of GNU shtool's install command.
4480 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
4481 # Aesthetically quote it.
4482 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4484 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4488 install_prog
="$arg "
4496 # The real first argument should be the name of the installation program.
4497 # Aesthetically quote it.
4498 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4500 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4504 install_prog
="$install_prog$arg"
4506 # We need to accept at least all the BSD install flags.
4516 if test -n "$dest"; then
4517 files
="$files $dest"
4535 # If the previous option needed an argument, then skip it.
4536 if test -n "$prev"; then
4545 # Aesthetically quote the argument.
4546 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4548 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4552 install_prog
="$install_prog $arg"
4555 if test -z "$install_prog"; then
4556 $echo "$modename: you must specify an install program" 1>&2
4561 if test -n "$prev"; then
4562 $echo "$modename: the \`$prev' option requires an argument" 1>&2
4567 if test -z "$files"; then
4568 if test -z "$dest"; then
4569 $echo "$modename: no file or destination specified" 1>&2
4571 $echo "$modename: you must specify a destination" 1>&2
4577 # Strip any trailing slash from the destination.
4578 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
4580 # Check to see that the destination is a directory.
4581 test -d "$dest" && isdir
=yes
4582 if test "$isdir" = yes; then
4586 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
4587 test "X$destdir" = "X$dest" && destdir
=.
4588 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
4590 # Not a directory, so check to see that there is only one file specified.
4592 if test $# -gt 2; then
4593 $echo "$modename: \`$dest' is not a directory" 1>&2
4599 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
4601 for file in $files; do
4605 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4614 # This variable tells wrapper scripts just to set variables rather
4615 # than running their programs.
4616 libtool_install_magic
="$magic"
4621 for file in $files; do
4623 # Do each installation.
4626 # Do the static libraries later.
4627 staticlibs
="$staticlibs $file"
4631 # Check to see that this really is a libtool archive.
4632 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
4634 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4642 # If there is no directory component, then add one.
4644 */* |
*\\*) .
$file ;;
4648 # Add the libdir to current_libdirs if it is the destination.
4649 if test "X$destdir" = "X$libdir"; then
4650 case "$current_libdirs " in
4652 *) current_libdirs
="$current_libdirs $libdir" ;;
4655 # Note the libdir as a future libdir.
4656 case "$future_libdirs " in
4658 *) future_libdirs
="$future_libdirs $libdir" ;;
4662 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
4663 test "X$dir" = "X$file/" && dir
=
4666 if test -n "$relink_command"; then
4667 $echo "$modename: warning: relinking \`$file'" 1>&2
4668 $show "$relink_command"
4669 if $run eval "$relink_command"; then :
4671 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4676 # See the names of the shared library.
4677 set dummy
$library_names
4678 if test -n "$2"; then
4684 test -n "$relink_command" && srcname
="$realname"T
4686 # Install the shared library and build the symlinks.
4687 $show "$install_prog $dir/$srcname $destdir/$realname"
4688 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
4689 if test -n "$stripme" && test -n "$striplib"; then
4690 $show "$striplib $destdir/$realname"
4691 $run eval "$striplib $destdir/$realname" ||
exit $?
4694 if test $# -gt 0; then
4695 # Delete the old symlinks, and create new ones.
4698 if test "$linkname" != "$realname"; then
4699 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4700 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4705 # Do each command in the postinstall commands.
4706 lib
="$destdir/$realname"
4707 eval cmds
=\"$postinstall_cmds\"
4708 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4709 for cmd
in $cmds; do
4712 $run eval "$cmd" ||
exit $?
4717 # Install the pseudo-library for information purposes.
4718 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4719 instname
="$dir/$name"i
4720 $show "$install_prog $instname $destdir/$name"
4721 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
4723 # Maybe install the static library, too.
4724 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
4728 # Install (i.e. copy) a libtool object.
4730 # Figure out destination file name, if it wasn't already specified.
4731 if test -n "$destname"; then
4732 destfile
="$destdir/$destname"
4734 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4735 destfile
="$destdir/$destfile"
4738 # Deduce the name of the destination old-style object file.
4741 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4744 staticdest
="$destfile"
4748 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4754 # Install the libtool object if requested.
4755 if test -n "$destfile"; then
4756 $show "$install_prog $file $destfile"
4757 $run eval "$install_prog $file $destfile" ||
exit $?
4760 # Install the old object if enabled.
4761 if test "$build_old_libs" = yes; then
4762 # Deduce the name of the old-style object file.
4763 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
4765 $show "$install_prog $staticobj $staticdest"
4766 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
4772 # Figure out destination file name, if it wasn't already specified.
4773 if test -n "$destname"; then
4774 destfile
="$destdir/$destname"
4776 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4777 destfile
="$destdir/$destfile"
4780 # Do a test to see if this is really a libtool program.
4781 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
4785 # If there is no directory component, then add one.
4787 */* |
*\\*) .
$file ;;
4791 # Check the variables that should have been set.
4792 if test -z "$notinst_deplibs"; then
4793 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4798 for lib
in $notinst_deplibs; do
4799 # Check to see that each library is installed.
4801 if test -f "$lib"; then
4802 # If there is no directory component, then add one.
4804 */* |
*\\*) .
$lib ;;
4808 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4809 if test -n "$libdir" && test ! -f "$libfile"; then
4810 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4816 # If there is no directory component, then add one.
4818 */* |
*\\*) .
$file ;;
4823 if test "$fast_install" = no
&& test -n "$relink_command"; then
4824 if test "$finalize" = yes && test -z "$run"; then
4826 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
4827 tmpdir
="$tmpdir/libtool-$$"
4828 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4830 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4833 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4834 outputname
="$tmpdir/$file"
4835 # Replace the output file specification.
4836 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4838 $show "$relink_command"
4839 if $run eval "$relink_command"; then :
4841 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4847 $echo "$modename: warning: cannot relink \`$file'" 1>&2
4850 # Install the binary that we compiled earlier.
4851 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4856 # remove .exe since cygwin /usr/bin/install will append another
4858 case $install_prog,$host in
4859 */usr
/bin
/install*,*cygwin
*)
4860 case $file:$destfile in
4865 destfile
=$destfile.exe
4868 destfile
=`echo $destfile | sed -e 's,.exe$,,'`
4874 $show "$install_prog$stripme $file $destfile"
4875 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
4876 test -n "$outputname" && ${rm}r
"$tmpdir"
4881 for file in $staticlibs; do
4882 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4884 # Set up the ranlib parameters.
4885 oldlib
="$destdir/$name"
4887 $show "$install_prog $file $oldlib"
4888 $run eval "$install_prog \$file \$oldlib" ||
exit $?
4890 if test -n "$stripme" && test -n "$striplib"; then
4891 $show "$old_striplib $oldlib"
4892 $run eval "$old_striplib $oldlib" ||
exit $?
4895 # Do each command in the postinstall commands.
4896 eval cmds
=\"$old_postinstall_cmds\"
4897 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4898 for cmd
in $cmds; do
4901 $run eval "$cmd" ||
exit $?
4906 if test -n "$future_libdirs"; then
4907 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4910 if test -n "$current_libdirs"; then
4911 # Maybe just do a dry run.
4912 test -n "$run" && current_libdirs
=" -n$current_libdirs"
4913 exec_cmd
='$SHELL $0 --finish$current_libdirs'
4919 # libtool finish mode
4921 modename
="$modename: finish"
4925 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4928 libdirs
="$libdirs $dir"
4931 for libdir
in $libdirs; do
4932 if test -n "$finish_cmds"; then
4933 # Do each command in the finish commands.
4934 eval cmds
=\"$finish_cmds\"
4935 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4936 for cmd
in $cmds; do
4939 $run eval "$cmd" || admincmds
="$admincmds
4944 if test -n "$finish_eval"; then
4945 # Do the single finish_eval.
4946 eval cmds
=\"$finish_eval\"
4947 $run eval "$cmds" || admincmds
="$admincmds
4953 # Exit here if they wanted silent mode.
4954 test "$show" = ":" && exit 0
4956 echo "----------------------------------------------------------------------"
4957 echo "Libraries have been installed in:"
4958 for libdir
in $libdirs; do
4962 echo "If you ever happen to want to link against installed libraries"
4963 echo "in a given directory, LIBDIR, you must either use libtool, and"
4964 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4965 echo "flag during linking and do at least one of the following:"
4966 if test -n "$shlibpath_var"; then
4967 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4968 echo " during execution"
4970 if test -n "$runpath_var"; then
4971 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4972 echo " during linking"
4974 if test -n "$hardcode_libdir_flag_spec"; then
4976 eval flag
=\"$hardcode_libdir_flag_spec\"
4978 echo " - use the \`$flag' linker flag"
4980 if test -n "$admincmds"; then
4981 echo " - have your system administrator run these commands:$admincmds"
4983 if test -f /etc
/ld.so.conf
; then
4984 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4987 echo "See any operating system documentation about shared libraries for"
4988 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4989 echo "----------------------------------------------------------------------"
4993 # libtool execute mode
4995 modename
="$modename: execute"
4997 # The first argument is the command name.
4999 if test -z "$cmd"; then
5000 $echo "$modename: you must specify a COMMAND" 1>&2
5005 # Handle -dlopen flags immediately.
5006 for file in $execute_dlfiles; do
5007 if test ! -f "$file"; then
5008 $echo "$modename: \`$file' is not a file" 1>&2
5016 # Check to see that this really is a libtool archive.
5017 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
5019 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5024 # Read the libtool library.
5028 # If there is no directory component, then add one.
5030 */* |
*\\*) .
$file ;;
5034 # Skip this library if it cannot be dlopened.
5035 if test -z "$dlname"; then
5036 # Warn if it was a shared library.
5037 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
5041 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5042 test "X$dir" = "X$file" && dir
=.
5044 if test -f "$dir/$objdir/$dlname"; then
5047 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
5053 # Just add the directory containing the .lo file.
5054 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5055 test "X$dir" = "X$file" && dir
=.
5059 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
5064 # Get the absolute pathname.
5065 absdir
=`cd "$dir" && pwd`
5066 test -n "$absdir" && dir
="$absdir"
5068 # Now add the directory to shlibpath_var.
5069 if eval "test -z \"\$$shlibpath_var\""; then
5070 eval "$shlibpath_var=\"\$dir\""
5072 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
5076 # This variable tells wrapper scripts just to set shlibpath_var
5077 # rather than running their programs.
5078 libtool_execute_magic
="$magic"
5080 # Check if any of the arguments is a wrapper script.
5087 # Do a test to see if this is really a libtool program.
5088 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5089 # If there is no directory component, then add one.
5091 */* |
*\\*) .
$file ;;
5095 # Transform arg to wrapped name.
5096 file="$progdir/$program"
5100 # Quote arguments (to preserve shell metacharacters).
5101 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
5102 args
="$args \"$file\""
5105 if test -z "$run"; then
5106 if test -n "$shlibpath_var"; then
5107 # Export the shlibpath_var.
5108 eval "export $shlibpath_var"
5111 # Restore saved enviroment variables
5112 if test "${save_LC_ALL+set}" = set; then
5113 LC_ALL
="$save_LC_ALL"; export LC_ALL
5115 if test "${save_LANG+set}" = set; then
5116 LANG
="$save_LANG"; export LANG
5119 # Now prepare to actually exec the command.
5120 exec_cmd
='"$cmd"$args'
5122 # Display what would be done.
5123 if test -n "$shlibpath_var"; then
5124 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
5125 $echo "export $shlibpath_var"
5132 # libtool clean and uninstall mode
5134 modename
="$modename: $mode"
5140 # This variable tells wrapper scripts just to set variables rather
5141 # than running their programs.
5142 libtool_install_magic
="$magic"
5147 -f) rm="$rm $arg"; rmforce
=yes ;;
5148 -*) rm="$rm $arg" ;;
5149 *) files
="$files $arg" ;;
5153 if test -z "$rm"; then
5154 $echo "$modename: you must specify an RM program" 1>&2
5161 for file in $files; do
5162 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5163 if test "X$dir" = "X$file"; then
5167 objdir
="$dir/$objdir"
5169 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5170 test $mode = uninstall
&& objdir
="$dir"
5172 # Remember objdir for removal later, being careful to avoid duplicates
5173 if test $mode = clean
; then
5176 *) rmdirs
="$rmdirs $objdir" ;;
5180 # Don't error if the file doesn't exist and rm -f was used.
5181 if (test -L "$file") >/dev
/null
2>&1 \
5182 ||
(test -h "$file") >/dev
/null
2>&1 \
5183 ||
test -f "$file"; then
5185 elif test -d "$file"; then
5188 elif test "$rmforce" = yes; then
5196 # Possibly a libtool archive, so verify it.
5197 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5200 # Delete the libtool libraries and symlinks.
5201 for n
in $library_names; do
5202 rmfiles
="$rmfiles $objdir/$n"
5204 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
5205 test $mode = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
5207 if test $mode = uninstall
; then
5208 if test -n "$library_names"; then
5209 # Do each command in the postuninstall commands.
5210 eval cmds
=\"$postuninstall_cmds\"
5211 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
5212 for cmd
in $cmds; do
5216 if test $?
!= 0 && test "$rmforce" != yes; then
5223 if test -n "$old_library"; then
5224 # Do each command in the old_postuninstall commands.
5225 eval cmds
=\"$old_postuninstall_cmds\"
5226 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
5227 for cmd
in $cmds; do
5231 if test $?
!= 0 && test "$rmforce" != yes; then
5237 # FIXME: should reinstall the best remaining shared library.
5243 # Possibly a libtool object, so verify it.
5244 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5249 # Add PIC object to the list of files to remove.
5250 if test -n "$pic_object" \
5251 && test "$pic_object" != none
; then
5252 rmfiles
="$rmfiles $dir/$pic_object"
5255 # Add non-PIC object to the list of files to remove.
5256 if test -n "$non_pic_object" \
5257 && test "$non_pic_object" != none
; then
5258 rmfiles
="$rmfiles $dir/$non_pic_object"
5264 # Do a test to see if this is a libtool program.
5265 if test $mode = clean
&&
5266 (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5270 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
5271 if test "$fast_install" = yes && test -n "$relink_command"; then
5272 rmfiles
="$rmfiles $objdir/lt-$name"
5277 $show "$rm $rmfiles"
5278 $run $rm $rmfiles || exit_status
=1
5281 # Try to remove the ${objdir}s in the directories where we deleted files
5282 for dir
in $rmdirs; do
5283 if test -d "$dir"; then
5285 $run rmdir $dir >/dev
/null
2>&1
5293 $echo "$modename: you must specify a MODE" 1>&2
5294 $echo "$generic_help" 1>&2
5299 if test -z "$exec_cmd"; then
5300 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5301 $echo "$generic_help" 1>&2
5304 fi # test -z "$show_help"
5306 if test -n "$exec_cmd"; then
5311 # We need to display help for each of the modes.
5314 "Usage: $modename [OPTION]... [MODE-ARG]...
5316 Provide generalized library-building support services.
5318 --config show all configuration variables
5319 --debug enable verbose shell tracing
5320 -n, --dry-run display commands without modifying any files
5321 --features display basic configuration information and exit
5322 --finish same as \`--mode=finish'
5323 --help display this help message and exit
5324 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
5325 --quiet same as \`--silent'
5326 --silent don't print informational messages
5327 --tag=TAG use configuration variables from tag TAG
5328 --version print version information
5330 MODE must be one of the following:
5332 clean remove files from the build directory
5333 compile compile a source file into a libtool object
5334 execute automatically set library path, then run a program
5335 finish complete the installation of libtool libraries
5336 install install libraries or executables
5337 link create a library or an executable
5338 uninstall remove libraries from an installed directory
5340 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
5341 a more detailed description of MODE."
5347 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
5349 Remove files from the build directory.
5351 RM is the name of the program to use to delete files associated with each FILE
5352 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5355 If FILE is a libtool library, object or program, all the files associated
5356 with it are deleted. Otherwise, only FILE itself is deleted using RM."
5361 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
5363 Compile a source file into a libtool library object.
5365 This mode accepts the following additional options:
5367 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
5368 -prefer-pic try to building PIC objects only
5369 -prefer-non-pic try to building non-PIC objects only
5370 -static always build a \`.o' file suitable for static linking
5372 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
5373 from the given SOURCEFILE.
5375 The output file name is determined by removing the directory component from
5376 SOURCEFILE, then substituting the C source code suffix \`.c' with the
5377 library object suffix, \`.lo'."
5382 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
5384 Automatically set library path, then run a program.
5386 This mode accepts the following additional options:
5388 -dlopen FILE add the directory containing FILE to the library path
5390 This mode sets the library path environment variable according to \`-dlopen'
5393 If any of the ARGS are libtool executable wrappers, then they are translated
5394 into their corresponding uninstalled binary, and any of their required library
5395 directories are added to the library path.
5397 Then, COMMAND is executed, with ARGS as arguments."
5402 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
5404 Complete the installation of libtool libraries.
5406 Each LIBDIR is a directory that contains libtool libraries.
5408 The commands that this mode executes may require superuser privileges. Use
5409 the \`--dry-run' option if you just want to see what would be executed."
5414 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
5416 Install executables or libraries.
5418 INSTALL-COMMAND is the installation command. The first component should be
5419 either the \`install' or \`cp' program.
5421 The rest of the components are interpreted as arguments to that command (only
5422 BSD-compatible install options are recognized)."
5427 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
5429 Link object files or libraries together to form another library, or to
5430 create an executable program.
5432 LINK-COMMAND is a command using the C compiler that you would use to create
5433 a program from several object files.
5435 The following components of LINK-COMMAND are treated specially:
5437 -all-static do not do any dynamic linking at all
5438 -avoid-version do not add a version suffix if possible
5439 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
5440 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
5441 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
5442 -export-symbols SYMFILE
5443 try to export only the symbols listed in SYMFILE
5444 -export-symbols-regex REGEX
5445 try to export only the symbols matching REGEX
5446 -LLIBDIR search LIBDIR for required installed libraries
5447 -lNAME OUTPUT-FILE requires the installed library libNAME
5448 -module build a library that can dlopened
5449 -no-fast-install disable the fast-install mode
5450 -no-install link a not-installable executable
5451 -no-undefined declare that a library does not refer to external symbols
5452 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
5453 -objectlist FILE Use a list of object files found in FILE to specify objects
5454 -release RELEASE specify package release information
5455 -rpath LIBDIR the created library will eventually be installed in LIBDIR
5456 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
5457 -static do not do any dynamic linking of libtool libraries
5458 -version-info CURRENT[:REVISION[:AGE]]
5459 specify library version info [each variable defaults to 0]
5461 All other options (arguments beginning with \`-') are ignored.
5463 Every other argument is treated as a filename. Files ending in \`.la' are
5464 treated as uninstalled libtool libraries, other files are standard or library
5467 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
5468 only library objects (\`.lo' files) may be specified, and \`-rpath' is
5469 required, except when creating a convenience library.
5471 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
5472 using \`ar' and \`ranlib', or on Windows using \`lib'.
5474 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
5475 is created, otherwise an executable program is created."
5480 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
5482 Remove libraries from an installation directory.
5484 RM is the name of the program to use to delete files associated with each FILE
5485 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5488 If FILE is a libtool library, all the files associated with it are deleted.
5489 Otherwise, only FILE itself is deleted using RM."
5493 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5500 $echo "Try \`$modename --help' for more information about other modes."
5504 # The TAGs below are defined such that we never get into a situation
5505 # in which we disable both kinds of libraries. Given conflicting
5506 # choices, we go for a static library, that is the most portable,
5507 # since we can't tell whether shared libraries were disabled because
5508 # the user asked for that or because the platform doesn't support
5509 # them. This is particularly important on AIX, because we don't
5510 # support having both static and shared libraries enabled at the same
5511 # time on that platform, so we default to a shared-only configuration.
5512 # If a disable-shared tag is given, we'll fallback to a static-only
5513 # configuration. But we'll never go from static-only to shared-only.
5515 ### BEGIN LIBTOOL TAG CONFIG: disable-shared
5516 build_libtool_libs
=no
5518 ### END LIBTOOL TAG CONFIG: disable-shared
5520 ### BEGIN LIBTOOL TAG CONFIG: disable-static
5521 build_old_libs
=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
5522 ### END LIBTOOL TAG CONFIG: disable-static