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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.226 2001/04/12 02:39:36)"
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/"
111 # Parse our command line options once, thoroughly.
118 -*=*) optarg
=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
122 # If the previous option needs an argument, assign it.
123 if test -n "$prev"; then
126 execute_dlfiles
="$execute_dlfiles $arg"
131 # Check whether tagname contains only valid characters
134 echo "$progname: invalid tag name: $tagname" 1>&2
141 # Don't test for the "default" C tag, as we know, it's there, but
142 # not specially marked.
145 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev
/null
; then
146 taglist
="$taglist $tagname"
147 # Evaluate the configuration.
148 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
150 echo "$progname: ignoring unknown tag $tagname" 1>&2
165 # Have we seen a non-optional argument yet?
172 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
177 sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
178 # Now print the configurations for the tags.
179 for tagname
in $taglist; do
180 sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
186 echo "$progname: enabling shell trace mode"
196 if test "$build_libtool_libs" = yes; then
197 echo "enable shared libraries"
199 echo "disable shared libraries"
201 if test "$build_old_libs" = yes; then
202 echo "enable static libraries"
204 echo "disable static libraries"
209 --finish) mode
="finish" ;;
211 --mode) prevopt
="--mode" prev
=mode
;;
212 --mode=*) mode
="$optarg" ;;
218 --tag) prevopt
="--tag" prev
=tag
;;
220 set tag
"$optarg" ${1+"$@"}
231 $echo "$modename: unrecognized option \`$arg'" 1>&2
243 if test -n "$prevopt"; then
244 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
249 if test -z "$show_help"; then
251 # Infer the operation mode.
252 if test -z "$mode"; then
254 *cc |
*++ | gcc
* |
*-gcc*)
266 *db |
*dbx |
*strace |
*truss
)
276 # If we have no mode, but dlfiles were specified, then do execute mode.
277 test -n "$execute_dlfiles" && mode
=execute
279 # Just use the default operation mode.
280 if test -z "$mode"; then
281 if test -n "$nonopt"; then
282 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
284 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
291 # Only execute mode is allowed to have -dlopen flags.
292 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
293 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
298 # Change the help message to a mode-specific one.
300 help="Try \`$modename --help --mode=$mode' for more information."
302 # These modes are in order of execution frequency so that they run quickly.
304 # libtool compile mode
306 modename
="$modename: compile"
307 # Get the compilation command and the source file.
320 # Aesthetically quote the previous argument.
322 lastarg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
325 # Double-quote args containing other shell metacharacters.
326 # Many Bourne shells cannot handle close brackets correctly
327 # in scan sets, so we specify it separately.
328 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
333 # Add the previous argument to base_compile.
334 if test -z "$base_compile"; then
335 base_compile
="$lastarg"
337 base_compile
="$base_compile $lastarg"
343 # Accept any command-line options.
346 if test "$user_target" != "no"; then
347 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
374 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
376 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
380 # Double-quote args containing other shell metacharacters.
381 # Many Bourne shells cannot handle close brackets correctly
382 # in scan sets, so we specify it separately.
384 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
388 lastarg
="$lastarg $arg"
391 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
393 # Add the arguments to base_compile.
394 if test -z "$base_compile"; then
395 base_compile
="$lastarg"
397 base_compile
="$base_compile $lastarg"
405 # The next one is the -o target name
410 # We got the output file
417 # Accept the current argument as the source file.
421 # Aesthetically quote the previous argument.
423 # Backslashify any backslashes, double quotes, and dollar signs.
424 # These are the only characters that are still specially
425 # interpreted inside of double-quoted scrings.
426 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
428 # Double-quote args containing other shell metacharacters.
429 # Many Bourne shells cannot handle close brackets correctly
430 # in scan sets, so we specify it separately.
432 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
433 lastarg
="\"$lastarg\""
437 # Add the previous argument to base_compile.
438 if test -z "$base_compile"; then
439 base_compile
="$lastarg"
441 base_compile
="$base_compile $lastarg"
449 # Get the name of the library object.
450 libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
453 $echo "$modename: you must specify a target with \`-o'" 1>&2
458 # Recognize several different file suffixes.
459 # If the user specifies -o file.o, it is replaced with file.lo
468 *.class
) xform
=class
;;
473 *.java
) xform
=java
;;
476 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
479 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
481 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
486 # Infer tagged configuration to use if any are available and
487 # if one wasn't chosen via the "--tag" command line option.
488 # Only attempt this if the compiler in the base compile
489 # command doesn't match the default compiler.
490 if test -n "$available_tags" && test -z "$tagname"; then
491 case $base_compile in
493 # Blanks in the command may have been stripped by the calling shell,
494 # but not from the CC environment variable when ltconfig was run.
497 for z
in $available_tags; do
498 if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
499 # Evaluate the configuration.
500 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
501 case $base_compile in
503 # The compiler in the base compile command matches
504 # the one in the tagged configuration.
505 # Assume this is the tagged configuration we want.
516 # If $tagname still isn't set, then no tagged configuration
517 # was found and let the user know that the "--tag" command
518 # line option must be used.
519 if test -z "$tagname"; then
520 echo "$modename: unable to infer tagged configuration"
521 echo "$modename: specify a tag with \`--tag'" 1>&2
524 # echo "$modename: using $tagname tagged configuration"
530 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
531 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
532 if test "X$xdir" = "X$obj"; then
537 lobj
=${xdir}$objdir/$objname
539 if test -z "$base_compile"; then
540 $echo "$modename: you must specify a compilation command" 1>&2
545 # Delete any leftover library objects.
546 if test "$build_old_libs" = yes; then
547 removelist
="$obj $lobj $libobj ${libobj}T"
549 removelist
="$lobj $libobj ${libobj}T"
553 trap "$run $rm $removelist; exit 1" 1 2 15
555 # On Cygwin there's no "real" PIC flag so we must build both object types
557 cygwin
* | mingw
* | pw32
* | os2
*)
561 if test $pic_mode = no
&& test "$deplibs_check_method" != pass_all
; then
562 # non-PIC code in shared libraries is not supported
566 # Calculate the filename of the output object if compiler does
567 # not support -o with -c
568 if test "$compiler_c_o" = no
; then
569 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
570 lockfile
="$output_obj.lock"
571 removelist
="$removelist $output_obj $lockfile"
572 trap "$run $rm $removelist; exit 1" 1 2 15
579 # Lock this critical section if it is needed
580 # We use this script file to make the link, it avoids creating a new file
581 if test "$need_locks" = yes; then
582 until $run ln "$0" "$lockfile" 2>/dev
/null
; do
583 $show "Waiting for $lockfile to be removed"
586 elif test "$need_locks" = warn
; then
587 if test -f "$lockfile"; then
589 *** ERROR, $lockfile exists and contains:
590 `cat $lockfile 2>/dev/null`
592 This indicates that another process is trying to use the same
593 temporary object file, and libtool could not work around it because
594 your compiler does not support \`-c' and \`-o' together. If you
595 repeat this compilation, it may succeed, by chance, but you had better
596 avoid parallel builds (make -j) in this platform, or get a better
602 echo $srcfile > "$lockfile"
605 if test -n "$fix_srcfile_path"; then
606 eval srcfile
=\"$fix_srcfile_path\"
609 $run $rm "$libobj" "${libobj}T"
611 # Create a libtool object file (analogous to a ".la" file),
612 # but don't create it if we're doing a dry run.
613 test -z "$run" && cat > ${libobj}T
<<EOF
614 # $libobj - a libtool object file
615 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
617 # Please DO NOT delete this file!
618 # It is necessary for linking the library.
620 # Name of the PIC object.
623 # Only build a PIC object if we are building libtool libraries.
624 if test "$build_libtool_libs" = yes; then
625 # Without this assignment, base_compile gets emptied.
626 fbsd_hideous_sh_bug
=$base_compile
628 if test "$pic_mode" != no
; then
629 command="$base_compile $srcfile $pic_flag"
631 # Don't build PIC code
632 command="$base_compile $srcfile"
635 if test ! -d ${xdir}$objdir; then
636 $show "$mkdir ${xdir}$objdir"
637 $run $mkdir ${xdir}$objdir
639 if test $status -ne 0 && test ! -d ${xdir}$objdir; then
644 if test -z "$output_obj"; then
645 # Place PIC objects in $objdir
646 command="$command -o $lobj"
649 $run $rm "$lobj" "$output_obj"
652 if $run eval "$command"; then :
654 test -n "$output_obj" && $run $rm $removelist
658 if test "$need_locks" = warn
&&
659 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
661 *** ERROR, $lockfile contains:
662 `cat $lockfile 2>/dev/null`
664 but it should contain:
667 This indicates that another process is trying to use the same
668 temporary object file, and libtool could not work around it because
669 your compiler does not support \`-c' and \`-o' together. If you
670 repeat this compilation, it may succeed, by chance, but you had better
671 avoid parallel builds (make -j) in this platform, or get a better
678 # Just move the object if needed, then go on to compile the next one
679 if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
680 $show "$mv $output_obj $lobj"
681 if $run $mv $output_obj $lobj; then :
689 # Append the name of the PIC object to the libtool object file.
690 test -z "$run" && cat >> ${libobj}T
<<EOF
691 pic_object='$objdir/$objname'
695 # Allow error messages only from the first compilation.
696 suppress_output
=' >/dev/null 2>&1'
698 # No PIC object so indicate it doesn't exist in the libtool
700 test -z "$run" && cat >> ${libobj}T
<<EOF
706 # Only build a position-dependent object if we build old libraries.
707 if test "$build_old_libs" = yes; then
708 if test "$pic_mode" != yes; then
709 # Don't build PIC code
710 command="$base_compile $srcfile"
712 command="$base_compile $srcfile $pic_flag"
714 if test "$compiler_c_o" = yes; then
715 command="$command -o $obj"
718 # Suppress compiler output if we already did a PIC compilation.
719 command="$command$suppress_output"
720 $run $rm "$obj" "$output_obj"
722 if $run eval "$command"; then :
728 if test "$need_locks" = warn
&&
729 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
731 *** ERROR, $lockfile contains:
732 `cat $lockfile 2>/dev/null`
734 but it should contain:
737 This indicates that another process is trying to use the same
738 temporary object file, and libtool could not work around it because
739 your compiler does not support \`-c' and \`-o' together. If you
740 repeat this compilation, it may succeed, by chance, but you had better
741 avoid parallel builds (make -j) in this platform, or get a better
748 # Just move the object if needed
749 if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
750 $show "$mv $output_obj $obj"
751 if $run $mv $output_obj $obj; then :
759 # Append the name of the non-PIC object the libtool object file.
760 # Only append if the libtool object file exists.
761 test -z "$run" && cat >> ${libobj}T
<<EOF
762 # Name of the non-PIC object.
763 non_pic_object='$objname'
767 # Append the name of the non-PIC object the libtool object file.
768 # Only append if the libtool object file exists.
769 test -z "$run" && cat >> ${libobj}T
<<EOF
770 # Name of the non-PIC object.
776 $run $mv "${libobj}T" "${libobj}"
778 # Unlock the critical section if it was locked
779 if test "$need_locks" != no
; then
788 modename
="$modename: link"
790 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
791 # It is impossible to link a dll without this setting, and
792 # we shouldn't force the makefile maintainer to figure out
793 # which system we are compiling for in order to pass an extra
794 # flag for every libtool invokation.
797 # FIXME: Unfortunately, there are problems with the above when trying
798 # to make a dll which has undefined symbols, in which case not
799 # even a static library is built. For now, we need to specify
800 # -no-undefined on the libtool link line when we can be certain
801 # that all symbols are satisfied, otherwise we get a static library.
808 libtool_args
="$nonopt"
809 base_compile
="$nonopt"
810 compile_command
="$nonopt"
811 finalize_command
="$nonopt"
824 lib_search_path
=`pwd`
832 export_symbols_regex
=
840 prefer_static_libs
=no
852 # We need to know -static, to get the right output filenames.
856 -all-static |
-static)
857 if test "X$arg" = "X-all-static"; then
858 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
859 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
861 if test -n "$link_static_flag"; then
862 dlopen_self
=$dlopen_self_static
865 if test -z "$pic_flag" && test -n "$link_static_flag"; then
866 dlopen_self
=$dlopen_self_static
869 build_libtool_libs
=no
871 prefer_static_libs
=yes
877 # See if our shared archives depend on static archives.
878 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
880 # Go through the arguments, transforming them on the way.
881 while test $# -gt 0; do
883 base_compile
="$base_compile $arg"
886 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
887 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
891 libtool_args
="$libtool_args $qarg"
893 # If the previous option needs an argument, assign it.
894 if test -n "$prev"; then
897 compile_command
="$compile_command @OUTPUT@"
898 finalize_command
="$finalize_command @OUTPUT@"
904 if test "$preload" = no
; then
905 # Add the symbol object into the linking commands.
906 compile_command
="$compile_command @SYMFILE@"
907 finalize_command
="$finalize_command @SYMFILE@"
911 *.la |
*.lo
) ;; # We handle these cases below.
913 if test "$dlself" = no
; then
921 if test "$prev" = dlprefiles
; then
923 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
933 if test "$prev" = dlfiles
; then
934 dlfiles
="$dlfiles $arg"
936 dlprefiles
="$dlprefiles $arg"
944 export_symbols
="$arg"
945 if test ! -f "$arg"; then
946 $echo "$modename: symbol file \`$arg' does not exist"
953 export_symbols_regex
="$arg"
963 if test -f "$arg"; then
966 for fil
in `cat $save_arg`
968 # moreargs="$moreargs $fil"
970 # A libtool-controlled object.
972 # Check to see that this really is a libtool object.
973 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
978 # If there is no directory component, then add one.
980 */* |
*\\*) .
$arg ;;
984 if test -z "$pic_object" || \
985 test -z "$non_pic_object" ||
986 test "$pic_object" = none
&& \
987 test "$non_pic_object" = none
; then
988 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
992 # Extract subdirectory from the argument.
993 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
994 if test "X$xdir" = "X$arg"; then
1000 if test "$pic_object" != none
; then
1001 # Prepend the subdirectory the object is found in.
1002 pic_object
="$xdir$pic_object"
1004 if test "$prev" = dlfiles
; then
1005 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1006 dlfiles
="$dlfiles $pic_object"
1010 # If libtool objects are unsupported, then we need to preload.
1015 # CHECK ME: I think I busted this. -Ossama
1016 if test "$prev" = dlprefiles
; then
1017 # Preload the old-style object.
1018 dlprefiles
="$dlprefiles $pic_object"
1023 libobjs
="$libobjs $pic_object"
1028 if test "$non_pic_object" != none
; then
1029 # Prepend the subdirectory the object is found in.
1030 non_pic_object
="$xdir$non_pic_object"
1032 # A standard non-PIC object
1033 non_pic_objects
="$non_pic_objects $non_pic_object"
1034 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1035 arg
="$non_pic_object"
1039 # Only an error if not doing a dry-run.
1040 if test -z "$run"; then
1041 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1046 # Extract subdirectory from the argument.
1047 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1048 if test "X$xdir" = "X$arg"; then
1054 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1055 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1056 libobjs
="$libobjs $pic_object"
1057 non_pic_objects
="$non_pic_objects $non_pic_object"
1062 $echo "$modename: link input file \`$save_arg' does not exist"
1070 # We need an absolute path.
1072 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1074 $echo "$modename: only absolute run-paths are allowed" 1>&2
1078 if test "$prev" = rpath
; then
1081 *) rpath
="$rpath $arg" ;;
1086 *) xrpath
="$xrpath $arg" ;;
1093 compiler_flags
="$compiler_flags $qarg"
1095 compile_command
="$compile_command $qarg"
1096 finalize_command
="$finalize_command $qarg"
1100 linker_flags
="$linker_flags $qarg"
1101 compiler_flags
="$compiler_flags $wl$qarg"
1103 compile_command
="$compile_command $wl$qarg"
1104 finalize_command
="$finalize_command $wl$qarg"
1108 eval "$prev=\"\$arg\""
1119 if test -n "$link_static_flag"; then
1120 compile_command
="$compile_command $link_static_flag"
1121 finalize_command
="$finalize_command $link_static_flag"
1127 # FIXME: remove this flag sometime in the future.
1128 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1152 -export-symbols |
-export-symbols-regex)
1153 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1154 $echo "$modename: not more than one -exported-symbols argument allowed"
1157 if test "X$arg" = "X-export-symbols"; then
1165 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1166 # so, if we see these flags be careful not to treat them like -L
1168 case $with_gcc/$host in
1170 compile_command
="$compile_command $arg"
1171 finalize_command
="$finalize_command $arg"
1178 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1179 # We need an absolute path.
1181 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1183 absdir
=`cd "$dir" && pwd`
1184 if test -z "$absdir"; then
1185 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1194 deplibs
="$deplibs -L$dir"
1195 lib_search_path
="$lib_search_path $dir"
1199 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1200 case :$dllsearchpath: in
1202 *) dllsearchpath
="$dllsearchpath:$dir";;
1210 if test "$arg" = "-lc"; then
1212 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
1213 # These systems don't actually have c library (as such)
1216 *-*-rhapsody* |
*-*-darwin1.
[012])
1217 # Rhapsody C library is in the System framework
1218 deplibs
="$deplibs -framework System"
1222 elif test "$arg" = "-lm"; then
1224 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1225 # These systems don't actually have math library (as such)
1228 *-*-rhapsody* |
*-*-darwin1.
[012])
1229 # Rhapsody math library is in the System framework
1230 deplibs
="$deplibs -framework System"
1235 deplibs
="$deplibs $arg"
1251 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1252 # The PATH hackery in wrapper scripts is required on Windows
1253 # in order for the loader to find any dlls it needs.
1254 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1255 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1293 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1294 # We need an absolute path.
1296 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1298 $echo "$modename: only absolute run-paths are allowed" 1>&2
1304 *) xrpath
="$xrpath $dir" ;;
1310 # The effects of -static are defined in a previous loop.
1311 # We used to do the same as -all-static on platforms that
1312 # didn't have a PIC flag, but the assumption that the effects
1313 # would be equivalent was wrong. It would break on at least
1314 # Digital Unix and AIX.
1329 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1331 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
1332 for flag
in $args; do
1335 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1340 compiler_flags
="$compiler_flags $flag"
1343 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1347 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1349 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
1350 for flag
in $args; do
1353 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1358 compiler_flags
="$compiler_flags $wl$flag"
1359 linker_flags
="$linker_flags $flag"
1362 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1375 # Some other compiler flag.
1377 # Unknown arguments in both finalize_command and compile_command need
1378 # to be aesthetically quoted because they are evaled later.
1379 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1381 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1388 # A standard object.
1393 # A libtool-controlled object.
1395 # Check to see that this really is a libtool object.
1396 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1401 # If there is no directory component, then add one.
1403 */* |
*\\*) .
$arg ;;
1407 if test -z "$pic_object" || \
1408 test -z "$non_pic_object" ||
1409 test "$pic_object" = none
&& \
1410 test "$non_pic_object" = none
; then
1411 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1415 # Extract subdirectory from the argument.
1416 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1417 if test "X$xdir" = "X$arg"; then
1423 if test "$pic_object" != none
; then
1424 # Prepend the subdirectory the object is found in.
1425 pic_object
="$xdir$pic_object"
1427 if test "$prev" = dlfiles
; then
1428 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1429 dlfiles
="$dlfiles $pic_object"
1433 # If libtool objects are unsupported, then we need to preload.
1438 # CHECK ME: I think I busted this. -Ossama
1439 if test "$prev" = dlprefiles
; then
1440 # Preload the old-style object.
1441 dlprefiles
="$dlprefiles $pic_object"
1446 libobjs
="$libobjs $pic_object"
1451 if test "$non_pic_object" != none
; then
1452 # Prepend the subdirectory the object is found in.
1453 non_pic_object
="$xdir$non_pic_object"
1455 # A standard non-PIC object
1456 non_pic_objects
="$non_pic_objects $non_pic_object"
1457 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1458 arg
="$non_pic_object"
1462 # Only an error if not doing a dry-run.
1463 if test -z "$run"; then
1464 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1469 # Extract subdirectory from the argument.
1470 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1471 if test "X$xdir" = "X$arg"; then
1477 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1478 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1479 libobjs
="$libobjs $pic_object"
1480 non_pic_objects
="$non_pic_objects $non_pic_object"
1487 deplibs
="$deplibs $arg"
1488 old_deplibs
="$old_deplibs $arg"
1493 # A libtool-controlled library.
1495 if test "$prev" = dlfiles
; then
1496 # This library was specified with -dlopen.
1497 dlfiles
="$dlfiles $arg"
1499 elif test "$prev" = dlprefiles
; then
1500 # The library was specified with -dlpreopen.
1501 dlprefiles
="$dlprefiles $arg"
1504 deplibs
="$deplibs $arg"
1509 # Some other compiler argument.
1511 # Unknown arguments in both finalize_command and compile_command need
1512 # to be aesthetically quoted because they are evaled later.
1513 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1515 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1522 # Now actually substitute the argument into the commands.
1523 if test -n "$arg"; then
1524 compile_command
="$compile_command $arg"
1525 finalize_command
="$finalize_command $arg"
1529 if test -n "$prev"; then
1530 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1535 # Infer tagged configuration to use if any are available and
1536 # if one wasn't chosen via the "--tag" command line option.
1537 # Only attempt this if the compiler in the base link
1538 # command doesn't match the default compiler.
1539 if test -n "$available_tags" && test -z "$tagname"; then
1540 case $base_compile in
1542 # Blanks in the command may have been stripped by the calling shell,
1543 # but not from the CC environment variable when ltconfig was run.
1546 for z
in $available_tags; do
1547 if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
1548 # Evaluate the configuration.
1549 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1550 case $base_compile in
1552 # The compiler in $compile_command matches
1553 # the one in the tagged configuration.
1554 # Assume this is the tagged configuration we want.
1565 # If $tagname still isn't set, then no tagged configuration
1566 # was found and let the user know that the "--tag" command
1567 # line option must be used.
1568 if test -z "$tagname"; then
1569 echo "$modename: unable to infer tagged configuration"
1570 echo "$modename: specify a tag with \`--tag'" 1>&2
1573 # echo "$modename: using $tagname tagged configuration"
1579 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1580 eval arg
=\"$export_dynamic_flag_spec\"
1581 compile_command
="$compile_command $arg"
1582 finalize_command
="$finalize_command $arg"
1586 # calculate the name of the file, without its directory
1587 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1588 libobjs_save
="$libobjs"
1590 if test -n "$shlibpath_var"; then
1591 # get the directories listed in $shlibpath_var
1592 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1596 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
1597 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
1599 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1600 if test "X$output_objdir" = "X$output"; then
1601 output_objdir
="$objdir"
1603 output_objdir
="$output_objdir/$objdir"
1605 # Create the object directory.
1606 if test ! -d $output_objdir; then
1607 $show "$mkdir $output_objdir"
1608 $run $mkdir $output_objdir
1610 if test $status -ne 0 && test ! -d $output_objdir; then
1615 # Determine the type of output
1618 $echo "$modename: you must specify an output file" 1>&2
1622 *.
$libext) linkmode
=oldlib
;;
1623 *.lo |
*.
$objext) linkmode
=obj
;;
1624 *.la
) linkmode
=lib
;;
1625 *) linkmode
=prog
;; # Anything else should be a program.
1630 # Find all interdependent deplibs by searching for libraries
1631 # that are linked more than once (e.g. -la -lb -la)
1632 for deplib
in $deplibs; do
1634 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1636 libs
="$libs $deplib"
1639 if test $linkmode = lib
; then
1640 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
1642 # Compute libraries that are listed more than once in $predeps
1643 # $postdeps and mark them as special (i.e., whose duplicates are
1644 # not to be eliminated).
1646 for pre_post_dep
in $predeps $postdeps; do
1647 case "$pre_post_deps " in
1648 *" $pre_post_dep "*) specialdeplibs
="$specialdeplibs $pre_post_deps" ;;
1650 pre_post_deps
="$pre_post_deps $pre_post_dep"
1658 need_relink
=no
# whether we're linking any uninstalled libtool libraries
1659 uninst_deplibs
= # uninstalled libtool libraries
1660 uninst_path
= # paths that contain uninstalled libtool libraries
1664 for file in $dlfiles $dlprefiles; do
1668 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1680 passes
="conv scan dlopen dlpreopen link"
1685 for pass
in $passes; do
1686 if test "$linkmode,$pass" = "lib,link" ||
1687 test "$linkmode,$pass" = "prog,scan"; then
1691 if test $linkmode = prog
; then
1693 dlopen
) libs
="$dlfiles" ;;
1694 dlpreopen
) libs
="$dlprefiles" ;;
1695 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
1698 if test $pass = dlopen
; then
1699 # Collect dlpreopened libraries
1700 save_deplibs
="$deplibs"
1703 for deplib
in $libs; do
1708 if test $linkmode != lib
&& test $linkmode != prog
; then
1709 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1712 if test $pass = conv
; then
1713 deplibs
="$deplib $deplibs"
1716 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1717 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1718 # Search the libtool library
1719 lib
="$searchdir/lib${name}.la"
1720 if test -f "$lib"; then
1725 if test "$found" != yes; then
1726 if test "$linkmode,$pass" = "prog,link"; then
1727 compile_deplibs
="$deplib $compile_deplibs"
1728 finalize_deplibs
="$deplib $finalize_deplibs"
1730 deplibs
="$deplib $deplibs"
1731 test $linkmode = lib
&& newdependency_libs
="$deplib $newdependency_libs"
1739 deplibs
="$deplib $deplibs"
1740 test $pass = conv
&& continue
1741 newdependency_libs
="$deplib $newdependency_libs"
1742 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1745 if test $pass = conv
; then
1746 deplibs
="$deplib $deplibs"
1749 if test $pass = scan
; then
1750 deplibs
="$deplib $deplibs"
1751 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1753 compile_deplibs
="$deplib $compile_deplibs"
1754 finalize_deplibs
="$deplib $finalize_deplibs"
1758 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
1764 if test $pass = link
; then
1765 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1766 # Make sure the xrpath contains only unique directories.
1769 *) xrpath
="$xrpath $dir" ;;
1772 deplibs
="$deplib $deplibs"
1775 *.la
) lib
="$deplib" ;;
1777 if test $pass = conv
; then
1778 deplibs
="$deplib $deplibs"
1783 if test "$deplibs_check_method" != pass_all
; then
1785 echo "*** Warning: This library needs some functionality provided by $deplib."
1786 echo "*** I have the capability to make that library automatically link in when"
1787 echo "*** you link to this library. But I can only do this if you have a"
1788 echo "*** shared version of the library, which you do not appear to have."
1791 echo "*** Warning: Linking the shared library $output against the"
1792 echo "*** static library $deplib is not portable!"
1793 deplibs
="$deplib $deplibs"
1798 if test $pass != link
; then
1799 deplibs
="$deplib $deplibs"
1801 compile_deplibs
="$deplib $compile_deplibs"
1802 finalize_deplibs
="$deplib $finalize_deplibs"
1809 if test $pass = conv
; then
1810 deplibs
="$deplib $deplibs"
1811 elif test $linkmode = prog
; then
1812 if test $pass = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
1813 # If there is no dlopen support or we're linking statically,
1814 # we need to preload.
1815 newdlprefiles
="$newdlprefiles $deplib"
1816 compile_deplibs
="$deplib $compile_deplibs"
1817 finalize_deplibs
="$deplib $finalize_deplibs"
1819 newdlfiles
="$newdlfiles $deplib"
1829 if test $found = yes ||
test -f "$lib"; then :
1831 $echo "$modename: cannot find the library \`$lib'" 1>&2
1835 # Check to see that this really is a libtool archive.
1836 if (sed -e '2q' $lib |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
1838 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1842 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1843 test "X$ladir" = "X$lib" && ladir
="."
1851 # If the library was installed with an old release of libtool,
1852 # it will not redefine variable installed.
1857 */* |
*\\*) .
$lib ;;
1861 if test "$linkmode,$pass" = "lib,link" ||
1862 test "$linkmode,$pass" = "prog,scan" ||
1863 { test $linkmode != prog
&& test $linkmode != lib
; }; then
1864 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
1865 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
1868 if test $pass = conv
; then
1869 # only check for convenience libraries
1870 deplibs
="$lib $deplibs"
1871 if test -z "$libdir"; then
1872 if test -z "$old_library"; then
1873 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1876 # It is a libtool convenience library, so add in its objects.
1877 convenience
="$convenience $ladir/$objdir/$old_library"
1878 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
1880 for deplib
in $dependency_libs; do
1881 deplibs
="$deplib $deplibs"
1882 case "$tmp_libs " in
1883 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1885 tmp_libs
="$tmp_libs $deplib"
1887 elif test $linkmode != prog
&& test $linkmode != lib
; then
1888 $echo "$modename: \`$lib' is not a convenience library" 1>&2
1894 # Get the name of the library we link against.
1896 for l
in $old_library $library_names; do
1899 if test -z "$linklib"; then
1900 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1904 # This library was specified with -dlopen.
1905 if test $pass = dlopen
; then
1906 if test -z "$libdir"; then
1907 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1910 if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
1911 # If there is no dlname, no dlopen support or we're linking
1912 # statically, we need to preload. We also need to preload any
1913 # dependent libraries so libltdl's deplib preloader doesn't
1914 # bomb out in the load deplibs phase.
1915 dlprefiles
="$dlprefiles $lib $dependency_libs"
1917 newdlfiles
="$newdlfiles $lib"
1922 # We need an absolute path.
1924 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
1926 abs_ladir
=`cd "$ladir" && pwd`
1927 if test -z "$abs_ladir"; then
1928 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1929 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1934 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1936 # Find the relevant object directory and library name.
1937 if test "X$installed" = Xyes
; then
1938 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1939 $echo "$modename: warning: library \`$lib' was moved." 1>&2
1948 dir
="$ladir/$objdir"
1949 absdir
="$abs_ladir/$objdir"
1950 # Remove this search path later
1951 uninst_path
="$uninst_path $abs_ladir"
1953 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1955 # This library was specified with -dlpreopen.
1956 if test $pass = dlpreopen
; then
1957 if test -z "$libdir"; then
1958 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1961 # Prefer using a static library (so that no silly _DYNAMIC symbols
1962 # are required to link).
1963 if test -n "$old_library"; then
1964 newdlprefiles
="$newdlprefiles $dir/$old_library"
1965 # Otherwise, use the dlname, so that lt_dlopen finds it.
1966 elif test -n "$dlname"; then
1967 newdlprefiles
="$newdlprefiles $dir/$dlname"
1969 newdlprefiles
="$newdlprefiles $dir/$linklib"
1973 if test -z "$libdir"; then
1974 # link the convenience library
1975 if test $linkmode = lib
; then
1976 deplibs
="$dir/$old_library $deplibs"
1977 elif test "$linkmode,$pass" = "prog,link"; then
1978 compile_deplibs
="$dir/$old_library $compile_deplibs"
1979 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
1981 deplibs
="$lib $deplibs" # used for prog,scan pass
1986 if test $linkmode = prog
&& test $pass != link
; then
1987 newlib_search_path
="$newlib_search_path $ladir"
1988 deplibs
="$lib $deplibs"
1991 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
1992 test "$build_libtool_libs" = no
; then
1997 for deplib
in $dependency_libs; do
1999 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2001 # Need to link against all dependency_libs?
2002 if test $linkalldeplibs = yes; then
2003 deplibs
="$deplib $deplibs"
2005 # Need to hardcode shared library paths
2006 # or/and link against static libraries
2007 newdependency_libs
="$deplib $newdependency_libs"
2009 case "$tmp_libs " in
2010 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2012 tmp_libs
="$tmp_libs $deplib"
2017 if test "$linkmode,$pass" = "prog,link"; then
2018 if test -n "$library_names" &&
2019 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2020 # We need to hardcode the library path
2021 if test -n "$shlibpath_var"; then
2022 # Make sure the rpath contains only unique directories.
2023 case "$temp_rpath " in
2026 *) temp_rpath
="$temp_rpath $dir" ;;
2030 # Hardcode the library path.
2031 # Skip directories that are in the system default run-time
2033 case " $sys_lib_dlsearch_path " in
2036 case "$compile_rpath " in
2038 *) compile_rpath
="$compile_rpath $absdir"
2043 case " $sys_lib_dlsearch_path " in
2046 case "$finalize_rpath " in
2048 *) finalize_rpath
="$finalize_rpath $libdir"
2054 if test "$alldeplibs" = yes &&
2055 { test "$deplibs_check_method" = pass_all ||
2056 { test "$build_libtool_libs" = yes &&
2057 test -n "$library_names"; }; }; then
2058 # We only need to search for static libraries
2063 link_static
=no
# Whether the deplib will be linked statically
2064 if test -n "$library_names" &&
2065 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2066 if test "$installed" = no
; then
2067 uninst_deplibs
="$uninst_deplibs $lib"
2070 # This is a shared library
2071 if test $linkmode = lib
&&
2072 test $hardcode_into_libs = yes; then
2073 # Hardcode the library path.
2074 # Skip directories that are in the system default run-time
2076 case " $sys_lib_dlsearch_path " in
2079 case "$compile_rpath " in
2081 *) compile_rpath
="$compile_rpath $absdir"
2085 case " $sys_lib_dlsearch_path " in
2088 case "$finalize_rpath " in
2090 *) finalize_rpath
="$finalize_rpath $libdir"
2096 if test -n "$old_archive_from_expsyms_cmds"; then
2097 # figure out the soname
2098 set dummy
$library_names
2101 libname
=`eval \\$echo \"$libname_spec\"`
2102 # use dlname if we got it. it's perfectly good, no?
2103 if test -n "$dlname"; then
2105 elif test -n "$soname_spec"; then
2109 major
=`expr $current - $age`
2113 eval soname
=\"$soname_spec\"
2118 # Make a new name for the extract_expsyms_cmds to use
2120 soname
=`echo $soroot | sed -e 's/^.*\///'`
2121 newlib
="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
2123 # If the library has no export list, then create one now
2124 if test -f "$output_objdir/$soname-def"; then :
2126 $show "extracting exported symbol list from \`$soname'"
2127 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2128 eval cmds
=\"$extract_expsyms_cmds\"
2129 for cmd
in $cmds; do
2132 $run eval "$cmd" ||
exit $?
2138 if test -f "$output_objdir/$newlib"; then :; else
2139 $show "generating import library for \`$soname'"
2140 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2141 eval cmds
=\"$old_archive_from_expsyms_cmds\"
2142 for cmd
in $cmds; do
2145 $run eval "$cmd" ||
exit $?
2149 # make sure the library variables are pointing to the new library
2154 if test $linkmode = prog ||
test "$mode" != relink
; then
2159 case $hardcode_action in
2160 immediate | unsupported
)
2161 if test "$hardcode_direct" = no
; then
2163 elif test "$hardcode_minus_L" = no
; then
2165 *-*-sunos*) add_shlibpath
="$dir" ;;
2169 elif test "$hardcode_shlibpath_var" = no
; then
2170 add_shlibpath
="$dir"
2177 if test "$hardcode_direct" = yes; then
2179 elif test "$hardcode_minus_L" = yes; then
2182 elif test "$hardcode_shlibpath_var" = yes; then
2183 add_shlibpath
="$dir"
2192 if test "$lib_linked" != yes; then
2193 $echo "$modename: configuration error: unsupported hardcode properties"
2197 if test -n "$add_shlibpath"; then
2198 case :$compile_shlibpath: in
2199 *":$add_shlibpath:"*) ;;
2200 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2203 if test $linkmode = prog
; then
2204 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2205 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2207 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2208 test -n "$add" && deplibs
="$add $deplibs"
2209 if test "$hardcode_direct" != yes && \
2210 test "$hardcode_minus_L" != yes && \
2211 test "$hardcode_shlibpath_var" = yes; then
2212 case :$finalize_shlibpath: in
2214 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2220 if test $linkmode = prog ||
test "$mode" = relink
; then
2224 # Finalize command for both is simple: just hardcode it.
2225 if test "$hardcode_direct" = yes; then
2226 add
="$libdir/$linklib"
2227 elif test "$hardcode_minus_L" = yes; then
2230 elif test "$hardcode_shlibpath_var" = yes; then
2231 case :$finalize_shlibpath: in
2233 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2237 # We cannot seem to hardcode it, guess we'll fake it.
2242 if test $linkmode = prog
; then
2243 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
2244 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
2246 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2247 test -n "$add" && deplibs
="$add $deplibs"
2250 elif test $linkmode = prog
; then
2251 # Here we assume that one of hardcode_direct or hardcode_minus_L
2252 # is not unsupported. This is valid on all known static and
2254 if test "$hardcode_direct" != unsupported
; then
2255 test -n "$old_library" && linklib
="$old_library"
2256 compile_deplibs
="$dir/$linklib $compile_deplibs"
2257 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
2259 compile_deplibs
="-l$name -L$dir $compile_deplibs"
2260 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
2262 elif test "$build_libtool_libs" = yes; then
2263 # Not a shared library
2264 if test "$deplibs_check_method" != pass_all
; then
2265 # We're trying link a shared library against a static one
2266 # but the system doesn't support it.
2267 # Just print a warning and add the library to dependency_libs so
2268 # that the program can be linked against the static library.
2270 echo "*** Warning: This library needs some functionality provided by $lib."
2271 echo "*** I have the capability to make that library automatically link in when"
2272 echo "*** you link to this library. But I can only do this if you have a"
2273 echo "*** shared version of the library, which you do not appear to have."
2275 convenience
="$convenience $dir/$old_library"
2276 old_convenience
="$old_convenience $dir/$old_library"
2277 deplibs
="$dir/$old_library $deplibs"
2282 if test $linkmode = lib
; then
2283 if test -n "$dependency_libs" &&
2284 { test $hardcode_into_libs != yes ||
test $build_old_libs = yes ||
2285 test $link_static = yes; }; then
2286 # Extract -R from dependency_libs
2288 for libdir
in $dependency_libs; do
2290 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2292 *" $temp_xrpath "*) ;;
2293 *) xrpath
="$xrpath $temp_xrpath";;
2295 *) temp_deplibs
="$temp_deplibs $libdir";;
2298 dependency_libs
="$temp_deplibs"
2301 newlib_search_path
="$newlib_search_path $absdir"
2302 # Link against this library
2303 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
2304 # ... and its dependency_libs
2306 for deplib
in $dependency_libs; do
2307 newdependency_libs
="$deplib $newdependency_libs"
2308 case "$tmp_libs " in
2309 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2311 tmp_libs
="$tmp_libs $deplib"
2314 if test $link_all_deplibs != no
; then
2315 # Add the search paths of all dependency libraries
2316 for deplib
in $dependency_libs; do
2318 -L*) path
="$deplib" ;;
2320 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2321 test "X$dir" = "X$deplib" && dir
="."
2322 # We need an absolute path.
2324 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
2326 absdir
=`cd "$dir" && pwd`
2327 if test -z "$absdir"; then
2328 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2333 if grep "^installed=no" $deplib > /dev
/null
; then
2334 path
="-L$absdir/$objdir"
2336 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2337 if test -z "$libdir"; then
2338 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2341 if test "$absdir" != "$libdir"; then
2342 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2349 case " $deplibs " in
2351 *) deplibs
="$path $deplibs" ;;
2357 dependency_libs
="$newdependency_libs"
2358 if test $pass = dlpreopen
; then
2359 # Link the dlpreopened libraries before other libraries
2360 for deplib
in $save_deplibs; do
2361 deplibs
="$deplib $deplibs"
2364 if test $pass != dlopen
; then
2365 if test $pass != conv
; then
2366 # Make sure lib_search_path contains only unique directories.
2368 for dir
in $newlib_search_path; do
2369 case "$lib_search_path " in
2371 *) lib_search_path
="$lib_search_path $dir" ;;
2377 if test "$linkmode,$pass" != "prog,link"; then
2380 vars
="compile_deplibs finalize_deplibs"
2382 for var
in $vars dependency_libs
; do
2383 # Add libraries to $var in reverse order
2384 eval tmp_libs
=\"\$
$var\"
2386 for deplib
in $tmp_libs; do
2387 # FIXME: Pedantically, this is the right thing to do, so
2388 # that some nasty dependency loop isn't accidentally
2390 #new_libs="$deplib $new_libs"
2391 # Pragmatically, this seems to cause very few problems in
2394 -L*) new_libs
="$deplib $new_libs" ;;
2396 # And here is the reason: when a library appears more
2397 # than once as an explicit dependence of a library, or
2398 # is implicitly linked in more than once by the
2399 # compiler, it is considered special, and multiple
2400 # occurrences thereof are not removed. Compare this
2401 # with having the same library being listed as a
2402 # dependency of multiple other libraries: in this case,
2403 # we know (pedantically, we assume) the library does not
2404 # need to be listed more than once, so we keep only the
2405 # last copy. This is not always right, but it is rare
2406 # enough that we require users that really mean to play
2407 # such unportable linking tricks to link the library
2408 # using -Wl,-lname, so that libtool does not consider it
2409 # for duplicate removal.
2410 case " $specialdeplibs " in
2411 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
2413 case " $new_libs " in
2415 *) new_libs
="$deplib $new_libs" ;;
2423 for deplib
in $new_libs; do
2426 case " $tmp_libs " in
2428 *) tmp_libs
="$tmp_libs $deplib" ;;
2431 *) tmp_libs
="$tmp_libs $deplib" ;;
2434 eval $var=\"$tmp_libs\"
2438 if test $linkmode = prog
; then
2439 dlfiles
="$newdlfiles"
2440 dlprefiles
="$newdlprefiles"
2445 if test -n "$deplibs"; then
2446 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
2449 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
2450 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2453 if test -n "$rpath"; then
2454 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2457 if test -n "$xrpath"; then
2458 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2461 if test -n "$vinfo"; then
2462 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2465 if test -n "$release"; then
2466 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2469 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
2470 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2473 # Now set the variables for building old libraries.
2474 build_libtool_libs
=no
2476 objs
="$objs$old_deplibs"
2480 # Make sure we only generate libraries of the form `libNAME.la'.
2483 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2484 eval libname
=\"$libname_spec\"
2487 if test "$module" = no
; then
2488 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2492 if test "$need_lib_prefix" != no
; then
2493 # Add the "lib" prefix for modules if required
2494 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2495 eval libname
=\"$libname_spec\"
2497 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2502 if test -n "$objs"; then
2503 if test "$deplibs_check_method" != pass_all
; then
2504 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2508 echo "*** Warning: Linking the shared library $output against the non-libtool"
2509 echo "*** objects $objs is not portable!"
2510 libobjs
="$libobjs $objs"
2514 if test "$dlself" != no
; then
2515 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2519 if test $# -gt 2; then
2520 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2525 if test -z "$rpath"; then
2526 if test "$build_libtool_libs" = yes; then
2527 # Building a libtool convenience library.
2528 # Some compilers have problems with a `.al' extension so
2529 # convenience libraries should have the same extension an
2530 # archive normally would.
2531 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
2532 build_libtool_libs
=convenience
2536 if test -n "$vinfo"; then
2537 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2540 if test -n "$release"; then
2541 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2545 # Parse the version information argument.
2546 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=':'
2547 set dummy
$vinfo 0 0 0
2550 if test -n "$8"; then
2551 $echo "$modename: too many parameters to \`-version-info'" 1>&2
2560 # Check that each of the things are valid numbers.
2562 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
2564 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2565 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2571 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
2573 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2574 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2580 0 |
[1-9] |
[1-9][0-9] |
[1-9][0-9][0-9]) ;;
2582 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2583 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2588 if test $age -gt $current; then
2589 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2590 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2594 # Calculate the version variables.
2598 case $version_type in
2602 # Like Linux, but with the current version available in
2603 # verstring for coding it into the library header
2604 major
=.
`expr $current - $age`
2605 versuffix
="$major.$age.$revision"
2606 # Darwin ld doesn't like 0 for these options...
2607 minor_current
=`expr $current + 1`
2608 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
2613 versuffix
=".$current.$revision";
2618 versuffix
=".$current";
2622 major
=`expr $current - $age + 1`
2623 verstring
="sgi$major.$revision"
2625 # Add in all the interfaces that we are compatible with.
2627 while test $loop != 0; do
2628 iface
=`expr $revision - $loop`
2629 loop
=`expr $loop - 1`
2630 verstring
="sgi$major.$iface:$verstring"
2633 # Before this point, $major must not contain `.'.
2635 versuffix
="$major.$revision"
2639 major
=.
`expr $current - $age`
2640 versuffix
="$major.$age.$revision"
2644 major
=`expr $current - $age`
2645 versuffix
=".$current.$age.$revision"
2646 verstring
="$current.$age.$revision"
2648 # Add in all the interfaces that we are compatible with.
2650 while test $loop != 0; do
2651 iface
=`expr $current - $loop`
2652 loop
=`expr $loop - 1`
2653 verstring
="$verstring:${iface}.0"
2656 # Make executables depend on our current version.
2657 verstring
="$verstring:${current}.0"
2662 versuffix
=".$current.$revision"
2666 # Use '-' rather than '.', since we only want one
2667 # extension on DOS 8.3 filesystems.
2668 major
=`expr $current - $age`
2673 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2674 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2679 # Clear the version info if we defaulted, and they specified a release.
2680 if test -z "$vinfo" && test -n "$release"; then
2683 if test "$need_version" = no
; then
2690 # Remove version info from name if versioning should be avoided
2691 if test "$avoid_version" = yes && test "$need_version" = no
; then
2697 # Check to see if the archive will have undefined symbols.
2698 if test "$allow_undefined" = yes; then
2699 if test "$allow_undefined_flag" = unsupported
; then
2700 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2701 build_libtool_libs
=no
2705 # Don't allow undefined symbols.
2706 allow_undefined_flag
="$no_undefined_flag"
2710 if test "$mode" != relink
; then
2711 # Remove our outputs, but don't remove object files since they
2712 # may have been created when compiling PIC objects.
2714 tempremovelist
=`echo "$output_objdir/*"`
2715 for p
in $tempremovelist; do
2719 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
2720 removelist
="$removelist $p"
2725 if test -n "$removelist"; then
2726 $show "${rm}r $removelist"
2727 $run ${rm}r
$removelist
2731 # Now set the variables for building old libraries.
2732 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
2733 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
2735 # Transform .lo files to .o files.
2736 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2739 # Eliminate all temporary directories.
2740 for path
in $uninst_path; do
2741 lib_search_path
=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2742 deplibs
=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2743 dependency_libs
=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2746 if test -n "$xrpath"; then
2747 # If the user specified any rpath flags, then add them.
2749 for libdir
in $xrpath; do
2750 temp_xrpath
="$temp_xrpath -R$libdir"
2751 case "$finalize_rpath " in
2753 *) finalize_rpath
="$finalize_rpath $libdir" ;;
2756 if test $hardcode_into_libs != yes ||
test $build_old_libs = yes; then
2757 dependency_libs
="$temp_xrpath $dependency_libs"
2761 # Make sure dlfiles contains only unique files that won't be dlpreopened
2762 old_dlfiles
="$dlfiles"
2764 for lib
in $old_dlfiles; do
2765 case " $dlprefiles $dlfiles " in
2767 *) dlfiles
="$dlfiles $lib" ;;
2771 # Make sure dlprefiles contains only unique files
2772 old_dlprefiles
="$dlprefiles"
2774 for lib
in $old_dlprefiles; do
2775 case "$dlprefiles " in
2777 *) dlprefiles
="$dlprefiles $lib" ;;
2781 if test "$build_libtool_libs" = yes; then
2782 if test -n "$rpath"; then
2784 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
2785 # these systems don't actually have a c library (as such)!
2787 *-*-rhapsody* |
*-*-darwin1.
[012])
2788 # Rhapsody C library is in the System framework
2789 deplibs
="$deplibs -framework System"
2792 # Add libc to deplibs on all other systems if necessary.
2793 if test $build_libtool_need_lc = "yes"; then
2794 deplibs
="$deplibs -lc"
2800 # Transform deplibs into only deplibs that can be linked in shared.
2802 libname_save
=$libname
2803 release_save
=$release
2804 versuffix_save
=$versuffix
2806 # I'm not sure if I'm treating the release correctly. I think
2807 # release should show up in the -l (ie -lgmp5) so we don't want to
2808 # add it in twice. Is that correct?
2814 case $deplibs_check_method in
2816 # Don't check for shared/static. Everything works.
2817 # This might be a little naive. We might want to check
2818 # whether the library exists or not. But this is on
2819 # osf3 & osf4 and I'm not really sure... Just
2820 # implementing what was already the behaviour.
2824 # This code stresses the "libraries are programs" paradigm to its
2825 # limits. Maybe even breaks it. We compile a program, linking it
2826 # against the deplibs as a proxy for the library. Then we can check
2827 # whether they linked in statically or dynamically with ldd.
2829 cat > conftest.c
<<EOF
2830 int main() { return 0; }
2833 $LTCC -o conftest conftest.c
$deplibs
2834 if test $?
-eq 0 ; then
2835 ldd_output
=`ldd conftest`
2836 for i
in $deplibs; do
2837 name
="`expr $i : '-l\(.*\)'`"
2838 # If $name is empty we are operating on a -L argument.
2839 if test "$name" != "" -a "$name" != "0"; then
2840 libname
=`eval \\$echo \"$libname_spec\"`
2841 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
2842 set dummy
$deplib_matches
2844 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2845 newdeplibs
="$newdeplibs $i"
2849 echo "*** Warning: This library needs some functionality provided by $i."
2850 echo "*** I have the capability to make that library automatically link in when"
2851 echo "*** you link to this library. But I can only do this if you have a"
2852 echo "*** shared version of the library, which you do not appear to have."
2855 newdeplibs
="$newdeplibs $i"
2859 # Error occured in the first compile. Let's try to salvage the situation:
2860 # Compile a seperate program for each library.
2861 for i
in $deplibs; do
2862 name
="`expr $i : '-l\(.*\)'`"
2863 # If $name is empty we are operating on a -L argument.
2864 if test "$name" != "" -a "$name" != "0"; then
2866 $LTCC -o conftest conftest.c
$i
2868 if test $?
-eq 0 ; then
2869 ldd_output
=`ldd conftest`
2870 libname
=`eval \\$echo \"$libname_spec\"`
2871 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
2872 set dummy
$deplib_matches
2874 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2875 newdeplibs
="$newdeplibs $i"
2879 echo "*** Warning: This library needs some functionality provided by $i."
2880 echo "*** I have the capability to make that library automatically link in when"
2881 echo "*** you link to this library. But I can only do this if you have a"
2882 echo "*** shared version of the library, which you do not appear to have."
2887 echo "*** Warning! Library $i is needed by this library but I was not able to"
2888 echo "*** make it link in! You will probably need to install it or some"
2889 echo "*** library that it depends on before this library will be fully"
2890 echo "*** functional. Installing it before continuing would be even better."
2893 newdeplibs
="$newdeplibs $i"
2899 set dummy
$deplibs_check_method
2900 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2901 for a_deplib
in $deplibs; do
2902 name
="`expr $a_deplib : '-l\(.*\)'`"
2903 # If $name is empty we are operating on a -L argument.
2904 if test "$name" != "" -a "$name" != "0"; then
2905 libname
=`eval \\$echo \"$libname_spec\"`
2906 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2907 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
2908 for potent_lib
in $potential_libs; do
2909 # Follow soft links.
2910 if ls -lLd "$potent_lib" 2>/dev
/null \
2911 |
grep " -> " >/dev
/null
; then
2914 # The statement above tries to avoid entering an
2915 # endless loop below, in case of cyclic links.
2916 # We might still enter an endless loop, since a link
2917 # loop can be closed while we follow links,
2919 potlib
="$potent_lib"
2920 while test -h "$potlib" 2>/dev
/null
; do
2921 potliblink
=`ls -ld $potlib | sed 's/.* -> //'`
2923 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
2924 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2927 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
2929 |
egrep "$file_magic_regex" > /dev
/null
; then
2930 newdeplibs
="$newdeplibs $a_deplib"
2936 if test -n "$a_deplib" ; then
2939 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2940 echo "*** I have the capability to make that library automatically link in when"
2941 echo "*** you link to this library. But I can only do this if you have a"
2942 echo "*** shared version of the library, which you do not appear to have."
2945 # Add a -L argument.
2946 newdeplibs
="$newdeplibs $a_deplib"
2948 done # Gone through all deplibs.
2951 set dummy
$deplibs_check_method
2952 match_pattern_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2953 for a_deplib
in $deplibs; do
2954 name
="`expr $a_deplib : '-l\(.*\)'`"
2955 # If $name is empty we are operating on a -L argument.
2956 if test "$name" != "" -a "$name" != "0"; then
2957 libname
=`eval \\$echo \"$libname_spec\"`
2958 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2959 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
2960 for potent_lib
in $potential_libs; do
2961 if eval echo \"$potent_lib\" 2>/dev
/null \
2963 |
egrep "$match_pattern_regex" > /dev
/null
; then
2964 newdeplibs
="$newdeplibs $a_deplib"
2970 if test -n "$a_deplib" ; then
2973 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2974 echo "*** I have the capability to make that library automatically link in when"
2975 echo "*** you link to this library. But I can only do this if you have a"
2976 echo "*** shared version of the library, which you do not appear to have."
2979 # Add a -L argument.
2980 newdeplibs
="$newdeplibs $a_deplib"
2982 done # Gone through all deplibs.
2986 if $echo "X $deplibs" |
$Xsed -e 's/ -lc$//' \
2987 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2988 grep .
>/dev
/null
; then
2990 if test "X$deplibs_check_method" = "Xnone"; then
2991 echo "*** Warning: inter-library dependencies are not supported in this platform."
2993 echo "*** Warning: inter-library dependencies are not known to be supported."
2995 echo "*** All declared inter-library dependencies are being dropped."
3000 versuffix
=$versuffix_save
3002 release
=$release_save
3003 libname
=$libname_save
3006 if test "$droppeddeps" = yes; then
3007 if test "$module" = yes; then
3009 echo "*** Warning: libtool could not satisfy all declared inter-library"
3010 echo "*** dependencies of module $libname. Therefore, libtool will create"
3011 echo "*** a static module, that should work as long as the dlopening"
3012 echo "*** application is linked with the -dlopen flag."
3013 if test -z "$global_symbol_pipe"; then
3015 echo "*** However, this would only work if libtool was able to extract symbol"
3016 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3017 echo "*** not find such a program. So, this module is probably useless."
3018 echo "*** \`nm' from GNU binutils and a full rebuild may help."
3020 if test "$build_old_libs" = no
; then
3021 oldlibs
="$output_objdir/$libname.$libext"
3022 build_libtool_libs
=module
3025 build_libtool_libs
=no
3028 echo "*** The inter-library dependencies that have been dropped here will be"
3029 echo "*** automatically added whenever a program is linked with this library"
3030 echo "*** or is declared to -dlopen it."
3032 if test $allow_undefined = no
; then
3034 echo "*** Since this library must not contain undefined symbols,"
3035 echo "*** because either the platform does not support them or"
3036 echo "*** it was explicitly requested with -no-undefined,"
3037 echo "*** libtool will only create a static version of it."
3038 if test "$build_old_libs" = no
; then
3039 oldlibs
="$output_objdir/$libname.$libext"
3040 build_libtool_libs
=module
3043 build_libtool_libs
=no
3048 # Done checking deplibs!
3052 # All the library-specific variables (install_libdir is set above).
3057 # Test again, we may have decided not to build it any more
3058 if test "$build_libtool_libs" = yes; then
3059 if test $hardcode_into_libs = yes; then
3060 # Hardcode the library paths
3063 rpath
="$finalize_rpath"
3064 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
3065 for libdir
in $rpath; do
3066 if test -n "$hardcode_libdir_flag_spec"; then
3067 if test -n "$hardcode_libdir_separator"; then
3068 if test -z "$hardcode_libdirs"; then
3069 hardcode_libdirs
="$libdir"
3071 # Just accumulate the unique libdirs.
3072 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3073 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3076 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3081 eval flag
=\"$hardcode_libdir_flag_spec\"
3082 dep_rpath
="$dep_rpath $flag"
3084 elif test -n "$runpath_var"; then
3085 case "$perm_rpath " in
3087 *) perm_rpath
="$perm_rpath $libdir" ;;
3091 # Substitute the hardcoded libdirs into the rpath.
3092 if test -n "$hardcode_libdir_separator" &&
3093 test -n "$hardcode_libdirs"; then
3094 libdir
="$hardcode_libdirs"
3095 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
3097 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3098 # We should set the runpath_var.
3100 for dir
in $perm_rpath; do
3103 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3105 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
3108 shlibpath
="$finalize_shlibpath"
3109 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
3110 if test -n "$shlibpath"; then
3111 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3114 # Get the real and link names of the library.
3115 eval library_names
=\"$library_names_spec\"
3116 set dummy
$library_names
3120 if test -n "$soname_spec"; then
3121 eval soname
=\"$soname_spec\"
3125 if test x
$dlname = x
; then
3129 lib
="$output_objdir/$realname"
3132 linknames
="$linknames $link"
3135 # # Ensure that we have .o objects for linkers which dislike .lo
3136 # # (e.g. aix) in case we are running --disable-static
3137 # for obj in $libobjs; do
3138 # xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
3139 # if test "X$xdir" = "X$obj"; then
3144 # baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
3145 # oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3146 # if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then
3147 # $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
3148 # $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
3152 # Use standard objects if they are pic
3153 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3155 # Prepare the list of exported symbols
3156 if test -z "$export_symbols"; then
3157 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
3158 $show "generating symbol list for \`$libname.la'"
3159 export_symbols
="$output_objdir/$libname.exp"
3160 $run $rm $export_symbols
3161 eval cmds
=\"$export_symbols_cmds\"
3162 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3163 for cmd
in $cmds; do
3166 $run eval "$cmd" ||
exit $?
3169 if test -n "$export_symbols_regex"; then
3170 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3171 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3172 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3173 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3178 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3179 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3182 if test -n "$convenience"; then
3183 if test -n "$whole_archive_flag_spec"; then
3184 save_libobjs
=$libobjs
3185 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3187 gentop
="$output_objdir/${outputname}x"
3188 $show "${rm}r $gentop"
3189 $run ${rm}r
"$gentop"
3190 $show "$mkdir $gentop"
3191 $run $mkdir "$gentop"
3193 if test $status -ne 0 && test ! -d "$gentop"; then
3196 generated
="$generated $gentop"
3198 for xlib
in $convenience; do
3199 # Extract the objects.
3201 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
3202 *) xabs
=`pwd`"/$xlib" ;;
3204 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3205 xdir
="$gentop/$xlib"
3207 $show "${rm}r $xdir"
3209 $show "$mkdir $xdir"
3212 if test $status -ne 0 && test ! -d "$xdir"; then
3215 $show "(cd $xdir && $AR x $xabs)"
3216 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
3218 libobjs
="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3223 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3224 eval flag
=\"$thread_safe_flag_spec\"
3225 linker_flags
="$linker_flags $flag"
3228 # Make a backup of the uninstalled library when relinking
3229 if test "$mode" = relink
; then
3230 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
3233 # Do each of the archive commands.
3234 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3235 eval cmds
=\"$archive_expsym_cmds\"
3237 eval cmds
=\"$archive_cmds\"
3239 if len
=`expr "X$cmds" : ".*"` &&
3240 test $len -le $max_cmd_len; then
3243 # The command line is too long to link in one step, link piecewise.
3244 $echo "creating reloadable object files..."
3246 # Save the value of $output and $libobjs because we want to
3247 # use them later. If we have whole_archive_flag_spec, we
3248 # want to use save_libobjs as it was before
3249 # whole_archive_flag_spec was expanded, because we can't
3250 # assume the linker understands whole_archive_flag_spec.
3251 # This may have to be revisited, in case too many
3252 # convenience libraries get linked in and end up exceeding
3254 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
3255 save_libobjs
=$libobjs
3259 # Clear the reloadable object creation command queue and
3260 # initialize k to one.
3267 output
=$output_objdir/$save_output-${k}.
$objext
3268 # Loop over the list of objects to be linked.
3269 for obj
in $save_libobjs
3271 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
3272 if test "X$objlist" = X ||
3273 { len
=`expr "X$test_cmds" : ".*"` &&
3274 test $len -le $max_cmd_len; }; then
3275 objlist
="$objlist $obj"
3277 # The command $test_cmds is almost too long, add a
3278 # command to the queue.
3279 if test $k -eq 1 ; then
3280 # The first file doesn't have a previous command to add.
3281 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
3283 # All subsequent reloadable object files will link in
3284 # the last one created.
3285 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
3287 last_robj
=$output_objdir/$save_output-${k}.
$objext
3289 output
=$output_objdir/$save_output-${k}.
$objext
3294 # Handle the remaining objects by creating one last
3295 # reloadable object file. All subsequent reloadable object
3296 # files will link in the last one created.
3297 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
3298 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
3300 # Set up a command to remove the reloadale object files
3301 # after they are used.
3303 while test $i -lt $k
3306 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
3309 $echo "creating a temporary reloadable object file: $output"
3311 # Loop through the commands generated above and execute them.
3312 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3313 for cmd
in $concat_cmds; do
3316 $run eval "$cmd" ||
exit $?
3321 # Restore the value of output.
3324 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
3325 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3327 # Expand the library linking commands again to reset the
3328 # value of $libobjs for piecewise linking.
3330 # Do each of the archive commands.
3331 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3332 eval cmds
=\"$archive_expsym_cmds\"
3334 eval cmds
=\"$archive_cmds\"
3337 # Append the command to remove the reloadable object files
3338 # to the just-reset $cmds.
3339 eval cmds
=\"\
$cmds~
$rm $delfiles\"
3341 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3342 for cmd
in $cmds; do
3345 $run eval "$cmd" ||
exit $?
3349 # Restore the uninstalled library and exit
3350 if test "$mode" = relink
; then
3351 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
3355 # Create links to the real library.
3356 for linkname
in $linknames; do
3357 if test "$realname" != "$linkname"; then
3358 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
3359 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
3363 # If -module or -export-dynamic was specified, set the dlname.
3364 if test "$module" = yes ||
test "$export_dynamic" = yes; then
3365 # On all known operating systems, these are identical.
3372 if test -n "$deplibs"; then
3373 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
3376 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3377 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3380 if test -n "$rpath"; then
3381 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3384 if test -n "$xrpath"; then
3385 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
3388 if test -n "$vinfo"; then
3389 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3392 if test -n "$release"; then
3393 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3398 if test -n "$objs$old_deplibs"; then
3399 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3403 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
3411 # Delete the old objects.
3412 $run $rm $obj $libobj
3414 # Objects from convenience libraries. This assumes
3415 # single-version convenience libraries. Whenever we create
3416 # different ones for PIC/non-PIC, this we'll have to duplicate
3420 # reload_cmds runs $LD directly, so let us get rid of
3421 # -Wl from whole_archive_flag_spec
3424 if test -n "$convenience"; then
3425 if test -n "$whole_archive_flag_spec"; then
3426 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
3428 gentop
="$output_objdir/${obj}x"
3429 $show "${rm}r $gentop"
3430 $run ${rm}r
"$gentop"
3431 $show "$mkdir $gentop"
3432 $run $mkdir "$gentop"
3434 if test $status -ne 0 && test ! -d "$gentop"; then
3437 generated
="$generated $gentop"
3439 for xlib
in $convenience; do
3440 # Extract the objects.
3442 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
3443 *) xabs
=`pwd`"/$xlib" ;;
3445 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3446 xdir
="$gentop/$xlib"
3448 $show "${rm}r $xdir"
3450 $show "$mkdir $xdir"
3453 if test $status -ne 0 && test ! -d "$xdir"; then
3456 $show "(cd $xdir && $AR x $xabs)"
3457 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
3459 reload_conv_objs
="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3464 # Create the old-style object.
3465 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
3468 eval cmds
=\"$reload_cmds\"
3469 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3470 for cmd
in $cmds; do
3473 $run eval "$cmd" ||
exit $?
3477 # Exit if we aren't doing a library object file.
3478 if test -z "$libobj"; then
3479 if test -n "$gentop"; then
3480 $show "${rm}r $gentop"
3487 if test "$build_libtool_libs" != yes; then
3488 if test -n "$gentop"; then
3489 $show "${rm}r $gentop"
3493 # Create an invalid libtool object if no PIC, so that we don't
3494 # accidentally link it into a program.
3495 # $show "echo timestamp > $libobj"
3496 # $run eval "echo timestamp > $libobj" || exit $?
3500 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
3501 # Only do commands if we really have different PIC objects.
3502 reload_objs
="$libobjs $reload_conv_objs"
3504 eval cmds
=\"$reload_cmds\"
3505 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3506 for cmd
in $cmds; do
3509 $run eval "$cmd" ||
exit $?
3513 # # Just create a symlink.
3516 # xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3517 # if test "X$xdir" = "X$libobj"; then
3522 # baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3523 # oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3524 # $show "(cd $xdir && $LN_S $oldobj $baseobj)"
3525 # $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
3528 if test -n "$gentop"; then
3529 $show "${rm}r $gentop"
3538 *cygwin
*) output
=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
3540 if test -n "$vinfo"; then
3541 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3544 if test -n "$release"; then
3545 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3548 if test "$preload" = yes; then
3549 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
3550 test "$dlopen_self_static" = unknown
; then
3551 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3555 compile_command
="$compile_command $compile_deplibs"
3556 finalize_command
="$finalize_command $finalize_deplibs"
3558 if test -n "$rpath$xrpath"; then
3559 # If the user specified any rpath flags, then add them.
3560 for libdir
in $rpath $xrpath; do
3561 # This is the magic to use -rpath.
3562 case "$finalize_rpath " in
3564 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3569 # Now hardcode the library paths
3572 for libdir
in $compile_rpath $finalize_rpath; do
3573 if test -n "$hardcode_libdir_flag_spec"; then
3574 if test -n "$hardcode_libdir_separator"; then
3575 if test -z "$hardcode_libdirs"; then
3576 hardcode_libdirs
="$libdir"
3578 # Just accumulate the unique libdirs.
3579 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3580 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3583 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3588 eval flag
=\"$hardcode_libdir_flag_spec\"
3589 rpath
="$rpath $flag"
3591 elif test -n "$runpath_var"; then
3592 case "$perm_rpath " in
3594 *) perm_rpath
="$perm_rpath $libdir" ;;
3598 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
3599 case :$dllsearchpath: in
3601 *) dllsearchpath
="$dllsearchpath:$libdir";;
3606 # Substitute the hardcoded libdirs into the rpath.
3607 if test -n "$hardcode_libdir_separator" &&
3608 test -n "$hardcode_libdirs"; then
3609 libdir
="$hardcode_libdirs"
3610 eval rpath
=\" $hardcode_libdir_flag_spec\"
3612 compile_rpath
="$rpath"
3616 for libdir
in $finalize_rpath; do
3617 if test -n "$hardcode_libdir_flag_spec"; then
3618 if test -n "$hardcode_libdir_separator"; then
3619 if test -z "$hardcode_libdirs"; then
3620 hardcode_libdirs
="$libdir"
3622 # Just accumulate the unique libdirs.
3623 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3624 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3627 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3632 eval flag
=\"$hardcode_libdir_flag_spec\"
3633 rpath
="$rpath $flag"
3635 elif test -n "$runpath_var"; then
3636 case "$finalize_perm_rpath " in
3638 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
3642 # Substitute the hardcoded libdirs into the rpath.
3643 if test -n "$hardcode_libdir_separator" &&
3644 test -n "$hardcode_libdirs"; then
3645 libdir
="$hardcode_libdirs"
3646 eval rpath
=\" $hardcode_libdir_flag_spec\"
3648 finalize_rpath
="$rpath"
3651 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3652 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3653 dlsyms
="${outputname}S.c"
3655 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3659 if test -n "$dlsyms"; then
3663 # Discover the nlist of each of the dlfiles.
3664 nlist
="$output_objdir/${outputname}.nm"
3666 $show "$rm $nlist ${nlist}S ${nlist}T"
3667 $run $rm "$nlist" "${nlist}S" "${nlist}T"
3669 # Parse the name list into a source file.
3670 $show "creating $output_objdir/$dlsyms"
3672 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3673 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3674 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3680 /* Prevent the only kind of declaration conflicts we can make. */
3681 #define lt_preloaded_symbols some_other_symbol
3683 /* External symbol declarations for the compiler. */\
3686 if test "$dlself" = yes; then
3687 $show "generating symbol list for \`$output'"
3689 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3691 # Add our own program objects to the symbol list.
3692 progfiles
="$objs$old_deplibs"
3693 for arg
in $progfiles; do
3694 $show "extracting global C symbols from \`$arg'"
3695 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3698 if test -n "$exclude_expsyms"; then
3699 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3700 $run eval '$mv "$nlist"T "$nlist"'
3703 if test -n "$export_symbols_regex"; then
3704 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3705 $run eval '$mv "$nlist"T "$nlist"'
3708 # Prepare the list of exported symbols
3709 if test -z "$export_symbols"; then
3710 export_symbols
="$output_objdir/$output.exp"
3711 $run $rm $export_symbols
3712 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3714 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3715 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3716 $run eval 'mv "$nlist"T "$nlist"'
3720 for arg
in $dlprefiles; do
3721 $show "extracting global C symbols from \`$arg'"
3722 name
=`echo "$arg" | sed -e 's%^.*/%%'`
3723 $run eval 'echo ": $name " >> "$nlist"'
3724 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3727 if test -z "$run"; then
3728 # Make sure we have at least an empty file.
3729 test -f "$nlist" ||
: > "$nlist"
3731 if test -n "$exclude_expsyms"; then
3732 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3733 $mv "$nlist"T
"$nlist"
3736 # Try sorting and uniquifying the output.
3737 if grep -v "^: " < "$nlist" |
sort +2 |
uniq > "$nlist"S
; then
3740 grep -v "^: " < "$nlist" > "$nlist"S
3743 if test -f "$nlist"S
; then
3744 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3746 echo '/* NONE */' >> "$output_objdir/$dlsyms"
3749 $echo >> "$output_objdir/$dlsyms" "\
3751 #undef lt_preloaded_symbols
3753 #if defined (__STDC__) && __STDC__
3754 # define lt_ptr_t void *
3756 # define lt_ptr_t char *
3760 /* The mapping between symbol names and symbols. */
3765 lt_preloaded_symbols[] =
3769 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
3770 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
3771 < "$nlist" >> "$output_objdir/$dlsyms"
3773 $echo >> "$output_objdir/$dlsyms" "\
3777 /* This works around a problem in FreeBSD linker */
3778 #ifdef FREEBSD_WORKAROUND
3779 static const void *lt_preloaded_setup() {
3780 return lt_preloaded_symbols;
3790 pic_flag_for_symtable
=
3792 # compiling the symbol table file with pic_flag works around
3793 # a FreeBSD bug that causes programs to crash when -lm is
3794 # linked before any other PIC object. But we must not use
3795 # pic_flag when linking with -static. The problem exists in
3796 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3797 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
3798 case "$compile_command " in
3800 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
3803 case "$compile_command " in
3805 *) pic_flag_for_symtable
=" $pic_flag";;
3809 # Now compile the dynamic symbol file.
3810 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3811 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
3813 # Clean up the generated files.
3814 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3815 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3817 # Transform the symbol file into the correct name.
3818 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3819 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3822 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3827 # We keep going just in case the user didn't refer to
3828 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3829 # really was required.
3831 # Nullify the symbol file.
3832 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3833 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3836 if test $need_relink = no ||
test "$build_libtool_libs" != yes; then
3837 # Replace the output file specification.
3838 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3839 link_command
="$compile_command$compile_rpath"
3841 # We have no uninstalled library dependencies, so finalize right now.
3842 $show "$link_command"
3843 $run eval "$link_command"
3846 # Delete the generated files.
3847 if test -n "$dlsyms"; then
3848 $show "$rm $output_objdir/${outputname}S.${objext}"
3849 $run $rm "$output_objdir/${outputname}S.${objext}"
3855 if test -n "$shlibpath_var"; then
3856 # We should set the shlibpath_var
3858 for dir
in $temp_rpath; do
3860 [\\/]* |
[A-Za-z
]:[\\/]*)
3865 # Relative path: add a thisdir entry.
3866 rpath
="$rpath\$thisdir/$dir:"
3873 if test -n "$compile_shlibpath$finalize_shlibpath"; then
3874 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3876 if test -n "$finalize_shlibpath"; then
3877 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3882 if test -n "$runpath_var"; then
3883 if test -n "$perm_rpath"; then
3884 # We should set the runpath_var.
3886 for dir
in $perm_rpath; do
3889 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
3891 if test -n "$finalize_perm_rpath"; then
3892 # We should set the runpath_var.
3894 for dir
in $finalize_perm_rpath; do
3897 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
3901 if test "$no_install" = yes; then
3902 # We don't need to create a wrapper script.
3903 link_command
="$compile_var$compile_command$compile_rpath"
3904 # Replace the output file specification.
3905 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3906 # Delete the old output file.
3908 # Link the executable and exit
3909 $show "$link_command"
3910 $run eval "$link_command" ||
exit $?
3914 if test "$hardcode_action" = relink
; then
3915 # Fast installation is not supported
3916 link_command
="$compile_var$compile_command$compile_rpath"
3917 relink_command
="$finalize_var$finalize_command$finalize_rpath"
3919 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3920 $echo "$modename: \`$output' will be relinked during installation" 1>&2
3922 if test "$fast_install" != no
; then
3923 link_command
="$finalize_var$compile_command$finalize_rpath"
3924 if test "$fast_install" = yes; then
3925 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3927 # fast_install is set to needless
3931 link_command
="$compile_var$compile_command$compile_rpath"
3932 relink_command
="$finalize_var$finalize_command$finalize_rpath"
3936 # Replace the output file specification.
3937 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3939 # Delete the old output files.
3940 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
3942 $show "$link_command"
3943 $run eval "$link_command" ||
exit $?
3945 # Now create the wrapper script.
3946 $show "creating $output"
3948 # Quote the relink command for shipping.
3949 if test -n "$relink_command"; then
3950 # Preserve any variables that may affect compiler behavior
3951 for var
in $variables_saved_for_relink; do
3952 if eval test -z \"\
${$var+set}\"; then
3953 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3954 elif eval var_value
=\$
$var; test -z "$var_value"; then
3955 relink_command
="$var=; export $var; $relink_command"
3957 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3958 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
3961 relink_command
="cd `pwd`; $relink_command"
3962 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3965 # Quote $echo for shipping.
3966 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3968 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $0 --fallback-echo";;
3969 *) qecho
="$SHELL `pwd`/$0 --fallback-echo";;
3971 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3973 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3976 # Only actually do things if our run command is non-null.
3977 if test -z "$run"; then
3978 # win32 will think the script is a binary if it has
3979 # a .exe suffix, so we strip it off here.
3981 *.exe
) output
=`echo $output|sed 's,.exe$,,'` ;;
3983 # test for cygwin because mv fails w/o .exe extensions
3985 *cygwin
*) exeext
=.exe
;;
3989 trap "$rm $output; exit 1" 1 2 15
3994 # $output - temporary wrapper script for $objdir/$outputname
3995 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3997 # The $output program cannot be directly executed until all the libtool
3998 # libraries that it depends on are installed.
4000 # This wrapper script should never be moved out of the build directory.
4001 # If it is, it will not operate correctly.
4003 # Sed substitution that helps us do robust quoting. It backslashifies
4004 # metacharacters that are still active within double-quoted strings.
4005 Xsed='sed -e 1s/^X//'
4006 sed_quote_subst='$sed_quote_subst'
4008 # The HP-UX ksh and POSIX shell print the target directory to stdout
4010 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
4012 relink_command=\"$relink_command\"
4014 # This environment variable determines our operation mode.
4015 if test \"\$libtool_install_magic\" = \"$magic\"; then
4016 # install mode needs the following variable:
4017 uninst_deplibs='$uninst_deplibs'
4019 # When we are sourced in execute mode, \$file and \$echo are already set.
4020 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4023 # Make sure echo works.
4024 if test \"X\$1\" = X--no-reexec; then
4025 # Discard the --no-reexec flag, and continue.
4027 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
4028 # Yippee, \$echo works!
4031 # Restart under the correct shell, and then maybe \$echo will work.
4032 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
4038 # Find the directory that this script lives in.
4039 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
4040 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4042 # Follow symbolic links until we get to the real thisdir.
4043 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
4044 while test -n \"\$file\"; do
4045 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
4047 # If there was a directory component, then change thisdir.
4048 if test \"x\$destdir\" != \"x\$file\"; then
4049 case \"\$destdir\" in
4050 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4051 *) thisdir=\"\$thisdir/\$destdir\" ;;
4055 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
4056 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
4059 # Try to get the absolute directory name.
4060 absdir=\`cd \"\$thisdir\" && pwd\`
4061 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4064 if test "$fast_install" = yes; then
4066 program=lt-'$outputname'$exeext
4067 progdir=\"\$thisdir/$objdir\"
4069 if test ! -f \"\$progdir/\$program\" || \\
4070 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
4071 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4073 file=\"\$\$-\$program\"
4075 if test ! -d \"\$progdir\"; then
4076 $mkdir \"\$progdir\"
4078 $rm \"\$progdir/\$file\"
4083 # relink executable if necessary
4084 if test -n \"\$relink_command\"; then
4085 if (eval \$relink_command); then :
4087 $rm \"\$progdir/\$file\"
4092 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4093 { $rm \"\$progdir/\$program\";
4094 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4095 $rm \"\$progdir/\$file\"
4099 program='$outputname'
4100 progdir=\"\$thisdir/$objdir\"
4106 if test -f \"\$progdir/\$program\"; then"
4108 # Export our shlibpath_var if we have one.
4109 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4111 # Add our own library path to $shlibpath_var
4112 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4114 # Some systems cannot cope with colon-terminated $shlibpath_var
4115 # The second colon is a workaround for a bug in BeOS R4 sed
4116 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
4118 export $shlibpath_var
4122 # fixup the dll searchpath if we need to.
4123 if test -n "$dllsearchpath"; then
4125 # Add the dll search path components to the executable PATH
4126 PATH=$dllsearchpath:\$PATH
4131 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4132 # Run the actual program with our arguments.
4135 # win32 systems need to use the prog path for dll
4137 *-*-cygwin* |
*-*-pw32*)
4139 exec \$progdir/\$program \${1+\"\$@\"}
4143 # Backslashes separate directories on plain windows
4144 *-*-mingw |
*-*-os2*)
4146 exec \$progdir\\\\\$program \${1+\"\$@\"}
4152 # Export the path to the program.
4153 PATH=\"\$progdir:\$PATH\"
4156 exec \$program \${1+\"\$@\"}
4161 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
4165 # The program doesn't exist.
4166 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
4167 \$echo \"This script is just a wrapper for \$program.\" 1>&2
4168 echo \"See the $PACKAGE documentation for more information.\" 1>&2
4179 # See if we need to build an old-fashioned archive.
4180 for oldlib
in $oldlibs; do
4182 if test "$build_libtool_libs" = convenience
; then
4183 oldobjs
="$libobjs_save"
4184 addlibs
="$convenience"
4185 build_libtool_libs
=no
4187 if test "$build_libtool_libs" = module
; then
4188 oldobjs
="$libobjs_save"
4189 build_libtool_libs
=no
4191 oldobjs
="$objs$old_deplibs $non_pic_objects"
4193 addlibs
="$old_convenience"
4196 if test -n "$addlibs"; then
4197 gentop
="$output_objdir/${outputname}x"
4198 $show "${rm}r $gentop"
4199 $run ${rm}r
"$gentop"
4200 $show "$mkdir $gentop"
4201 $run $mkdir "$gentop"
4203 if test $status -ne 0 && test ! -d "$gentop"; then
4206 generated
="$generated $gentop"
4208 # Add in members from convenience archives.
4209 for xlib
in $addlibs; do
4210 # Extract the objects.
4212 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4213 *) xabs
=`pwd`"/$xlib" ;;
4215 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4216 xdir
="$gentop/$xlib"
4218 $show "${rm}r $xdir"
4220 $show "$mkdir $xdir"
4223 if test $status -ne 0 && test ! -d "$xdir"; then
4226 $show "(cd $xdir && $AR x $xabs)"
4227 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4229 oldobjs
="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP`
4233 # Do each command in the archive commands.
4234 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
4235 eval cmds
=\"$old_archive_from_new_cmds\"
4237 # # Ensure that we have .o objects in place in case we decided
4238 # # not to build a shared library, and have fallen back to building
4239 # # static libs even though --disable-static was passed!
4240 # for oldobj in $oldobjs; do
4241 # if test ! -f $oldobj; then
4242 # xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
4243 # if test "X$xdir" = "X$oldobj"; then
4248 # baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
4249 # obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
4250 # $show "(cd $xdir && ${LN_S} $obj $baseobj)"
4251 # $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
4255 eval cmds
=\"$old_archive_cmds\"
4257 if len
=`expr "X$cmds" : ".*"` &&
4258 test $len -le $max_cmd_len; then
4261 # the command line is too long to link in one step, link in parts
4262 $echo "using piecewise archive linking..."
4267 save_oldobjs
=$oldobjs
4268 for obj
in $save_oldobjs
4270 oldobjs
="$objlist $obj"
4271 objlist
="$objlist $obj"
4272 eval test_cmds
=\"$old_archive_cmds\"
4273 if len
=`expr "X$test_cmds" : ".*"` &&
4274 test $len -le $max_cmd_len; then
4277 # the above command should be used before it gets too long
4279 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4280 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
4286 eval cmds
=\"\
$concat_cmds~
$old_archive_cmds\"
4289 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4290 for cmd
in $cmds; do
4293 $run eval "$cmd" ||
exit $?
4298 if test -n "$generated"; then
4299 $show "${rm}r$generated"
4300 $run ${rm}r
$generated
4303 # Now create the libtool archive.
4307 test "$build_old_libs" = yes && old_library
="$libname.$libext"
4308 $show "creating $output"
4310 # Preserve any variables that may affect compiler behavior
4311 for var
in $variables_saved_for_relink; do
4312 if eval test -z \"\
${$var+set}\"; then
4313 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4314 elif eval var_value
=\$
$var; test -z "$var_value"; then
4315 relink_command
="$var=; export $var; $relink_command"
4317 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4318 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4321 # Quote the link command for shipping.
4322 relink_command
="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
4323 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4325 # Only create the output if not a dry run.
4326 if test -z "$run"; then
4327 for installed
in no
yes; do
4328 if test "$installed" = yes; then
4329 if test -z "$install_libdir"; then
4332 output
="$output_objdir/$outputname"i
4333 # Replace all uninstalled libtool libraries with the installed ones
4335 for deplib
in $dependency_libs; do
4338 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
4339 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
4340 if test -z "$libdir"; then
4341 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
4344 newdependency_libs
="$newdependency_libs $libdir/$name"
4346 *) newdependency_libs
="$newdependency_libs $deplib" ;;
4349 dependency_libs
="$newdependency_libs"
4351 for lib
in $dlfiles; do
4352 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4353 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4354 if test -z "$libdir"; then
4355 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4358 newdlfiles
="$newdlfiles $libdir/$name"
4360 dlfiles
="$newdlfiles"
4362 for lib
in $dlprefiles; do
4363 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4364 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4365 if test -z "$libdir"; then
4366 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4369 newdlprefiles
="$newdlprefiles $libdir/$name"
4371 dlprefiles
="$newdlprefiles"
4374 # place dlname in correct position for cygwin
4376 case $host,$output,$installed,$module,$dlname in
4377 *cygwin
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
4380 # $outputname - a libtool library file
4381 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4383 # Please DO NOT delete this file!
4384 # It is necessary for linking the library.
4386 # The name that we can dlopen(3).
4389 # Names of this library.
4390 library_names='$library_names'
4392 # The name of the static archive.
4393 old_library='$old_library'
4395 # Libraries that this one depends upon.
4396 dependency_libs='$dependency_libs'
4398 # Version information for $libname.
4403 # Is this an already installed library?
4404 installed=$installed
4406 # Files to dlopen/dlpreopen
4408 dlpreopen='$dlprefiles'
4410 # Directory that this library needs to be installed in:
4411 libdir='$install_libdir'"
4412 if test "$installed" = no
&& test $need_relink = yes; then
4414 relink_command=\"$relink_command\""
4419 # Do a symbolic link so that the libtool archive can be found in
4420 # LD_LIBRARY_PATH before the program is installed.
4421 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4422 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
4428 # libtool install mode
4430 modename
="$modename: install"
4432 # There may be an optional sh(1) argument at the beginning of
4433 # install_prog (especially on Windows NT).
4434 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
4435 # Allow the use of GNU shtool's install command.
4436 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
4437 # Aesthetically quote it.
4438 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4440 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4444 install_prog
="$arg "
4452 # The real first argument should be the name of the installation program.
4453 # Aesthetically quote it.
4454 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4456 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4460 install_prog
="$install_prog$arg"
4462 # We need to accept at least all the BSD install flags.
4472 if test -n "$dest"; then
4473 files
="$files $dest"
4491 # If the previous option needed an argument, then skip it.
4492 if test -n "$prev"; then
4501 # Aesthetically quote the argument.
4502 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4504 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4508 install_prog
="$install_prog $arg"
4511 if test -z "$install_prog"; then
4512 $echo "$modename: you must specify an install program" 1>&2
4517 if test -n "$prev"; then
4518 $echo "$modename: the \`$prev' option requires an argument" 1>&2
4523 if test -z "$files"; then
4524 if test -z "$dest"; then
4525 $echo "$modename: no file or destination specified" 1>&2
4527 $echo "$modename: you must specify a destination" 1>&2
4533 # Strip any trailing slash from the destination.
4534 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
4536 # Check to see that the destination is a directory.
4537 test -d "$dest" && isdir
=yes
4538 if test "$isdir" = yes; then
4542 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
4543 test "X$destdir" = "X$dest" && destdir
=.
4544 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
4546 # Not a directory, so check to see that there is only one file specified.
4548 if test $# -gt 2; then
4549 $echo "$modename: \`$dest' is not a directory" 1>&2
4555 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
4557 for file in $files; do
4561 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4570 # This variable tells wrapper scripts just to set variables rather
4571 # than running their programs.
4572 libtool_install_magic
="$magic"
4577 for file in $files; do
4579 # Do each installation.
4582 # Do the static libraries later.
4583 staticlibs
="$staticlibs $file"
4587 # Check to see that this really is a libtool archive.
4588 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
4590 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4598 # If there is no directory component, then add one.
4600 */* |
*\\*) .
$file ;;
4604 # Add the libdir to current_libdirs if it is the destination.
4605 if test "X$destdir" = "X$libdir"; then
4606 case "$current_libdirs " in
4608 *) current_libdirs
="$current_libdirs $libdir" ;;
4611 # Note the libdir as a future libdir.
4612 case "$future_libdirs " in
4614 *) future_libdirs
="$future_libdirs $libdir" ;;
4618 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
4619 test "X$dir" = "X$file/" && dir
=
4622 if test -n "$relink_command"; then
4623 $echo "$modename: warning: relinking \`$file'" 1>&2
4624 $show "$relink_command"
4625 if $run eval "$relink_command"; then :
4627 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4632 # See the names of the shared library.
4633 set dummy
$library_names
4634 if test -n "$2"; then
4640 test -n "$relink_command" && srcname
="$realname"T
4642 # Install the shared library and build the symlinks.
4643 $show "$install_prog $dir/$srcname $destdir/$realname"
4644 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
4645 if test -n "$stripme" && test -n "$striplib"; then
4646 $show "$striplib $destdir/$realname"
4647 $run eval "$striplib $destdir/$realname" ||
exit $?
4650 if test $# -gt 0; then
4651 # Delete the old symlinks, and create new ones.
4654 if test "$linkname" != "$realname"; then
4655 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4656 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4661 # Do each command in the postinstall commands.
4662 lib
="$destdir/$realname"
4663 eval cmds
=\"$postinstall_cmds\"
4664 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4665 for cmd
in $cmds; do
4668 $run eval "$cmd" ||
exit $?
4673 # Install the pseudo-library for information purposes.
4674 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4675 instname
="$dir/$name"i
4676 $show "$install_prog $instname $destdir/$name"
4677 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
4679 # Maybe install the static library, too.
4680 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
4684 # Install (i.e. copy) a libtool object.
4686 # Figure out destination file name, if it wasn't already specified.
4687 if test -n "$destname"; then
4688 destfile
="$destdir/$destname"
4690 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4691 destfile
="$destdir/$destfile"
4694 # Deduce the name of the destination old-style object file.
4697 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4700 staticdest
="$destfile"
4704 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4710 # Install the libtool object if requested.
4711 if test -n "$destfile"; then
4712 $show "$install_prog $file $destfile"
4713 $run eval "$install_prog $file $destfile" ||
exit $?
4716 # Install the old object if enabled.
4717 if test "$build_old_libs" = yes; then
4718 # Deduce the name of the old-style object file.
4719 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
4721 $show "$install_prog $staticobj $staticdest"
4722 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
4728 # Figure out destination file name, if it wasn't already specified.
4729 if test -n "$destname"; then
4730 destfile
="$destdir/$destname"
4732 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4733 destfile
="$destdir/$destfile"
4736 # Do a test to see if this is really a libtool program.
4737 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
4741 # If there is no directory component, then add one.
4743 */* |
*\\*) .
$file ;;
4747 # Check the variables that should have been set.
4748 if test -z "$uninst_deplibs"; then
4749 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4754 for lib
in $uninst_deplibs; do
4755 # Check to see that each library is installed.
4757 if test -f "$lib"; then
4758 # If there is no directory component, then add one.
4760 */* |
*\\*) .
$lib ;;
4764 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4765 if test -n "$libdir" && test ! -f "$libfile"; then
4766 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4772 # If there is no directory component, then add one.
4774 */* |
*\\*) .
$file ;;
4779 if test "$fast_install" = no
&& test -n "$relink_command"; then
4780 if test "$finalize" = yes && test -z "$run"; then
4782 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
4783 tmpdir
="$tmpdir/libtool-$$"
4784 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4786 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4789 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4790 outputname
="$tmpdir/$file"
4791 # Replace the output file specification.
4792 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4794 $show "$relink_command"
4795 if $run eval "$relink_command"; then :
4797 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4803 $echo "$modename: warning: cannot relink \`$file'" 1>&2
4806 # Install the binary that we compiled earlier.
4807 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4812 # remove .exe since cygwin /usr/bin/install will append another
4814 case $install_prog,$host in
4815 */usr
/bin
/install*,*cygwin
*)
4816 case $file:$destfile in
4821 destfile
=$destfile.exe
4824 destfile
=`echo $destfile | sed -e 's,.exe$,,'`
4830 $show "$install_prog$stripme $file $destfile"
4831 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
4832 test -n "$outputname" && ${rm}r
"$tmpdir"
4837 for file in $staticlibs; do
4838 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4840 # Set up the ranlib parameters.
4841 oldlib
="$destdir/$name"
4843 $show "$install_prog $file $oldlib"
4844 $run eval "$install_prog \$file \$oldlib" ||
exit $?
4846 if test -n "$stripme" && test -n "$striplib"; then
4847 $show "$old_striplib $oldlib"
4848 $run eval "$old_striplib $oldlib" ||
exit $?
4851 # Do each command in the postinstall commands.
4852 eval cmds
=\"$old_postinstall_cmds\"
4853 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4854 for cmd
in $cmds; do
4857 $run eval "$cmd" ||
exit $?
4862 if test -n "$future_libdirs"; then
4863 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4866 if test -n "$current_libdirs"; then
4867 # Maybe just do a dry run.
4868 test -n "$run" && current_libdirs
=" -n$current_libdirs"
4869 exec $SHELL $0 --finish$current_libdirs
4876 # libtool finish mode
4878 modename
="$modename: finish"
4882 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4885 libdirs
="$libdirs $dir"
4888 for libdir
in $libdirs; do
4889 if test -n "$finish_cmds"; then
4890 # Do each command in the finish commands.
4891 eval cmds
=\"$finish_cmds\"
4892 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4893 for cmd
in $cmds; do
4896 $run eval "$cmd" || admincmds
="$admincmds
4901 if test -n "$finish_eval"; then
4902 # Do the single finish_eval.
4903 eval cmds
=\"$finish_eval\"
4904 $run eval "$cmds" || admincmds
="$admincmds
4910 # Exit here if they wanted silent mode.
4911 test "$show" = : && exit 0
4913 echo "----------------------------------------------------------------------"
4914 echo "Libraries have been installed in:"
4915 for libdir
in $libdirs; do
4919 echo "If you ever happen to want to link against installed libraries"
4920 echo "in a given directory, LIBDIR, you must either use libtool, and"
4921 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4922 echo "flag during linking and do at least one of the following:"
4923 if test -n "$shlibpath_var"; then
4924 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4925 echo " during execution"
4927 if test -n "$runpath_var"; then
4928 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4929 echo " during linking"
4931 if test -n "$hardcode_libdir_flag_spec"; then
4933 eval flag
=\"$hardcode_libdir_flag_spec\"
4935 echo " - use the \`$flag' linker flag"
4937 if test -n "$admincmds"; then
4938 echo " - have your system administrator run these commands:$admincmds"
4940 if test -f /etc
/ld.so.conf
; then
4941 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4944 echo "See any operating system documentation about shared libraries for"
4945 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4946 echo "----------------------------------------------------------------------"
4950 # libtool execute mode
4952 modename
="$modename: execute"
4954 # The first argument is the command name.
4956 if test -z "$cmd"; then
4957 $echo "$modename: you must specify a COMMAND" 1>&2
4962 # Handle -dlopen flags immediately.
4963 for file in $execute_dlfiles; do
4964 if test ! -f "$file"; then
4965 $echo "$modename: \`$file' is not a file" 1>&2
4973 # Check to see that this really is a libtool archive.
4974 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
4976 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4981 # Read the libtool library.
4985 # If there is no directory component, then add one.
4987 */* |
*\\*) .
$file ;;
4991 # Skip this library if it cannot be dlopened.
4992 if test -z "$dlname"; then
4993 # Warn if it was a shared library.
4994 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
4998 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4999 test "X$dir" = "X$file" && dir
=.
5001 if test -f "$dir/$objdir/$dlname"; then
5004 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
5010 # Just add the directory containing the .lo file.
5011 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5012 test "X$dir" = "X$file" && dir
=.
5016 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
5021 # Get the absolute pathname.
5022 absdir
=`cd "$dir" && pwd`
5023 test -n "$absdir" && dir
="$absdir"
5025 # Now add the directory to shlibpath_var.
5026 if eval "test -z \"\$$shlibpath_var\""; then
5027 eval "$shlibpath_var=\"\$dir\""
5029 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
5033 # This variable tells wrapper scripts just to set shlibpath_var
5034 # rather than running their programs.
5035 libtool_execute_magic
="$magic"
5037 # Check if any of the arguments is a wrapper script.
5044 # Do a test to see if this is really a libtool program.
5045 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5046 # If there is no directory component, then add one.
5048 */* |
*\\*) .
$file ;;
5052 # Transform arg to wrapped name.
5053 file="$progdir/$program"
5057 # Quote arguments (to preserve shell metacharacters).
5058 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
5059 args
="$args \"$file\""
5062 if test -z "$run"; then
5063 if test -n "$shlibpath_var"; then
5064 # Export the shlibpath_var.
5065 eval "export $shlibpath_var"
5068 # Restore saved enviroment variables
5069 if test "${save_LC_ALL+set}" = set; then
5070 LC_ALL
="$save_LC_ALL"; export LC_ALL
5072 if test "${save_LANG+set}" = set; then
5073 LANG
="$save_LANG"; export LANG
5076 # Now actually exec the command.
5077 eval "exec \$cmd$args"
5079 $echo "$modename: cannot exec \$cmd$args"
5082 # Display what would be done.
5083 if test -n "$shlibpath_var"; then
5084 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
5085 $echo "export $shlibpath_var"
5092 # libtool clean and uninstall mode
5094 modename
="$modename: $mode"
5100 # This variable tells wrapper scripts just to set variables rather
5101 # than running their programs.
5102 libtool_install_magic
="$magic"
5107 -f) rm="$rm $arg"; rmforce
=yes ;;
5108 -*) rm="$rm $arg" ;;
5109 *) files
="$files $arg" ;;
5113 if test -z "$rm"; then
5114 $echo "$modename: you must specify an RM program" 1>&2
5121 for file in $files; do
5122 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5123 if test "X$dir" = "X$file"; then
5127 objdir
="$dir/$objdir"
5129 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5130 test $mode = uninstall
&& objdir
="$dir"
5132 # Remember objdir for removal later, being careful to avoid duplicates
5133 if test $mode = clean
; then
5136 *) rmdirs
="$rmdirs $objdir" ;;
5140 # Don't error if the file doesn't exist and rm -f was used.
5141 if test -L "$file" >/dev
/null
2>&1 ||
test -f "$file"; then
5143 elif test -d "$file"; then
5146 elif test "$rmforce" = yes; then
5154 # Possibly a libtool archive, so verify it.
5155 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5158 # Delete the libtool libraries and symlinks.
5159 for n
in $library_names; do
5160 rmfiles
="$rmfiles $objdir/$n"
5162 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
5163 test $mode = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
5165 if test $mode = uninstall
; then
5166 if test -n "$library_names"; then
5167 # Do each command in the postuninstall commands.
5168 eval cmds
=\"$postuninstall_cmds\"
5169 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
5170 for cmd
in $cmds; do
5174 if test $?
!= 0 && test "$rmforce" != yes; then
5181 if test -n "$old_library"; then
5182 # Do each command in the old_postuninstall commands.
5183 eval cmds
=\"$old_postuninstall_cmds\"
5184 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
5185 for cmd
in $cmds; do
5189 if test $?
!= 0 && test "$rmforce" != yes; then
5195 # FIXME: should reinstall the best remaining shared library.
5201 # Possibly a libtool object, so verify it.
5202 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5207 # Add PIC object to the list of files to remove.
5208 if test -n "$pic_object" \
5209 && test "$pic_object" != none
; then
5210 rmfiles
="$rmfiles $dir/$pic_object"
5213 # Add non-PIC object to the list of files to remove.
5214 if test -n "$non_pic_object" \
5215 && test "$non_pic_object" != none
; then
5216 rmfiles
="$rmfiles $dir/$non_pic_object"
5222 # Do a test to see if this is a libtool program.
5223 if test $mode = clean
&&
5224 (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5228 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
5229 if test "$fast_install" = yes && test -n "$relink_command"; then
5230 rmfiles
="$rmfiles $objdir/lt-$name"
5235 $show "$rm $rmfiles"
5236 $run $rm $rmfiles || exit_status
=1
5239 # Try to remove the ${objdir}s in the directories where we deleted files
5240 for dir
in $rmdirs; do
5241 if test -d "$dir"; then
5243 $run rmdir $dir >/dev
/null
2>&1
5251 $echo "$modename: you must specify a MODE" 1>&2
5252 $echo "$generic_help" 1>&2
5257 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5258 $echo "$generic_help" 1>&2
5260 fi # test -z "$show_help"
5262 # We need to display help for each of the modes.
5265 "Usage: $modename [OPTION]... [MODE-ARG]...
5267 Provide generalized library-building support services.
5269 --config show all configuration variables
5270 --debug enable verbose shell tracing
5271 -n, --dry-run display commands without modifying any files
5272 --features display basic configuration information and exit
5273 --finish same as \`--mode=finish'
5274 --help display this help message and exit
5275 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
5276 --quiet same as \`--silent'
5277 --silent don't print informational messages
5278 --tag=TAG use configuration variables from tag TAG
5279 --version print version information
5281 MODE must be one of the following:
5283 clean remove files from the build directory
5284 compile compile a source file into a libtool object
5285 execute automatically set library path, then run a program
5286 finish complete the installation of libtool libraries
5287 install install libraries or executables
5288 link create a library or an executable
5289 uninstall remove libraries from an installed directory
5291 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
5292 a more detailed description of MODE."
5298 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
5300 Remove files from the build directory.
5302 RM is the name of the program to use to delete files associated with each FILE
5303 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5306 If FILE is a libtool library, object or program, all the files associated
5307 with it are deleted. Otherwise, only FILE itself is deleted using RM."
5312 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
5314 Compile a source file into a libtool library object.
5316 This mode accepts the following additional options:
5318 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
5319 -static always build a \`.o' file suitable for static linking
5321 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
5322 from the given SOURCEFILE.
5324 The output file name is determined by removing the directory component from
5325 SOURCEFILE, then substituting the C source code suffix \`.c' with the
5326 library object suffix, \`.lo'."
5331 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
5333 Automatically set library path, then run a program.
5335 This mode accepts the following additional options:
5337 -dlopen FILE add the directory containing FILE to the library path
5339 This mode sets the library path environment variable according to \`-dlopen'
5342 If any of the ARGS are libtool executable wrappers, then they are translated
5343 into their corresponding uninstalled binary, and any of their required library
5344 directories are added to the library path.
5346 Then, COMMAND is executed, with ARGS as arguments."
5351 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
5353 Complete the installation of libtool libraries.
5355 Each LIBDIR is a directory that contains libtool libraries.
5357 The commands that this mode executes may require superuser privileges. Use
5358 the \`--dry-run' option if you just want to see what would be executed."
5363 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
5365 Install executables or libraries.
5367 INSTALL-COMMAND is the installation command. The first component should be
5368 either the \`install' or \`cp' program.
5370 The rest of the components are interpreted as arguments to that command (only
5371 BSD-compatible install options are recognized)."
5376 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
5378 Link object files or libraries together to form another library, or to
5379 create an executable program.
5381 LINK-COMMAND is a command using the C compiler that you would use to create
5382 a program from several object files.
5384 The following components of LINK-COMMAND are treated specially:
5386 -all-static do not do any dynamic linking at all
5387 -avoid-version do not add a version suffix if possible
5388 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
5389 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
5390 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
5391 -export-symbols SYMFILE
5392 try to export only the symbols listed in SYMFILE
5393 -export-symbols-regex REGEX
5394 try to export only the symbols matching REGEX
5395 -LLIBDIR search LIBDIR for required installed libraries
5396 -lNAME OUTPUT-FILE requires the installed library libNAME
5397 -module build a library that can dlopened
5398 -no-fast-install disable the fast-install mode
5399 -no-install link a not-installable executable
5400 -no-undefined declare that a library does not refer to external symbols
5401 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
5402 -objectlist FILE Use a list of object files found in FILE to specify objects
5403 -release RELEASE specify package release information
5404 -rpath LIBDIR the created library will eventually be installed in LIBDIR
5405 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
5406 -static do not do any dynamic linking of libtool libraries
5407 -version-info CURRENT[:REVISION[:AGE]]
5408 specify library version info [each variable defaults to 0]
5410 All other options (arguments beginning with \`-') are ignored.
5412 Every other argument is treated as a filename. Files ending in \`.la' are
5413 treated as uninstalled libtool libraries, other files are standard or library
5416 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
5417 only library objects (\`.lo' files) may be specified, and \`-rpath' is
5418 required, except when creating a convenience library.
5420 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
5421 using \`ar' and \`ranlib', or on Windows using \`lib'.
5423 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
5424 is created, otherwise an executable program is created."
5429 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
5431 Remove libraries from an installation directory.
5433 RM is the name of the program to use to delete files associated with each FILE
5434 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5437 If FILE is a libtool library, all the files associated with it are deleted.
5438 Otherwise, only FILE itself is deleted using RM."
5442 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5449 $echo "Try \`$modename --help' for more information about other modes."
5453 # The TAGs below are defined such that we never get into a situation
5454 # in which we disable both kinds of libraries. Given conflicting
5455 # choices, we go for a static library, that is the most portable,
5456 # since we can't tell whether shared libraries were disabled because
5457 # the user asked for that or because the platform doesn't support
5458 # them. This is particularly important on AIX, because we don't
5459 # support having both static and shared libraries enabled at the same
5460 # time on that platform, so we default to a shared-only configuration.
5461 # If a disable-shared tag is given, we'll fallback to a static-only
5462 # configuration. But we'll never go from static-only to shared-only.
5464 ### BEGIN LIBTOOL TAG CONFIG: disable-shared
5465 build_libtool_libs
=no
5467 ### END LIBTOOL TAG CONFIG: disable-shared
5469 ### BEGIN LIBTOOL TAG CONFIG: disable-static
5470 build_old_libs
=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
5471 ### END LIBTOOL TAG CONFIG: disable-static