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.206mm 2001/04/03 21:47:47)"
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
139 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev
/null
; then
140 taglist
="$taglist $tagname"
141 # Evaluate the configuration.
142 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
144 echo "$progname: ignoring unknown tag $tagname" 1>&2
157 # Have we seen a non-optional argument yet?
164 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
169 sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
170 # Now print the configurations for the tags.
171 for tagname
in $taglist; do
172 sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
178 echo "$progname: enabling shell trace mode"
188 if test "$build_libtool_libs" = yes; then
189 echo "enable shared libraries"
191 echo "disable shared libraries"
193 if test "$build_old_libs" = yes; then
194 echo "enable static libraries"
196 echo "disable static libraries"
201 --finish) mode
="finish" ;;
203 --mode) prevopt
="--mode" prev
=mode
;;
204 --mode=*) mode
="$optarg" ;;
210 --tag) prevopt
="--tag" prev
=tag
;;
212 set tag
"$optarg" ${1+"$@"}
223 $echo "$modename: unrecognized option \`$arg'" 1>&2
235 if test -n "$prevopt"; then
236 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
241 if test -z "$show_help"; then
243 # Infer the operation mode.
244 if test -z "$mode"; then
246 *cc |
*++ | gcc
* |
*-gcc*)
258 *db |
*dbx |
*strace |
*truss
)
268 # If we have no mode, but dlfiles were specified, then do execute mode.
269 test -n "$execute_dlfiles" && mode
=execute
271 # Just use the default operation mode.
272 if test -z "$mode"; then
273 if test -n "$nonopt"; then
274 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
276 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
283 # Only execute mode is allowed to have -dlopen flags.
284 if test -n "$execute_dlfiles" && test "$mode" != execute
; then
285 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
290 # Change the help message to a mode-specific one.
292 help="Try \`$modename --help --mode=$mode' for more information."
294 # These modes are in order of execution frequency so that they run quickly.
296 # libtool compile mode
298 modename
="$modename: compile"
299 # Get the compilation command and the source file.
312 # Aesthetically quote the previous argument.
314 lastarg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
317 # Double-quote args containing other shell metacharacters.
318 # Many Bourne shells cannot handle close brackets correctly
319 # in scan sets, so we specify it separately.
320 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
325 # Add the previous argument to base_compile.
326 if test -z "$base_compile"; then
327 base_compile
="$lastarg"
329 base_compile
="$base_compile $lastarg"
335 # Accept any command-line options.
338 if test "$user_target" != "no"; then
339 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
366 args
=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
368 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
372 # Double-quote args containing other shell metacharacters.
373 # Many Bourne shells cannot handle close brackets correctly
374 # in scan sets, so we specify it separately.
376 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
380 lastarg
="$lastarg $arg"
383 lastarg
=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
385 # Add the arguments to base_compile.
386 if test -z "$base_compile"; then
387 base_compile
="$lastarg"
389 base_compile
="$base_compile $lastarg"
397 # The next one is the -o target name
402 # We got the output file
409 # Accept the current argument as the source file.
413 # Aesthetically quote the previous argument.
415 # Backslashify any backslashes, double quotes, and dollar signs.
416 # These are the only characters that are still specially
417 # interpreted inside of double-quoted scrings.
418 lastarg
=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
420 # Double-quote args containing other shell metacharacters.
421 # Many Bourne shells cannot handle close brackets correctly
422 # in scan sets, so we specify it separately.
424 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
425 lastarg
="\"$lastarg\""
429 # Add the previous argument to base_compile.
430 if test -z "$base_compile"; then
431 base_compile
="$lastarg"
433 base_compile
="$base_compile $lastarg"
441 # Get the name of the library object.
442 libobj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
445 $echo "$modename: you must specify a target with \`-o'" 1>&2
450 # Recognize several different file suffixes.
451 # If the user specifies -o file.o, it is replaced with file.lo
460 *.class
) xform
=class
;;
465 *.java
) xform
=java
;;
468 libobj
=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
471 *.lo
) obj
=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
473 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
478 # Infer tagged configuration to use if any are available and
479 # if one wasn't chosen via the "--tag" command line option.
480 # Only attempt this if the compiler in the base compile
481 # command doesn't match the default compiler.
482 if test -n "$available_tags" && test -z "$tagname"; then
483 case $base_compile in
485 # Blanks in the command may have been stripped by the calling shell,
486 # but not from the CC environment variable when ltconfig was run.
489 for z
in $available_tags; do
490 if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
491 # Evaluate the configuration.
492 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
493 case $base_compile in
495 # The compiler in the base compile command matches
496 # the one in the tagged configuration.
497 # Assume this is the tagged configuration we want.
508 # If $tagname still isn't set, then no tagged configuration
509 # was found and let the user know that the "--tag" command
510 # line option must be used.
511 if test -z "$tagname"; then
512 echo "$modename: unable to infer tagged configuration"
513 echo "$modename: specify a tag with \`--tag'" 1>&2
516 # echo "$modename: using $tagname tagged configuration"
522 objname
=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
523 xdir
=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
524 if test "X$xdir" = "X$obj"; then
529 lobj
=${xdir}$objdir/$objname
531 if test -z "$base_compile"; then
532 $echo "$modename: you must specify a compilation command" 1>&2
537 # Delete any leftover library objects.
538 if test "$build_old_libs" = yes; then
539 removelist
="$obj $lobj $libobj ${libobj}T"
541 removelist
="$lobj $libobj ${libobj}T"
545 trap "$run $rm $removelist; exit 1" 1 2 15
547 # On Cygwin there's no "real" PIC flag so we must build both object types
549 cygwin
* | mingw
* | pw32
* | os2
*)
553 if test $pic_mode = no
&& test "$deplibs_check_method" != pass_all
; then
554 # non-PIC code in shared libraries is not supported
558 # Calculate the filename of the output object if compiler does
559 # not support -o with -c
560 if test "$compiler_c_o" = no
; then
561 output_obj
=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.
${objext}
562 lockfile
="$output_obj.lock"
563 removelist
="$removelist $output_obj $lockfile"
564 trap "$run $rm $removelist; exit 1" 1 2 15
571 # Lock this critical section if it is needed
572 # We use this script file to make the link, it avoids creating a new file
573 if test "$need_locks" = yes; then
574 until $run ln "$0" "$lockfile" 2>/dev
/null
; do
575 $show "Waiting for $lockfile to be removed"
578 elif test "$need_locks" = warn
; then
579 if test -f "$lockfile"; then
581 *** ERROR, $lockfile exists and contains:
582 `cat $lockfile 2>/dev/null`
584 This indicates that another process is trying to use the same
585 temporary object file, and libtool could not work around it because
586 your compiler does not support \`-c' and \`-o' together. If you
587 repeat this compilation, it may succeed, by chance, but you had better
588 avoid parallel builds (make -j) in this platform, or get a better
594 echo $srcfile > "$lockfile"
597 if test -n "$fix_srcfile_path"; then
598 eval srcfile
=\"$fix_srcfile_path\"
601 $run $rm "$libobj" "${libobj}T"
603 # Create a libtool object file (analogous to a ".la" file),
604 # but don't create it if we're doing a dry run.
605 test -z "$run" && cat > ${libobj}T
<<EOF
606 # $libobj - a libtool object file
607 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
609 # Please DO NOT delete this file!
610 # It is necessary for linking the library.
612 # Name of the PIC object.
615 # Only build a PIC object if we are building libtool libraries.
616 if test "$build_libtool_libs" = yes; then
617 # Without this assignment, base_compile gets emptied.
618 fbsd_hideous_sh_bug
=$base_compile
620 if test "$pic_mode" != no
; then
621 command="$base_compile $srcfile $pic_flag"
623 # Don't build PIC code
624 command="$base_compile $srcfile"
627 if test ! -d ${xdir}$objdir; then
628 $show "$mkdir ${xdir}$objdir"
629 $run $mkdir ${xdir}$objdir
631 if test $status -ne 0 && test ! -d ${xdir}$objdir; then
636 if test -z "$output_obj"; then
637 # Place PIC objects in $objdir
638 command="$command -o $lobj"
641 $run $rm "$lobj" "$output_obj"
644 if $run eval "$command"; then :
646 test -n "$output_obj" && $run $rm $removelist
650 if test "$need_locks" = warn
&&
651 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
653 *** ERROR, $lockfile contains:
654 `cat $lockfile 2>/dev/null`
656 but it should contain:
659 This indicates that another process is trying to use the same
660 temporary object file, and libtool could not work around it because
661 your compiler does not support \`-c' and \`-o' together. If you
662 repeat this compilation, it may succeed, by chance, but you had better
663 avoid parallel builds (make -j) in this platform, or get a better
670 # Just move the object if needed, then go on to compile the next one
671 if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
672 $show "$mv $output_obj $lobj"
673 if $run $mv $output_obj $lobj; then :
681 # Append the name of the PIC object to the libtool object file.
682 test -z "$run" && cat >> ${libobj}T
<<EOF
683 pic_object='$objdir/$objname'
687 # Allow error messages only from the first compilation.
688 suppress_output
=' >/dev/null 2>&1'
690 # No PIC object so indicate it doesn't exist in the libtool
692 test -z "$run" && cat >> ${libobj}T
<<EOF
698 # Only build a position-dependent object if we build old libraries.
699 if test "$build_old_libs" = yes; then
700 if test "$pic_mode" != yes; then
701 # Don't build PIC code
702 command="$base_compile $srcfile"
704 command="$base_compile $srcfile $pic_flag"
706 if test "$compiler_c_o" = yes; then
707 command="$command -o $obj"
710 # Suppress compiler output if we already did a PIC compilation.
711 command="$command$suppress_output"
712 $run $rm "$obj" "$output_obj"
714 if $run eval "$command"; then :
720 if test "$need_locks" = warn
&&
721 test x
"`cat $lockfile 2>/dev/null`" != x
"$srcfile"; then
723 *** ERROR, $lockfile contains:
724 `cat $lockfile 2>/dev/null`
726 but it should contain:
729 This indicates that another process is trying to use the same
730 temporary object file, and libtool could not work around it because
731 your compiler does not support \`-c' and \`-o' together. If you
732 repeat this compilation, it may succeed, by chance, but you had better
733 avoid parallel builds (make -j) in this platform, or get a better
740 # Just move the object if needed
741 if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
742 $show "$mv $output_obj $obj"
743 if $run $mv $output_obj $obj; then :
751 # Append the name of the non-PIC object the libtool object file.
752 # Only append if the libtool object file exists.
753 test -z "$run" && cat >> ${libobj}T
<<EOF
754 # Name of the non-PIC object.
755 non_pic_object='$objname'
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.
768 $run $mv "${libobj}T" "${libobj}"
770 # Unlock the critical section if it was locked
771 if test "$need_locks" != no
; then
780 modename
="$modename: link"
782 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
783 # It is impossible to link a dll without this setting, and
784 # we shouldn't force the makefile maintainer to figure out
785 # which system we are compiling for in order to pass an extra
786 # flag for every libtool invokation.
789 # FIXME: Unfortunately, there are problems with the above when trying
790 # to make a dll which has undefined symbols, in which case not
791 # even a static library is built. For now, we need to specify
792 # -no-undefined on the libtool link line when we can be certain
793 # that all symbols are satisfied, otherwise we get a static library.
800 libtool_args
="$nonopt"
801 base_compile
="$nonopt"
802 compile_command
="$nonopt"
803 finalize_command
="$nonopt"
817 lib_search_path
=`pwd`
825 export_symbols_regex
=
833 prefer_static_libs
=no
845 # We need to know -static, to get the right output filenames.
849 -all-static |
-static)
850 if test "X$arg" = "X-all-static"; then
851 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
852 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
854 if test -n "$link_static_flag"; then
855 dlopen_self
=$dlopen_self_static
858 if test -z "$pic_flag" && test -n "$link_static_flag"; then
859 dlopen_self
=$dlopen_self_static
862 build_libtool_libs
=no
864 prefer_static_libs
=yes
870 # See if our shared archives depend on static archives.
871 test -n "$old_archive_from_new_cmds" && build_old_libs
=yes
873 # Go through the arguments, transforming them on the way.
874 while test $# -gt 0; do
876 base_compile
="$base_compile $arg"
879 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
880 qarg
=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
884 libtool_args
="$libtool_args $qarg"
886 # If the previous option needs an argument, assign it.
887 if test -n "$prev"; then
890 compile_command
="$compile_command @OUTPUT@"
891 finalize_command
="$finalize_command @OUTPUT@"
897 if test "$preload" = no
; then
898 # Add the symbol object into the linking commands.
899 compile_command
="$compile_command @SYMFILE@"
900 finalize_command
="$finalize_command @SYMFILE@"
904 *.la |
*.lo
) ;; # We handle these cases below.
906 if test "$dlself" = no
; then
914 if test "$prev" = dlprefiles
; then
916 elif test "$prev" = dlfiles
&& test "$dlopen_self" != yes; then
926 if test "$prev" = dlfiles
; then
927 dlfiles
="$dlfiles $arg"
929 dlprefiles
="$dlprefiles $arg"
937 export_symbols
="$arg"
938 if test ! -f "$arg"; then
939 $echo "$modename: symbol file \`$arg' does not exist"
946 export_symbols_regex
="$arg"
956 if test -f "$arg"; then
959 for fil
in `cat $save_arg`
961 # moreargs="$moreargs $fil"
963 # A libtool-controlled object.
965 # Check to see that this really is a libtool object.
966 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
971 # If there is no directory component, then add one.
973 */* |
*\\*) .
$arg ;;
977 if test -z "$pic_object" || \
978 test -z "$non_pic_object" ||
979 test "$pic_object" = none
&& \
980 test "$non_pic_object" = none
; then
981 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
985 # Extract subdirectory from the argument.
986 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
987 if test "X$xdir" = "X$arg"; then
993 if test "$pic_object" != none
; then
994 # Prepend the subdirectory the object is found in.
995 pic_object
="$xdir$pic_object"
997 if test "$prev" = dlfiles
; then
998 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
999 dlfiles
="$dlfiles $pic_object"
1003 # If libtool objects are unsupported, then we need to preload.
1008 # CHECK ME: I think I busted this. -Ossama
1009 if test "$prev" = dlprefiles
; then
1010 # Preload the old-style object.
1011 dlprefiles
="$dlprefiles $pic_object"
1016 libobjs
="$libobjs $pic_object"
1021 if test "$non_pic_object" != none
; then
1022 # Prepend the subdirectory the object is found in.
1023 non_pic_object
="$xdir$non_pic_object"
1025 # A standard non-PIC object
1026 non_pic_objects
="$non_pic_objects $non_pic_object"
1027 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1028 arg
="$non_pic_object"
1032 # Only an error if not doing a dry-run.
1033 if test -z "$run"; then
1034 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1039 # Extract subdirectory from the argument.
1040 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1041 if test "X$xdir" = "X$arg"; then
1047 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1048 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1049 libobjs
="$libobjs $pic_object"
1050 non_pic_objects
="$non_pic_objects $non_pic_object"
1055 $echo "$modename: link input file \`$save_arg' does not exist"
1063 # We need an absolute path.
1065 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1067 $echo "$modename: only absolute run-paths are allowed" 1>&2
1071 if test "$prev" = rpath
; then
1074 *) rpath
="$rpath $arg" ;;
1079 *) xrpath
="$xrpath $arg" ;;
1086 compiler_flags
="$compiler_flags $qarg"
1088 compile_command
="$compile_command $qarg"
1089 finalize_command
="$finalize_command $qarg"
1093 linker_flags
="$linker_flags $qarg"
1094 compiler_flags
="$compiler_flags $wl$qarg"
1096 compile_command
="$compile_command $wl$qarg"
1097 finalize_command
="$finalize_command $wl$qarg"
1101 eval "$prev=\"\$arg\""
1112 if test -n "$link_static_flag"; then
1113 compile_command
="$compile_command $link_static_flag"
1114 finalize_command
="$finalize_command $link_static_flag"
1120 # FIXME: remove this flag sometime in the future.
1121 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1145 -export-symbols |
-export-symbols-regex)
1146 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
1147 $echo "$modename: not more than one -exported-symbols argument allowed"
1150 if test "X$arg" = "X-export-symbols"; then
1158 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1159 # so, if we see these flags be careful not to treat them like -L
1161 case $with_gcc/$host in
1163 compile_command
="$compile_command $arg"
1164 finalize_command
="$finalize_command $arg"
1171 dir
=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1172 # We need an absolute path.
1174 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1176 absdir
=`cd "$dir" && pwd`
1177 if test -z "$absdir"; then
1178 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1187 deplibs
="$deplibs -L$dir"
1188 lib_search_path
="$lib_search_path $dir"
1192 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1193 case :$dllsearchpath: in
1195 *) dllsearchpath
="$dllsearchpath:$dir";;
1203 if test "$arg" = "-lc"; then
1205 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
1206 # These systems don't actually have c library (as such)
1209 *-*-rhapsody* |
*-*-darwin1.
[012])
1210 # Rhapsody C library is in the System framework
1211 deplibs
="$deplibs -framework System"
1215 elif test "$arg" = "-lm"; then
1217 *-*-cygwin* |
*-*-pw32* |
*-*-beos*)
1218 # These systems don't actually have math library (as such)
1221 *-*-rhapsody* |
*-*-darwin1.
[012])
1222 # Rhapsody math library is in the System framework
1223 deplibs
="$deplibs -framework System"
1228 deplibs
="$deplibs $arg"
1244 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
1245 # The PATH hackery in wrapper scripts is required on Windows
1246 # in order for the loader to find any dlls it needs.
1247 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1248 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1286 dir
=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1287 # We need an absolute path.
1289 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
1291 $echo "$modename: only absolute run-paths are allowed" 1>&2
1297 *) xrpath
="$xrpath $dir" ;;
1303 # The effects of -static are defined in a previous loop.
1304 # We used to do the same as -all-static on platforms that
1305 # didn't have a PIC flag, but the assumption that the effects
1306 # would be equivalent was wrong. It would break on at least
1307 # Digital Unix and AIX.
1322 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1324 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
1325 for flag
in $args; do
1328 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1333 compiler_flags
="$compiler_flags $flag"
1336 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1340 args
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1342 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=','
1343 for flag
in $args; do
1346 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1351 compiler_flags
="$compiler_flags $wl$flag"
1352 linker_flags
="$linker_flags $flag"
1355 arg
=`$echo "X$arg" | $Xsed -e "s/^ //"`
1368 # Some other compiler flag.
1370 # Unknown arguments in both finalize_command and compile_command need
1371 # to be aesthetically quoted because they are evaled later.
1372 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1374 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1378 add_flags
="$add_flags $arg"
1382 # A standard object.
1387 # A libtool-controlled object.
1389 # Check to see that this really is a libtool object.
1390 if (sed -e '2q' $arg |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
1395 # If there is no directory component, then add one.
1397 */* |
*\\*) .
$arg ;;
1401 if test -z "$pic_object" || \
1402 test -z "$non_pic_object" ||
1403 test "$pic_object" = none
&& \
1404 test "$non_pic_object" = none
; then
1405 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1409 # Extract subdirectory from the argument.
1410 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1411 if test "X$xdir" = "X$arg"; then
1417 if test "$pic_object" != none
; then
1418 # Prepend the subdirectory the object is found in.
1419 pic_object
="$xdir$pic_object"
1421 if test "$prev" = dlfiles
; then
1422 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1423 dlfiles
="$dlfiles $pic_object"
1427 # If libtool objects are unsupported, then we need to preload.
1432 # CHECK ME: I think I busted this. -Ossama
1433 if test "$prev" = dlprefiles
; then
1434 # Preload the old-style object.
1435 dlprefiles
="$dlprefiles $pic_object"
1440 libobjs
="$libobjs $pic_object"
1445 if test "$non_pic_object" != none
; then
1446 # Prepend the subdirectory the object is found in.
1447 non_pic_object
="$xdir$non_pic_object"
1449 # A standard non-PIC object
1450 non_pic_objects
="$non_pic_objects $non_pic_object"
1451 if test -z "$pic_object" ||
test "$pic_object" = none
; then
1452 arg
="$non_pic_object"
1456 # Only an error if not doing a dry-run.
1457 if test -z "$run"; then
1458 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1463 # Extract subdirectory from the argument.
1464 xdir
=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1465 if test "X$xdir" = "X$arg"; then
1471 pic_object
=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1472 non_pic_object
=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1473 libobjs
="$libobjs $pic_object"
1474 non_pic_objects
="$non_pic_objects $non_pic_object"
1481 deplibs
="$deplibs $arg"
1482 old_deplibs
="$old_deplibs $arg"
1487 # A libtool-controlled library.
1489 if test "$prev" = dlfiles
; then
1490 # This library was specified with -dlopen.
1491 dlfiles
="$dlfiles $arg"
1493 elif test "$prev" = dlprefiles
; then
1494 # The library was specified with -dlpreopen.
1495 dlprefiles
="$dlprefiles $arg"
1498 deplibs
="$deplibs $arg"
1503 # Some other compiler argument.
1505 # Unknown arguments in both finalize_command and compile_command need
1506 # to be aesthetically quoted because they are evaled later.
1507 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1509 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1513 add_flags
="$add_flags $arg"
1517 # Now actually substitute the argument into the commands.
1518 if test -n "$arg"; then
1519 compile_command
="$compile_command $arg"
1520 finalize_command
="$finalize_command $arg"
1524 if test -n "$prev"; then
1525 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1530 # Infer tagged configuration to use if any are available and
1531 # if one wasn't chosen via the "--tag" command line option.
1532 # Only attempt this if the compiler in the base link
1533 # command doesn't match the default compiler.
1534 if test -n "$available_tags" && test -z "$tagname"; then
1535 case $base_compile in
1537 # Blanks in the command may have been stripped by the calling shell,
1538 # but not from the CC environment variable when ltconfig was run.
1541 for z
in $available_tags; do
1542 if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev
/null
; then
1543 # Evaluate the configuration.
1544 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
1545 case $base_compile in
1547 # The compiler in $compile_command matches
1548 # the one in the tagged configuration.
1549 # Assume this is the tagged configuration we want.
1560 # If $tagname still isn't set, then no tagged configuration
1561 # was found and let the user know that the "--tag" command
1562 # line option must be used.
1563 if test -z "$tagname"; then
1564 echo "$modename: unable to infer tagged configuration"
1565 echo "$modename: specify a tag with \`--tag'" 1>&2
1568 # echo "$modename: using $tagname tagged configuration"
1574 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1575 eval arg
=\"$export_dynamic_flag_spec\"
1576 compile_command
="$compile_command $arg"
1577 finalize_command
="$finalize_command $arg"
1581 # calculate the name of the file, without its directory
1582 outputname
=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1583 libobjs_save
="$libobjs"
1585 if test -n "$shlibpath_var"; then
1586 # get the directories listed in $shlibpath_var
1587 eval shlib_search_path
=\
`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1591 eval sys_lib_search_path
=\"$sys_lib_search_path_spec\"
1592 eval sys_lib_dlsearch_path
=\"$sys_lib_dlsearch_path_spec\"
1594 output_objdir
=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1595 if test "X$output_objdir" = "X$output"; then
1596 output_objdir
="$objdir"
1598 output_objdir
="$output_objdir/$objdir"
1600 # Create the object directory.
1601 if test ! -d $output_objdir; then
1602 $show "$mkdir $output_objdir"
1603 $run $mkdir $output_objdir
1605 if test $status -ne 0 && test ! -d $output_objdir; then
1610 # Determine the type of output
1613 $echo "$modename: you must specify an output file" 1>&2
1617 *.
$libext) linkmode
=oldlib
;;
1618 *.lo |
*.
$objext) linkmode
=obj
;;
1619 *.la
) linkmode
=lib
;;
1620 *) linkmode
=prog
;; # Anything else should be a program.
1625 # Find all interdependent deplibs by searching for libraries
1626 # that are linked more than once (e.g. -la -lb -la)
1627 for deplib
in $deplibs; do
1629 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1631 libs
="$libs $deplib"
1634 if test $linkmode = lib
; then
1635 libs
="$predeps $libs $compiler_lib_search_path $postdeps"
1641 need_relink
=no
# whether we're linking any uninstalled libtool libraries
1642 uninst_deplibs
= # uninstalled libtool libraries
1643 uninst_path
= # paths that contain uninstalled libtool libraries
1647 for file in $dlfiles $dlprefiles; do
1651 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1663 passes
="conv scan dlopen dlpreopen link"
1668 for pass
in $passes; do
1669 if test "$linkmode,$pass" = "lib,link" ||
1670 test "$linkmode,$pass" = "prog,scan"; then
1674 if test $linkmode = prog
; then
1676 dlopen
) libs
="$dlfiles" ;;
1677 dlpreopen
) libs
="$dlprefiles" ;;
1678 link
) libs
="$deplibs %DEPLIBS% $dependency_libs" ;;
1681 if test $pass = dlopen
; then
1682 # Collect dlpreopened libraries
1683 save_deplibs
="$deplibs"
1686 for deplib
in $libs; do
1691 if test $linkmode != lib
&& test $linkmode != prog
; then
1692 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1695 if test $pass = conv
; then
1696 deplibs
="$deplib $deplibs"
1699 name
=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1700 for searchdir
in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1701 # Search the libtool library
1702 lib
="$searchdir/lib${name}.la"
1703 if test -f "$lib"; then
1708 if test "$found" != yes; then
1709 if test "$linkmode,$pass" = "prog,link"; then
1710 compile_deplibs
="$deplib $compile_deplibs"
1711 finalize_deplibs
="$deplib $finalize_deplibs"
1713 deplibs
="$deplib $deplibs"
1714 test $linkmode = lib
&& newdependency_libs
="$deplib $newdependency_libs"
1722 deplibs
="$deplib $deplibs"
1723 test $pass = conv
&& continue
1724 newdependency_libs
="$deplib $newdependency_libs"
1725 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1728 if test $pass = conv
; then
1729 deplibs
="$deplib $deplibs"
1732 if test $pass = scan
; then
1733 deplibs
="$deplib $deplibs"
1734 newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1736 compile_deplibs
="$deplib $compile_deplibs"
1737 finalize_deplibs
="$deplib $finalize_deplibs"
1741 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
1747 if test $pass = link
; then
1748 dir
=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1749 # Make sure the xrpath contains only unique directories.
1752 *) xrpath
="$xrpath $dir" ;;
1755 deplibs
="$deplib $deplibs"
1758 *.la
) lib
="$deplib" ;;
1760 if test $pass = conv
; then
1761 deplibs
="$deplib $deplibs"
1766 if test "$deplibs_check_method" != pass_all
; then
1768 echo "*** Warning: This library needs some functionality provided by $deplib."
1769 echo "*** I have the capability to make that library automatically link in when"
1770 echo "*** you link to this library. But I can only do this if you have a"
1771 echo "*** shared version of the library, which you do not appear to have."
1774 echo "*** Warning: Linking the shared library $output against the"
1775 echo "*** static library $deplib is not portable!"
1776 deplibs
="$deplib $deplibs"
1781 if test $pass != link
; then
1782 deplibs
="$deplib $deplibs"
1784 compile_deplibs
="$deplib $compile_deplibs"
1785 finalize_deplibs
="$deplib $finalize_deplibs"
1792 if test $pass = conv
; then
1793 deplibs
="$deplib $deplibs"
1794 elif test $linkmode = prog
; then
1795 if test $pass = dlpreopen ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
1796 # If there is no dlopen support or we're linking statically,
1797 # we need to preload.
1798 newdlprefiles
="$newdlprefiles $deplib"
1799 compile_deplibs
="$deplib $compile_deplibs"
1800 finalize_deplibs
="$deplib $finalize_deplibs"
1802 newdlfiles
="$newdlfiles $deplib"
1812 if test $found = yes ||
test -f "$lib"; then :
1814 $echo "$modename: cannot find the library \`$lib'" 1>&2
1818 # Check to see that this really is a libtool archive.
1819 if (sed -e '2q' $lib |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
1821 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1825 ladir
=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1826 test "X$ladir" = "X$lib" && ladir
="."
1834 # If the library was installed with an old release of libtool,
1835 # it will not redefine variable installed.
1840 */* |
*\\*) .
$lib ;;
1844 if test "$linkmode,$pass" = "lib,link" ||
1845 test "$linkmode,$pass" = "prog,scan" ||
1846 { test $linkmode != prog
&& test $linkmode != lib
; }; then
1847 test -n "$dlopen" && dlfiles
="$dlfiles $dlopen"
1848 test -n "$dlpreopen" && dlprefiles
="$dlprefiles $dlpreopen"
1851 if test $pass = conv
; then
1852 # only check for convenience libraries
1853 deplibs
="$lib $deplibs"
1854 if test -z "$libdir"; then
1855 if test -z "$old_library"; then
1856 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1859 # It is a libtool convenience library, so add in its objects.
1860 convenience
="$convenience $ladir/$objdir/$old_library"
1861 old_convenience
="$old_convenience $ladir/$objdir/$old_library"
1863 for deplib
in $dependency_libs; do
1864 deplibs
="$deplib $deplibs"
1865 case "$tmp_libs " in
1866 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1868 tmp_libs
="$tmp_libs $deplib"
1870 elif test $linkmode != prog
&& test $linkmode != lib
; then
1871 $echo "$modename: \`$lib' is not a convenience library" 1>&2
1877 # Get the name of the library we link against.
1879 for l
in $old_library $library_names; do
1882 if test -z "$linklib"; then
1883 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1887 # This library was specified with -dlopen.
1888 if test $pass = dlopen
; then
1889 if test -z "$libdir"; then
1890 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1893 if test -z "$dlname" ||
test "$dlopen_support" != yes ||
test "$build_libtool_libs" = no
; then
1894 # If there is no dlname, no dlopen support or we're linking
1895 # statically, we need to preload. We also need to preload any
1896 # dependent libraries so libltdl's deplib preloader doesn't
1897 # bomb out in the load deplibs phase.
1898 dlprefiles
="$dlprefiles $lib $dependency_libs"
1900 newdlfiles
="$newdlfiles $lib"
1905 # We need an absolute path.
1907 [\\/]* |
[A-Za-z
]:[\\/]*) abs_ladir
="$ladir" ;;
1909 abs_ladir
=`cd "$ladir" && pwd`
1910 if test -z "$abs_ladir"; then
1911 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1912 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1917 laname
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1919 # Find the relevant object directory and library name.
1920 if test "X$installed" = Xyes
; then
1921 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1922 $echo "$modename: warning: library \`$lib' was moved." 1>&2
1931 dir
="$ladir/$objdir"
1932 absdir
="$abs_ladir/$objdir"
1933 # Remove this search path later
1934 uninst_path
="$uninst_path $abs_ladir"
1936 name
=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1938 # This library was specified with -dlpreopen.
1939 if test $pass = dlpreopen
; then
1940 if test -z "$libdir"; then
1941 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1944 # Prefer using a static library (so that no silly _DYNAMIC symbols
1945 # are required to link).
1946 if test -n "$old_library"; then
1947 newdlprefiles
="$newdlprefiles $dir/$old_library"
1948 # Otherwise, use the dlname, so that lt_dlopen finds it.
1949 elif test -n "$dlname"; then
1950 newdlprefiles
="$newdlprefiles $dir/$dlname"
1952 newdlprefiles
="$newdlprefiles $dir/$linklib"
1956 if test -z "$libdir"; then
1957 # link the convenience library
1958 if test $linkmode = lib
; then
1959 deplibs
="$dir/$old_library $deplibs"
1960 elif test "$linkmode,$pass" = "prog,link"; then
1961 compile_deplibs
="$dir/$old_library $compile_deplibs"
1962 finalize_deplibs
="$dir/$old_library $finalize_deplibs"
1964 deplibs
="$lib $deplibs" # used for prog,scan pass
1969 if test $linkmode = prog
&& test $pass != link
; then
1970 newlib_search_path
="$newlib_search_path $ladir"
1971 deplibs
="$lib $deplibs"
1974 if test "$link_all_deplibs" != no ||
test -z "$library_names" ||
1975 test "$build_libtool_libs" = no
; then
1980 for deplib
in $dependency_libs; do
1982 -L*) newlib_search_path
="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1984 # Need to link against all dependency_libs?
1985 if test $linkalldeplibs = yes; then
1986 deplibs
="$deplib $deplibs"
1988 # Need to hardcode shared library paths
1989 # or/and link against static libraries
1990 newdependency_libs
="$deplib $newdependency_libs"
1992 case "$tmp_libs " in
1993 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
1995 tmp_libs
="$tmp_libs $deplib"
2000 if test "$linkmode,$pass" = "prog,link"; then
2001 if test -n "$library_names" &&
2002 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2003 # We need to hardcode the library path
2004 if test -n "$shlibpath_var"; then
2005 # Make sure the rpath contains only unique directories.
2006 case "$temp_rpath " in
2009 *) temp_rpath
="$temp_rpath $dir" ;;
2013 # Hardcode the library path.
2014 # Skip directories that are in the system default run-time
2016 case " $sys_lib_dlsearch_path " in
2019 case "$compile_rpath " in
2021 *) compile_rpath
="$compile_rpath $absdir"
2026 case " $sys_lib_dlsearch_path " in
2029 case "$finalize_rpath " in
2031 *) finalize_rpath
="$finalize_rpath $libdir"
2037 if test "$alldeplibs" = yes &&
2038 { test "$deplibs_check_method" = pass_all ||
2039 { test "$build_libtool_libs" = yes &&
2040 test -n "$library_names"; }; }; then
2041 # We only need to search for static libraries
2046 link_static
=no
# Whether the deplib will be linked statically
2047 if test -n "$library_names" &&
2048 { test "$prefer_static_libs" = no ||
test -z "$old_library"; }; then
2049 if test "$installed" = no
; then
2050 uninst_deplibs
="$uninst_deplibs $lib"
2053 # This is a shared library
2054 if test $linkmode = lib
&& test "$hardcode_into_libs" = all
; then
2055 # Hardcode the library path.
2056 # Skip directories that are in the system default run-time
2058 case " $sys_lib_dlsearch_path " in
2061 case "$compile_rpath " in
2063 *) compile_rpath
="$compile_rpath $absdir"
2067 case " $sys_lib_dlsearch_path " in
2070 case "$finalize_rpath " in
2072 *) finalize_rpath
="$finalize_rpath $libdir"
2078 if test -n "$old_archive_from_expsyms_cmds"; then
2079 # figure out the soname
2080 set dummy
$library_names
2083 libname
=`eval \\$echo \"$libname_spec\"`
2084 # use dlname if we got it. it's perfectly good, no?
2085 if test -n "$dlname"; then
2087 elif test -n "$soname_spec"; then
2091 major
=`expr $current - $age`
2095 eval soname
=\"$soname_spec\"
2100 # Make a new name for the extract_expsyms_cmds to use
2102 soname
=`echo $soroot | sed -e 's/^.*\///'`
2103 newlib
="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
2105 # If the library has no export list, then create one now
2106 if test -f "$output_objdir/$soname-def"; then :
2108 $show "extracting exported symbol list from \`$soname'"
2109 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2110 eval cmds
=\"$extract_expsyms_cmds\"
2111 for cmd
in $cmds; do
2114 $run eval "$cmd" ||
exit $?
2120 if test -f "$output_objdir/$newlib"; then :; else
2121 $show "generating import library for \`$soname'"
2122 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
2123 eval cmds
=\"$old_archive_from_expsyms_cmds\"
2124 for cmd
in $cmds; do
2127 $run eval "$cmd" ||
exit $?
2131 # make sure the library variables are pointing to the new library
2136 if test $linkmode = prog ||
test "$mode" != relink
; then
2141 case $hardcode_action in
2142 immediate | unsupported
)
2143 if test "$hardcode_direct" = no
; then
2145 elif test "$hardcode_minus_L" = no
; then
2147 *-*-sunos*) add_shlibpath
="$dir" ;;
2151 elif test "$hardcode_shlibpath_var" = no
; then
2152 add_shlibpath
="$dir"
2159 if test "$hardcode_direct" = yes; then
2161 elif test "$hardcode_minus_L" = yes; then
2164 elif test "$hardcode_shlibpath_var" = yes; then
2165 add_shlibpath
="$dir"
2174 if test "$lib_linked" != yes; then
2175 $echo "$modename: configuration error: unsupported hardcode properties"
2179 if test -n "$add_shlibpath"; then
2180 case :$compile_shlibpath: in
2181 *":$add_shlibpath:"*) ;;
2182 *) compile_shlibpath
="$compile_shlibpath$add_shlibpath:" ;;
2185 if test $linkmode = prog
; then
2186 test -n "$add_dir" && compile_deplibs
="$add_dir $compile_deplibs"
2187 test -n "$add" && compile_deplibs
="$add $compile_deplibs"
2189 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2190 test -n "$add" && deplibs
="$add $deplibs"
2191 if test "$hardcode_direct" != yes && \
2192 test "$hardcode_minus_L" != yes && \
2193 test "$hardcode_shlibpath_var" = yes; then
2194 case :$finalize_shlibpath: in
2196 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2202 if test $linkmode = prog ||
test "$mode" = relink
; then
2206 # Finalize command for both is simple: just hardcode it.
2207 if test "$hardcode_direct" = yes; then
2208 add
="$libdir/$linklib"
2209 elif test "$hardcode_minus_L" = yes; then
2212 elif test "$hardcode_shlibpath_var" = yes; then
2213 case :$finalize_shlibpath: in
2215 *) finalize_shlibpath
="$finalize_shlibpath$libdir:" ;;
2219 # We cannot seem to hardcode it, guess we'll fake it.
2224 if test $linkmode = prog
; then
2225 test -n "$add_dir" && finalize_deplibs
="$add_dir $finalize_deplibs"
2226 test -n "$add" && finalize_deplibs
="$add $finalize_deplibs"
2228 test -n "$add_dir" && deplibs
="$add_dir $deplibs"
2229 test -n "$add" && deplibs
="$add $deplibs"
2232 elif test $linkmode = prog
; then
2233 # Here we assume that one of hardcode_direct or hardcode_minus_L
2234 # is not unsupported. This is valid on all known static and
2236 if test "$hardcode_direct" != unsupported
; then
2237 test -n "$old_library" && linklib
="$old_library"
2238 compile_deplibs
="$dir/$linklib $compile_deplibs"
2239 finalize_deplibs
="$dir/$linklib $finalize_deplibs"
2241 compile_deplibs
="-l$name -L$dir $compile_deplibs"
2242 finalize_deplibs
="-l$name -L$dir $finalize_deplibs"
2244 elif test "$build_libtool_libs" = yes; then
2245 # Not a shared library
2246 if test "$deplibs_check_method" != pass_all
; then
2247 # We're trying link a shared library against a static one
2248 # but the system doesn't support it.
2249 # Just print a warning and add the library to dependency_libs so
2250 # that the program can be linked against the static library.
2252 echo "*** Warning: This library needs some functionality provided by $lib."
2253 echo "*** I have the capability to make that library automatically link in when"
2254 echo "*** you link to this library. But I can only do this if you have a"
2255 echo "*** shared version of the library, which you do not appear to have."
2257 convenience
="$convenience $dir/$old_library"
2258 old_convenience
="$old_convenience $dir/$old_library"
2259 deplibs
="$dir/$old_library $deplibs"
2264 if test $linkmode = lib
; then
2265 if test -n "$dependency_libs" &&
2266 { test $hardcode_into_libs != yes ||
test $build_old_libs = yes ||
2267 test $link_static = yes; }; then
2268 # Extract -R from dependency_libs
2270 for libdir
in $dependency_libs; do
2272 -R*) temp_xrpath
=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2274 *" $temp_xrpath "*) ;;
2275 *) xrpath
="$xrpath $temp_xrpath";;
2277 *) temp_deplibs
="$temp_deplibs $libdir";;
2280 dependency_libs
="$temp_deplibs"
2283 newlib_search_path
="$newlib_search_path $absdir"
2284 # Link against this library
2285 test "$link_static" = no
&& newdependency_libs
="$abs_ladir/$laname $newdependency_libs"
2286 # ... and its dependency_libs
2288 for deplib
in $dependency_libs; do
2289 newdependency_libs
="$deplib $newdependency_libs"
2290 case "$tmp_libs " in
2291 *" $deplib "*) specialdeplibs
="$specialdeplibs $deplib" ;;
2293 tmp_libs
="$tmp_libs $deplib"
2296 if test $link_all_deplibs != no
; then
2297 # Add the search paths of all dependency libraries
2298 for deplib
in $dependency_libs; do
2300 -L*) path
="$deplib" ;;
2302 dir
=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2303 test "X$dir" = "X$deplib" && dir
="."
2304 # We need an absolute path.
2306 [\\/]* |
[A-Za-z
]:[\\/]*) absdir
="$dir" ;;
2308 absdir
=`cd "$dir" && pwd`
2309 if test -z "$absdir"; then
2310 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2315 if grep "^installed=no" $deplib > /dev
/null
; then
2316 path
="-L$absdir/$objdir"
2318 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2319 if test -z "$libdir"; then
2320 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2323 if test "$absdir" != "$libdir"; then
2324 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2331 case " $deplibs " in
2333 *) deplibs
="$path $deplibs" ;;
2339 dependency_libs
="$newdependency_libs"
2340 if test $pass = dlpreopen
; then
2341 # Link the dlpreopened libraries before other libraries
2342 for deplib
in $save_deplibs; do
2343 deplibs
="$deplib $deplibs"
2346 if test $pass != dlopen
; then
2347 if test $pass != conv
; then
2348 # Make sure lib_search_path contains only unique directories.
2350 for dir
in $newlib_search_path; do
2351 case "$lib_search_path " in
2353 *) lib_search_path
="$lib_search_path $dir" ;;
2359 if test "$linkmode,$pass" != "prog,link"; then
2362 vars
="compile_deplibs finalize_deplibs"
2364 for var
in $vars dependency_libs
; do
2365 # Make sure that $var contains only unique libraries
2366 # and add them in reverse order
2367 eval tmp_libs
=\"\$
$var\"
2369 for deplib
in $tmp_libs; do
2371 -L*) new_libs
="$deplib $new_libs" ;;
2373 case " $specialdeplibs " in
2374 *" $deplib "*) new_libs
="$deplib $new_libs" ;;
2376 case " $new_libs " in
2378 *) new_libs
="$deplib $new_libs" ;;
2386 for deplib
in $new_libs; do
2389 case " $tmp_libs " in
2391 *) tmp_libs
="$tmp_libs $deplib" ;;
2394 *) tmp_libs
="$tmp_libs $deplib" ;;
2397 eval $var=\"$tmp_libs\"
2401 if test $linkmode = prog
; then
2402 dlfiles
="$newdlfiles"
2403 dlprefiles
="$newdlprefiles"
2408 if test -n "$deplibs"; then
2409 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
2412 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
2413 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2416 if test -n "$rpath"; then
2417 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2420 if test -n "$xrpath"; then
2421 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2424 if test -n "$vinfo"; then
2425 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2428 if test -n "$release"; then
2429 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2432 if test -n "$export_symbols" ||
test -n "$export_symbols_regex"; then
2433 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2436 # Now set the variables for building old libraries.
2437 build_libtool_libs
=no
2439 objs
="$objs$old_deplibs"
2443 # Make sure we only generate libraries of the form `libNAME.la'.
2446 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2447 eval libname
=\"$libname_spec\"
2450 if test "$module" = no
; then
2451 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2455 if test "$need_lib_prefix" != no
; then
2456 # Add the "lib" prefix for modules if required
2457 name
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2458 eval libname
=\"$libname_spec\"
2460 libname
=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2465 if test -n "$objs"; then
2466 if test "$deplibs_check_method" != pass_all
; then
2467 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2471 echo "*** Warning: Linking the shared library $output against the non-libtool"
2472 echo "*** objects $objs is not portable!"
2473 libobjs
="$libobjs $objs"
2477 if test "$dlself" != no
; then
2478 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2482 if test $# -gt 2; then
2483 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2488 if test -z "$rpath"; then
2489 if test "$build_libtool_libs" = yes; then
2490 # Building a libtool convenience library.
2491 # Some compilers have problems with a `.al' extension so
2492 # convenience libraries should have the same extension an
2493 # archive normally would.
2494 oldlibs
="$output_objdir/$libname.$libext $oldlibs"
2495 build_libtool_libs
=convenience
2499 if test -n "$vinfo"; then
2500 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2503 if test -n "$release"; then
2504 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2508 # Parse the version information argument.
2509 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
=':'
2510 set dummy
$vinfo 0 0 0
2513 if test -n "$8"; then
2514 $echo "$modename: too many parameters to \`-version-info'" 1>&2
2523 # Check that each of the things are valid numbers.
2525 0 |
[1-9] |
[1-9][0-9]*) ;;
2527 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2528 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2534 0 |
[1-9] |
[1-9][0-9]*) ;;
2536 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2537 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2543 0 |
[1-9] |
[1-9][0-9]*) ;;
2545 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2546 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2551 if test $age -gt $current; then
2552 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2553 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2557 # Calculate the version variables.
2561 case $version_type in
2565 # Like Linux, but with the current version available in
2566 # verstring for coding it into the library header
2567 major
=.
`expr $current - $age`
2568 versuffix
="$major.$age.$revision"
2569 # Darwin ld doesn't like 0 for these options...
2570 minor_current
=`expr $current + 1`
2571 verstring
="-compatibility_version $minor_current -current_version $minor_current.$revision"
2576 versuffix
=".$current.$revision";
2581 versuffix
=".$current";
2585 major
=`expr $current - $age + 1`
2586 verstring
="sgi$major.$revision"
2588 # Add in all the interfaces that we are compatible with.
2590 while test $loop != 0; do
2591 iface
=`expr $revision - $loop`
2592 loop
=`expr $loop - 1`
2593 verstring
="sgi$major.$iface:$verstring"
2596 # Before this point, $major must not contain `.'.
2598 versuffix
="$major.$revision"
2602 major
=.
`expr $current - $age`
2603 versuffix
="$major.$age.$revision"
2607 major
=`expr $current - $age`
2608 versuffix
=".$current.$age.$revision"
2609 verstring
="$current.$age.$revision"
2611 # Add in all the interfaces that we are compatible with.
2613 while test $loop != 0; do
2614 iface
=`expr $current - $loop`
2615 loop
=`expr $loop - 1`
2616 verstring
="$verstring:${iface}.0"
2619 # Make executables depend on our current version.
2620 verstring
="$verstring:${current}.0"
2625 versuffix
=".$current.$revision"
2629 # Use '-' rather than '.', since we only want one
2630 # extension on DOS 8.3 filesystems.
2631 major
=`expr $current - $age`
2636 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2637 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2642 # Clear the version info if we defaulted, and they specified a release.
2643 if test -z "$vinfo" && test -n "$release"; then
2646 if test "$need_version" = no
; then
2653 # Remove version info from name if versioning should be avoided
2654 if test "$avoid_version" = yes && test "$need_version" = no
; then
2660 # Check to see if the archive will have undefined symbols.
2661 if test "$allow_undefined" = yes; then
2662 if test "$allow_undefined_flag" = unsupported
; then
2663 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2664 build_libtool_libs
=no
2668 # Don't allow undefined symbols.
2669 allow_undefined_flag
="$no_undefined_flag"
2673 if test "$mode" != relink
; then
2674 # Remove our outputs, but don't remove object files since they
2675 # may have been created when compiling PIC objects.
2677 tempremovelist
=`echo "$output_objdir/*"`
2678 for p
in $tempremovelist; do
2682 $output_objdir/$outputname |
$output_objdir/$libname.
* |
$output_objdir/${libname}${release}.
*)
2683 removelist
="$removelist $p"
2688 if test -n "$removelist"; then
2689 $show "${rm}r $removelist"
2690 $run ${rm}r
$removelist
2694 # Now set the variables for building old libraries.
2695 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience
; then
2696 oldlibs
="$oldlibs $output_objdir/$libname.$libext"
2698 # Transform .lo files to .o files.
2699 oldobjs
="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2702 # Eliminate all temporary directories.
2703 for path
in $uninst_path; do
2704 lib_search_path
=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2705 deplibs
=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2706 dependency_libs
=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2709 if test -n "$xrpath"; then
2710 # If the user specified any rpath flags, then add them.
2712 for libdir
in $xrpath; do
2713 temp_xrpath
="$temp_xrpath -R$libdir"
2714 case "$finalize_rpath " in
2716 *) finalize_rpath
="$finalize_rpath $libdir" ;;
2719 if test $hardcode_into_libs != yes ||
test $build_old_libs = yes; then
2720 dependency_libs
="$temp_xrpath $dependency_libs"
2724 # Make sure dlfiles contains only unique files that won't be dlpreopened
2725 old_dlfiles
="$dlfiles"
2727 for lib
in $old_dlfiles; do
2728 case " $dlprefiles $dlfiles " in
2730 *) dlfiles
="$dlfiles $lib" ;;
2734 # Make sure dlprefiles contains only unique files
2735 old_dlprefiles
="$dlprefiles"
2737 for lib
in $old_dlprefiles; do
2738 case "$dlprefiles " in
2740 *) dlprefiles
="$dlprefiles $lib" ;;
2744 if test "$build_libtool_libs" = yes; then
2745 if test -n "$rpath"; then
2747 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2* |
*-*-beos*)
2748 # these systems don't actually have a c library (as such)!
2750 *-*-rhapsody* |
*-*-darwin1.
[012])
2751 # Rhapsody C library is in the System framework
2752 deplibs
="$deplibs -framework System"
2755 # Add libc to deplibs on all other systems if necessary.
2756 if test $build_libtool_need_lc = "yes"; then
2757 deplibs
="$deplibs -lc"
2763 # Transform deplibs into only deplibs that can be linked in shared.
2765 libname_save
=$libname
2766 release_save
=$release
2767 versuffix_save
=$versuffix
2769 # I'm not sure if I'm treating the release correctly. I think
2770 # release should show up in the -l (ie -lgmp5) so we don't want to
2771 # add it in twice. Is that correct?
2777 case $deplibs_check_method in
2779 # Don't check for shared/static. Everything works.
2780 # This might be a little naive. We might want to check
2781 # whether the library exists or not. But this is on
2782 # osf3 & osf4 and I'm not really sure... Just
2783 # implementing what was already the behaviour.
2787 # This code stresses the "libraries are programs" paradigm to its
2788 # limits. Maybe even breaks it. We compile a program, linking it
2789 # against the deplibs as a proxy for the library. Then we can check
2790 # whether they linked in statically or dynamically with ldd.
2792 cat > conftest.c
<<EOF
2793 int main() { return 0; }
2796 $LTCC -o conftest conftest.c
$deplibs
2797 if test $?
-eq 0 ; then
2798 ldd_output
=`ldd conftest`
2799 for i
in $deplibs; do
2800 name
="`expr $i : '-l\(.*\)'`"
2801 # If $name is empty we are operating on a -L argument.
2802 if test "$name" != "" -a "$name" != "0"; then
2803 libname
=`eval \\$echo \"$libname_spec\"`
2804 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
2805 set dummy
$deplib_matches
2807 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2808 newdeplibs
="$newdeplibs $i"
2812 echo "*** Warning: This library needs some functionality provided by $i."
2813 echo "*** I have the capability to make that library automatically link in when"
2814 echo "*** you link to this library. But I can only do this if you have a"
2815 echo "*** shared version of the library, which you do not appear to have."
2818 newdeplibs
="$newdeplibs $i"
2822 # Error occured in the first compile. Let's try to salvage the situation:
2823 # Compile a seperate program for each library.
2824 for i
in $deplibs; do
2825 name
="`expr $i : '-l\(.*\)'`"
2826 # If $name is empty we are operating on a -L argument.
2827 if test "$name" != "" -a "$name" != "0"; then
2829 $LTCC -o conftest conftest.c
$i
2831 if test $?
-eq 0 ; then
2832 ldd_output
=`ldd conftest`
2833 libname
=`eval \\$echo \"$libname_spec\"`
2834 deplib_matches
=`eval \\$echo \"$library_names_spec\"`
2835 set dummy
$deplib_matches
2837 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2838 newdeplibs
="$newdeplibs $i"
2842 echo "*** Warning: This library needs some functionality provided by $i."
2843 echo "*** I have the capability to make that library automatically link in when"
2844 echo "*** you link to this library. But I can only do this if you have a"
2845 echo "*** shared version of the library, which you do not appear to have."
2850 echo "*** Warning! Library $i is needed by this library but I was not able to"
2851 echo "*** make it link in! You will probably need to install it or some"
2852 echo "*** library that it depends on before this library will be fully"
2853 echo "*** functional. Installing it before continuing would be even better."
2856 newdeplibs
="$newdeplibs $i"
2862 set dummy
$deplibs_check_method
2863 file_magic_regex
=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2864 for a_deplib
in $deplibs; do
2865 name
="`expr $a_deplib : '-l\(.*\)'`"
2866 # If $name is empty we are operating on a -L argument.
2867 if test "$name" != "" -a "$name" != "0"; then
2868 libname
=`eval \\$echo \"$libname_spec\"`
2869 for i
in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2870 potential_libs
=`ls $i/$libname[.-]* 2>/dev/null`
2871 for potent_lib
in $potential_libs; do
2872 # Follow soft links.
2873 if ls -lLd "$potent_lib" 2>/dev
/null \
2874 |
grep " -> " >/dev
/null
; then
2877 # The statement above tries to avoid entering an
2878 # endless loop below, in case of cyclic links.
2879 # We might still enter an endless loop, since a link
2880 # loop can be closed while we follow links,
2882 potlib
="$potent_lib"
2883 while test -h "$potlib" 2>/dev
/null
; do
2884 potliblink
=`ls -ld $potlib | sed 's/.* -> //'`
2886 [\\/]* |
[A-Za-z
]:[\\/]*) potlib
="$potliblink";;
2887 *) potlib
=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2890 if eval $file_magic_cmd \"\
$potlib\" 2>/dev
/null \
2892 |
egrep "$file_magic_regex" > /dev
/null
; then
2893 newdeplibs
="$newdeplibs $a_deplib"
2899 if test -n "$a_deplib" ; then
2902 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2903 echo "*** I have the capability to make that library automatically link in when"
2904 echo "*** you link to this library. But I can only do this if you have a"
2905 echo "*** shared version of the library, which you do not appear to have."
2908 # Add a -L argument.
2909 newdeplibs
="$newdeplibs $a_deplib"
2911 done # Gone through all deplibs.
2915 if $echo "X $deplibs" |
$Xsed -e 's/ -lc$//' \
2916 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2917 grep .
>/dev
/null
; then
2919 if test "X$deplibs_check_method" = "Xnone"; then
2920 echo "*** Warning: inter-library dependencies are not supported in this platform."
2922 echo "*** Warning: inter-library dependencies are not known to be supported."
2924 echo "*** All declared inter-library dependencies are being dropped."
2929 versuffix
=$versuffix_save
2931 release
=$release_save
2932 libname
=$libname_save
2935 if test "$droppeddeps" = yes; then
2936 if test "$module" = yes; then
2938 echo "*** Warning: libtool could not satisfy all declared inter-library"
2939 echo "*** dependencies of module $libname. Therefore, libtool will create"
2940 echo "*** a static module, that should work as long as the dlopening"
2941 echo "*** application is linked with the -dlopen flag."
2942 if test -z "$global_symbol_pipe"; then
2944 echo "*** However, this would only work if libtool was able to extract symbol"
2945 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2946 echo "*** not find such a program. So, this module is probably useless."
2947 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2949 if test "$build_old_libs" = no
; then
2950 oldlibs
="$output_objdir/$libname.$libext"
2951 build_libtool_libs
=module
2954 build_libtool_libs
=no
2957 echo "*** The inter-library dependencies that have been dropped here will be"
2958 echo "*** automatically added whenever a program is linked with this library"
2959 echo "*** or is declared to -dlopen it."
2961 if test $allow_undefined = no
; then
2963 echo "*** Since this library must not contain undefined symbols,"
2964 echo "*** because either the platform does not support them or"
2965 echo "*** it was explicitly requested with -no-undefined,"
2966 echo "*** libtool will only create a static version of it."
2967 if test "$build_old_libs" = no
; then
2968 oldlibs
="$output_objdir/$libname.$libext"
2969 build_libtool_libs
=module
2972 build_libtool_libs
=no
2977 # Done checking deplibs!
2981 # All the library-specific variables (install_libdir is set above).
2986 # Test again, we may have decided not to build it any more
2987 if test "$build_libtool_libs" = yes; then
2988 if test $hardcode_into_libs = yes; then
2989 # Hardcode the library paths
2992 rpath
="$finalize_rpath"
2993 test "$mode" != relink
&& rpath
="$compile_rpath$rpath"
2994 for libdir
in $rpath; do
2995 if test -n "$hardcode_libdir_flag_spec"; then
2996 if test -n "$hardcode_libdir_separator"; then
2997 if test -z "$hardcode_libdirs"; then
2998 hardcode_libdirs
="$libdir"
3000 # Just accumulate the unique libdirs.
3001 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3002 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3005 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3010 eval flag
=\"$hardcode_libdir_flag_spec\"
3011 dep_rpath
="$dep_rpath $flag"
3013 elif test -n "$runpath_var"; then
3014 case "$perm_rpath " in
3016 *) perm_rpath
="$perm_rpath $libdir" ;;
3020 # Substitute the hardcoded libdirs into the rpath.
3021 if test -n "$hardcode_libdir_separator" &&
3022 test -n "$hardcode_libdirs"; then
3023 libdir
="$hardcode_libdirs"
3024 eval dep_rpath
=\"$hardcode_libdir_flag_spec\"
3026 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3027 # We should set the runpath_var.
3029 for dir
in $perm_rpath; do
3032 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3034 test -n "$dep_rpath" && deplibs
="$dep_rpath $deplibs"
3037 shlibpath
="$finalize_shlibpath"
3038 test "$mode" != relink
&& shlibpath
="$compile_shlibpath$shlibpath"
3039 if test -n "$shlibpath"; then
3040 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3043 # Get the real and link names of the library.
3044 eval library_names
=\"$library_names_spec\"
3045 set dummy
$library_names
3049 if test -n "$soname_spec"; then
3050 eval soname
=\"$soname_spec\"
3054 if test x
$dlname = x
; then
3058 lib
="$output_objdir/$realname"
3061 linknames
="$linknames $link"
3064 # # Ensure that we have .o objects for linkers which dislike .lo
3065 # # (e.g. aix) in case we are running --disable-static
3066 # for obj in $libobjs; do
3067 # xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
3068 # if test "X$xdir" = "X$obj"; then
3073 # baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
3074 # oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3075 # if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then
3076 # $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
3077 # $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
3081 # Use standard objects if they are pic
3082 test -z "$pic_flag" && libobjs
=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3084 # Prepare the list of exported symbols
3085 if test -z "$export_symbols"; then
3086 if test "$always_export_symbols" = yes ||
test -n "$export_symbols_regex"; then
3087 $show "generating symbol list for \`$libname.la'"
3088 export_symbols
="$output_objdir/$libname.exp"
3089 $run $rm $export_symbols
3090 eval cmds
=\"$export_symbols_cmds\"
3091 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3092 for cmd
in $cmds; do
3095 $run eval "$cmd" ||
exit $?
3098 if test -n "$export_symbols_regex"; then
3099 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3100 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3101 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3102 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3107 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3108 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3111 if test -n "$convenience"; then
3112 if test -n "$whole_archive_flag_spec"; then
3113 save_libobjs
=$libobjs
3114 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3116 gentop
="$output_objdir/${outputname}x"
3117 $show "${rm}r $gentop"
3118 $run ${rm}r
"$gentop"
3119 $show "$mkdir $gentop"
3120 $run $mkdir "$gentop"
3122 if test $status -ne 0 && test ! -d "$gentop"; then
3125 generated
="$generated $gentop"
3127 for xlib
in $convenience; do
3128 # Extract the objects.
3130 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
3131 *) xabs
=`pwd`"/$xlib" ;;
3133 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3134 xdir
="$gentop/$xlib"
3136 $show "${rm}r $xdir"
3138 $show "$mkdir $xdir"
3141 if test $status -ne 0 && test ! -d "$xdir"; then
3144 $show "(cd $xdir && $AR x $xabs)"
3145 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
3147 libobjs
="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3152 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3153 eval flag
=\"$thread_safe_flag_spec\"
3154 linker_flags
="$linker_flags $flag"
3157 # Make a backup of the uninstalled library when relinking
3158 if test "$mode" = relink
&& test "$hardcode_into_libs" = all
; then
3159 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' ||
exit $?
3162 # Add all flags from the command line. We here create a library,
3163 # but those flags were only added to compile_command and
3164 # finalize_command, which are only used when creating executables.
3165 # So do it by hand here.
3166 compiler_flags
="$compiler_flags $add_flags"
3167 # Only add it to commands which use CC, instead of LD, i.e.
3168 # only to $compiler_flags
3169 #linker_flags="$linker_flags $add_flags"
3171 # Do each of the archive commands.
3172 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3173 eval cmds
=\"$archive_expsym_cmds\"
3175 eval cmds
=\"$archive_cmds\"
3177 if len
=`expr "X$cmds" : ".*"` &&
3178 test $len -le $max_cmd_len; then
3181 # The command line is too long to link in one step, link piecewise.
3182 $echo "creating reloadable object files..."
3184 # Save the value of $output and $libobjs because we want to
3185 # use them later. If we have whole_archive_flag_spec, we
3186 # want to use save_libobjs as it was before
3187 # whole_archive_flag_spec was expanded, because we can't
3188 # assume the linker understands whole_archive_flag_spec.
3189 # This may have to be revisited, in case too many
3190 # convenience libraries get linked in and end up exceeding
3192 if test -z "$convenience" ||
test -z "$whole_archive_flag_spec"; then
3193 save_libobjs
=$libobjs
3197 # Clear the reloadable object creation command queue and
3198 # initialize k to one.
3205 output
=$output_objdir/$save_output-${k}.
$objext
3206 # Loop over the list of objects to be linked.
3207 for obj
in $save_libobjs
3209 eval test_cmds
=\"$reload_cmds $objlist $last_robj\"
3210 if test "X$objlist" = X ||
3211 { len
=`expr "X$test_cmds" : ".*"` &&
3212 test $len -le $max_cmd_len; }; then
3213 objlist
="$objlist $obj"
3215 # The command $test_cmds is almost too long, add a
3216 # command to the queue.
3217 if test $k -eq 1 ; then
3218 # The first file doesn't have a previous command to add.
3219 eval concat_cmds
=\"$reload_cmds $objlist $last_robj\"
3221 # All subsequent reloadable object files will link in
3222 # the last one created.
3223 eval concat_cmds
=\"\
$concat_cmds~
$reload_cmds $objlist $last_robj\"
3225 last_robj
=$output_objdir/$save_output-${k}.
$objext
3227 output
=$output_objdir/$save_output-${k}.
$objext
3232 # Handle the remaining objects by creating one last
3233 # reloadable object file. All subsequent reloadable object
3234 # files will link in the last one created.
3235 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
3236 eval concat_cmds
=\"\
${concat_cmds}$reload_cmds $objlist $last_robj\"
3238 # Set up a command to remove the reloadale object files
3239 # after they are used.
3241 while test $i -lt $k
3244 delfiles
="$delfiles $output_objdir/$save_output-${i}.$objext"
3247 $echo "creating a temporary reloadable object file: $output"
3249 # Loop through the commands generated above and execute them.
3250 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3251 for cmd
in $concat_cmds; do
3254 $run eval "$cmd" ||
exit $?
3259 # Restore the value of output.
3262 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
3263 eval libobjs
=\"\
$libobjs $whole_archive_flag_spec\"
3265 # Expand the library linking commands again to reset the
3266 # value of $libobjs for piecewise linking.
3268 # Do each of the archive commands.
3269 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3270 eval cmds
=\"$archive_expsym_cmds\"
3272 eval cmds
=\"$archive_cmds\"
3275 # Append the command to remove the reloadable object files
3276 # to the just-reset $cmds.
3277 eval cmds
=\"\
$cmds~
$rm $delfiles\"
3279 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3280 for cmd
in $cmds; do
3283 $run eval "$cmd" ||
exit $?
3287 # Restore the uninstalled library and exit
3288 if test "$mode" = relink
&& test "$hardcode_into_libs" = all
; then
3289 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' ||
exit $?
3293 # Create links to the real library.
3294 for linkname
in $linknames; do
3295 if test "$realname" != "$linkname"; then
3296 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
3297 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' ||
exit $?
3301 # If -module or -export-dynamic was specified, set the dlname.
3302 if test "$module" = yes ||
test "$export_dynamic" = yes; then
3303 # On all known operating systems, these are identical.
3310 if test -n "$deplibs"; then
3311 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
3314 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3315 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3318 if test -n "$rpath"; then
3319 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3322 if test -n "$xrpath"; then
3323 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
3326 if test -n "$vinfo"; then
3327 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3330 if test -n "$release"; then
3331 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3336 if test -n "$objs$old_deplibs"; then
3337 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3341 obj
=`$echo "X$output" | $Xsed -e "$lo2o"`
3349 # Delete the old objects.
3350 $run $rm $obj $libobj
3352 # Objects from convenience libraries. This assumes
3353 # single-version convenience libraries. Whenever we create
3354 # different ones for PIC/non-PIC, this we'll have to duplicate
3358 # reload_cmds runs $LD directly, so let us get rid of
3359 # -Wl from whole_archive_flag_spec
3362 if test -n "$convenience"; then
3363 if test -n "$whole_archive_flag_spec"; then
3364 eval reload_conv_objs
=\"\
$reload_objs $whole_archive_flag_spec\"
3366 gentop
="$output_objdir/${obj}x"
3367 $show "${rm}r $gentop"
3368 $run ${rm}r
"$gentop"
3369 $show "$mkdir $gentop"
3370 $run $mkdir "$gentop"
3372 if test $status -ne 0 && test ! -d "$gentop"; then
3375 generated
="$generated $gentop"
3377 for xlib
in $convenience; do
3378 # Extract the objects.
3380 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
3381 *) xabs
=`pwd`"/$xlib" ;;
3383 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3384 xdir
="$gentop/$xlib"
3386 $show "${rm}r $xdir"
3388 $show "$mkdir $xdir"
3391 if test $status -ne 0 && test ! -d "$xdir"; then
3394 $show "(cd $xdir && $AR x $xabs)"
3395 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
3397 reload_conv_objs
="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3402 # Create the old-style object.
3403 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
3406 eval cmds
=\"$reload_cmds\"
3407 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3408 for cmd
in $cmds; do
3411 $run eval "$cmd" ||
exit $?
3415 # Exit if we aren't doing a library object file.
3416 if test -z "$libobj"; then
3417 if test -n "$gentop"; then
3418 $show "${rm}r $gentop"
3425 if test "$build_libtool_libs" != yes; then
3426 if test -n "$gentop"; then
3427 $show "${rm}r $gentop"
3431 # Create an invalid libtool object if no PIC, so that we don't
3432 # accidentally link it into a program.
3433 # $show "echo timestamp > $libobj"
3434 # $run eval "echo timestamp > $libobj" || exit $?
3438 if test -n "$pic_flag" ||
test "$pic_mode" != default
; then
3439 # Only do commands if we really have different PIC objects.
3440 reload_objs
="$libobjs $reload_conv_objs"
3442 eval cmds
=\"$reload_cmds\"
3443 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
3444 for cmd
in $cmds; do
3447 $run eval "$cmd" ||
exit $?
3451 # # Just create a symlink.
3454 # xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3455 # if test "X$xdir" = "X$libobj"; then
3460 # baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3461 # oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3462 # $show "(cd $xdir && $LN_S $oldobj $baseobj)"
3463 # $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
3466 if test -n "$gentop"; then
3467 $show "${rm}r $gentop"
3476 *cygwin
*) output
=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
3478 if test -n "$vinfo"; then
3479 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3482 if test -n "$release"; then
3483 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3486 if test "$preload" = yes; then
3487 if test "$dlopen_support" = unknown
&& test "$dlopen_self" = unknown
&&
3488 test "$dlopen_self_static" = unknown
; then
3489 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3493 compile_command
="$compile_command $compile_deplibs"
3494 finalize_command
="$finalize_command $finalize_deplibs"
3496 if test -n "$rpath$xrpath"; then
3497 # If the user specified any rpath flags, then add them.
3498 for libdir
in $rpath $xrpath; do
3499 # This is the magic to use -rpath.
3500 case "$finalize_rpath " in
3502 *) finalize_rpath
="$finalize_rpath $libdir" ;;
3507 # Now hardcode the library paths
3510 for libdir
in $compile_rpath $finalize_rpath; do
3511 if test -n "$hardcode_libdir_flag_spec"; then
3512 if test -n "$hardcode_libdir_separator"; then
3513 if test -z "$hardcode_libdirs"; then
3514 hardcode_libdirs
="$libdir"
3516 # Just accumulate the unique libdirs.
3517 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3518 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3521 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3526 eval flag
=\"$hardcode_libdir_flag_spec\"
3527 rpath
="$rpath $flag"
3529 elif test -n "$runpath_var"; then
3530 case "$perm_rpath " in
3532 *) perm_rpath
="$perm_rpath $libdir" ;;
3536 *-*-cygwin* |
*-*-mingw* |
*-*-pw32* |
*-*-os2*)
3537 case :$dllsearchpath: in
3539 *) dllsearchpath
="$dllsearchpath:$libdir";;
3544 # Substitute the hardcoded libdirs into the rpath.
3545 if test -n "$hardcode_libdir_separator" &&
3546 test -n "$hardcode_libdirs"; then
3547 libdir
="$hardcode_libdirs"
3548 eval rpath
=\" $hardcode_libdir_flag_spec\"
3550 compile_rpath
="$rpath"
3554 for libdir
in $finalize_rpath; do
3555 if test -n "$hardcode_libdir_flag_spec"; then
3556 if test -n "$hardcode_libdir_separator"; then
3557 if test -z "$hardcode_libdirs"; then
3558 hardcode_libdirs
="$libdir"
3560 # Just accumulate the unique libdirs.
3561 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3562 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3565 hardcode_libdirs
="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3570 eval flag
=\"$hardcode_libdir_flag_spec\"
3571 rpath
="$rpath $flag"
3573 elif test -n "$runpath_var"; then
3574 case "$finalize_perm_rpath " in
3576 *) finalize_perm_rpath
="$finalize_perm_rpath $libdir" ;;
3580 # Substitute the hardcoded libdirs into the rpath.
3581 if test -n "$hardcode_libdir_separator" &&
3582 test -n "$hardcode_libdirs"; then
3583 libdir
="$hardcode_libdirs"
3584 eval rpath
=\" $hardcode_libdir_flag_spec\"
3586 finalize_rpath
="$rpath"
3589 if test -n "$dlfiles$dlprefiles" ||
test "$dlself" != no
; then
3590 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3591 dlsyms
="${outputname}S.c"
3593 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3597 if test -n "$dlsyms"; then
3601 # Discover the nlist of each of the dlfiles.
3602 nlist
="$output_objdir/${outputname}.nm"
3604 $show "$rm $nlist ${nlist}S ${nlist}T"
3605 $run $rm "$nlist" "${nlist}S" "${nlist}T"
3607 # Parse the name list into a source file.
3608 $show "creating $output_objdir/$dlsyms"
3610 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3611 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3612 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3618 /* Prevent the only kind of declaration conflicts we can make. */
3619 #define lt_preloaded_symbols some_other_symbol
3621 /* External symbol declarations for the compiler. */\
3624 if test "$dlself" = yes; then
3625 $show "generating symbol list for \`$output'"
3627 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3629 # Add our own program objects to the symbol list.
3630 progfiles
="$objs$old_deplibs"
3631 for arg
in $progfiles; do
3632 $show "extracting global C symbols from \`$arg'"
3633 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3636 if test -n "$exclude_expsyms"; then
3637 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3638 $run eval '$mv "$nlist"T "$nlist"'
3641 if test -n "$export_symbols_regex"; then
3642 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3643 $run eval '$mv "$nlist"T "$nlist"'
3646 # Prepare the list of exported symbols
3647 if test -z "$export_symbols"; then
3648 export_symbols
="$output_objdir/$output.exp"
3649 $run $rm $export_symbols
3650 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3652 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3653 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3654 $run eval 'mv "$nlist"T "$nlist"'
3658 for arg
in $dlprefiles; do
3659 $show "extracting global C symbols from \`$arg'"
3660 name
=`echo "$arg" | sed -e 's%^.*/%%'`
3661 $run eval 'echo ": $name " >> "$nlist"'
3662 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3665 if test -z "$run"; then
3666 # Make sure we have at least an empty file.
3667 test -f "$nlist" ||
: > "$nlist"
3669 if test -n "$exclude_expsyms"; then
3670 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3671 $mv "$nlist"T
"$nlist"
3674 # Try sorting and uniquifying the output.
3675 if grep -v "^: " < "$nlist" |
sort +2 |
uniq > "$nlist"S
; then
3678 grep -v "^: " < "$nlist" > "$nlist"S
3681 if test -f "$nlist"S
; then
3682 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3684 echo '/* NONE */' >> "$output_objdir/$dlsyms"
3687 $echo >> "$output_objdir/$dlsyms" "\
3689 #undef lt_preloaded_symbols
3691 #if defined (__STDC__) && __STDC__
3692 # define lt_ptr_t void *
3694 # define lt_ptr_t char *
3698 /* The mapping between symbol names and symbols. */
3703 lt_preloaded_symbols[] =
3707 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
3708 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
3709 < "$nlist" >> "$output_objdir/$dlsyms"
3711 $echo >> "$output_objdir/$dlsyms" "\
3715 /* This works around a problem in FreeBSD linker */
3716 #ifdef FREEBSD_WORKAROUND
3717 static const void *lt_preloaded_setup() {
3718 return lt_preloaded_symbols;
3728 pic_flag_for_symtable
=
3730 # compiling the symbol table file with pic_flag works around
3731 # a FreeBSD bug that causes programs to crash when -lm is
3732 # linked before any other PIC object. But we must not use
3733 # pic_flag when linking with -static. The problem exists in
3734 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3735 *-*-freebsd2*|
*-*-freebsd3.0
*|
*-*-freebsdelf3.0
*)
3736 case "$compile_command " in
3738 *) pic_flag_for_symtable
=" $pic_flag -DFREEBSD_WORKAROUND";;
3741 case "$compile_command " in
3743 *) pic_flag_for_symtable
=" $pic_flag";;
3747 # Now compile the dynamic symbol file.
3748 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3749 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' ||
exit $?
3751 # Clean up the generated files.
3752 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3753 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3755 # Transform the symbol file into the correct name.
3756 compile_command
=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3757 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3760 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3765 # We keep going just in case the user didn't refer to
3766 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3767 # really was required.
3769 # Nullify the symbol file.
3770 compile_command
=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3771 finalize_command
=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3774 # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
3775 # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
3776 # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
3777 # This does not apply on AIX for ia64, which uses a SysV linker.
3780 *-*-aix4* |
*-*-aix5*)
3781 compile_command
=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
3782 finalize_command
=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
3785 if test $need_relink = no ||
test "$build_libtool_libs" != yes; then
3786 # Replace the output file specification.
3787 compile_command
=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3788 link_command
="$compile_command$compile_rpath"
3790 # We have no uninstalled library dependencies, so finalize right now.
3791 $show "$link_command"
3792 $run eval "$link_command"
3795 # Delete the generated files.
3796 if test -n "$dlsyms"; then
3797 $show "$rm $output_objdir/${outputname}S.${objext}"
3798 $run $rm "$output_objdir/${outputname}S.${objext}"
3804 if test -n "$shlibpath_var"; then
3805 # We should set the shlibpath_var
3807 for dir
in $temp_rpath; do
3809 [\\/]* |
[A-Za-z
]:[\\/]*)
3814 # Relative path: add a thisdir entry.
3815 rpath
="$rpath\$thisdir/$dir:"
3822 if test -n "$compile_shlibpath$finalize_shlibpath"; then
3823 compile_command
="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3825 if test -n "$finalize_shlibpath"; then
3826 finalize_command
="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3831 if test -n "$runpath_var"; then
3832 if test -n "$perm_rpath"; then
3833 # We should set the runpath_var.
3835 for dir
in $perm_rpath; do
3838 compile_var
="$runpath_var=\"$rpath\$$runpath_var\" "
3840 if test -n "$finalize_perm_rpath"; then
3841 # We should set the runpath_var.
3843 for dir
in $finalize_perm_rpath; do
3846 finalize_var
="$runpath_var=\"$rpath\$$runpath_var\" "
3850 if test "$no_install" = yes; then
3851 # We don't need to create a wrapper script.
3852 link_command
="$compile_var$compile_command$compile_rpath"
3853 # Replace the output file specification.
3854 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3855 # Delete the old output file.
3857 # Link the executable and exit
3858 $show "$link_command"
3859 $run eval "$link_command" ||
exit $?
3863 if test "$hardcode_action" = relink
; then
3864 # Fast installation is not supported
3865 link_command
="$compile_var$compile_command$compile_rpath"
3866 relink_command
="$finalize_var$finalize_command$finalize_rpath"
3868 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3869 $echo "$modename: \`$output' will be relinked during installation" 1>&2
3871 if test "$fast_install" != no
; then
3872 link_command
="$finalize_var$compile_command$finalize_rpath"
3873 if test "$fast_install" = yes; then
3874 relink_command
=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3876 # fast_install is set to needless
3880 link_command
="$compile_var$compile_command$compile_rpath"
3881 relink_command
="$finalize_var$finalize_command$finalize_rpath"
3885 # Replace the output file specification.
3886 link_command
=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3888 # Delete the old output files.
3889 $run $rm $output $output_objdir/$outputname $output_objdir/lt-
$outputname
3891 $show "$link_command"
3892 $run eval "$link_command" ||
exit $?
3894 # Now create the wrapper script.
3895 $show "creating $output"
3897 # Quote the relink command for shipping.
3898 if test -n "$relink_command"; then
3899 # Preserve any variables that may affect compiler behavior
3900 for var
in $variables_saved_for_relink; do
3901 if eval test -z \"\
${$var+set}\"; then
3902 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3903 elif eval var_value
=\$
$var; test -z "$var_value"; then
3904 relink_command
="$var=; export $var; $relink_command"
3906 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3907 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
3910 relink_command
="cd `pwd`; $relink_command"
3911 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3914 # Quote $echo for shipping.
3915 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3917 [\\/]* |
[A-Za-z
]:[\\/]*) qecho
="$SHELL $0 --fallback-echo";;
3918 *) qecho
="$SHELL `pwd`/$0 --fallback-echo";;
3920 qecho
=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3922 qecho
=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3925 # Only actually do things if our run command is non-null.
3926 if test -z "$run"; then
3927 # win32 will think the script is a binary if it has
3928 # a .exe suffix, so we strip it off here.
3930 *.exe
) output
=`echo $output|sed 's,.exe$,,'` ;;
3932 # test for cygwin because mv fails w/o .exe extensions
3934 *cygwin
*) exeext
=.exe
;;
3938 trap "$rm $output; exit 1" 1 2 15
3943 # $output - temporary wrapper script for $objdir/$outputname
3944 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3946 # The $output program cannot be directly executed until all the libtool
3947 # libraries that it depends on are installed.
3949 # This wrapper script should never be moved out of the build directory.
3950 # If it is, it will not operate correctly.
3952 # Sed substitution that helps us do robust quoting. It backslashifies
3953 # metacharacters that are still active within double-quoted strings.
3954 Xsed='sed -e 1s/^X//'
3955 sed_quote_subst='$sed_quote_subst'
3957 # The HP-UX ksh and POSIX shell print the target directory to stdout
3959 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3961 relink_command=\"$relink_command\"
3963 # This environment variable determines our operation mode.
3964 if test \"\$libtool_install_magic\" = \"$magic\"; then
3965 # install mode needs the following variable:
3966 uninst_deplibs='$uninst_deplibs'
3968 # When we are sourced in execute mode, \$file and \$echo are already set.
3969 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3972 # Make sure echo works.
3973 if test \"X\$1\" = X--no-reexec; then
3974 # Discard the --no-reexec flag, and continue.
3976 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
3977 # Yippee, \$echo works!
3980 # Restart under the correct shell, and then maybe \$echo will work.
3981 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
3987 # Find the directory that this script lives in.
3988 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3989 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3991 # Follow symbolic links until we get to the real thisdir.
3992 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3993 while test -n \"\$file\"; do
3994 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3996 # If there was a directory component, then change thisdir.
3997 if test \"x\$destdir\" != \"x\$file\"; then
3998 case \"\$destdir\" in
3999 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4000 *) thisdir=\"\$thisdir/\$destdir\" ;;
4004 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
4005 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
4008 # Try to get the absolute directory name.
4009 absdir=\`cd \"\$thisdir\" && pwd\`
4010 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4013 if test "$fast_install" = yes; then
4015 program=lt-'$outputname'$exeext
4016 progdir=\"\$thisdir/$objdir\"
4018 if test ! -f \"\$progdir/\$program\" || \\
4019 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
4020 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4022 file=\"\$\$-\$program\"
4024 if test ! -d \"\$progdir\"; then
4025 $mkdir \"\$progdir\"
4027 $rm \"\$progdir/\$file\"
4032 # relink executable if necessary
4033 if test -n \"\$relink_command\"; then
4034 if (eval \$relink_command); then :
4036 $rm \"\$progdir/\$file\"
4041 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4042 { $rm \"\$progdir/\$program\";
4043 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4044 $rm \"\$progdir/\$file\"
4048 program='$outputname'
4049 progdir=\"\$thisdir/$objdir\"
4055 if test -f \"\$progdir/\$program\"; then"
4057 # Export our shlibpath_var if we have one.
4058 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4060 # Add our own library path to $shlibpath_var
4061 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4063 # Some systems cannot cope with colon-terminated $shlibpath_var
4064 # The second colon is a workaround for a bug in BeOS R4 sed
4065 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
4067 export $shlibpath_var
4071 # fixup the dll searchpath if we need to.
4072 if test -n "$dllsearchpath"; then
4074 # Add the dll search path components to the executable PATH
4075 PATH=$dllsearchpath:\$PATH
4080 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4081 # Run the actual program with our arguments.
4084 # win32 systems need to use the prog path for dll
4086 *-*-cygwin* |
*-*-pw32*)
4088 exec \$progdir/\$program \${1+\"\$@\"}
4092 # Backslashes separate directories on plain windows
4093 *-*-mingw |
*-*-os2*)
4095 exec \$progdir\\\\\$program \${1+\"\$@\"}
4101 # Export the path to the program.
4102 PATH=\"\$progdir:\$PATH\"
4105 exec \$program \${1+\"\$@\"}
4110 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
4114 # The program doesn't exist.
4115 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
4116 \$echo \"This script is just a wrapper for \$program.\" 1>&2
4117 echo \"See the $PACKAGE documentation for more information.\" 1>&2
4128 # See if we need to build an old-fashioned archive.
4129 for oldlib
in $oldlibs; do
4131 if test "$build_libtool_libs" = convenience
; then
4132 oldobjs
="$libobjs_save"
4133 addlibs
="$convenience"
4134 build_libtool_libs
=no
4136 if test "$build_libtool_libs" = module
; then
4137 oldobjs
="$libobjs_save"
4138 build_libtool_libs
=no
4140 oldobjs
="$objs$old_deplibs $non_pic_objects"
4142 addlibs
="$old_convenience"
4145 if test -n "$addlibs"; then
4146 gentop
="$output_objdir/${outputname}x"
4147 $show "${rm}r $gentop"
4148 $run ${rm}r
"$gentop"
4149 $show "$mkdir $gentop"
4150 $run $mkdir "$gentop"
4152 if test $status -ne 0 && test ! -d "$gentop"; then
4155 generated
="$generated $gentop"
4157 # Add in members from convenience archives.
4158 for xlib
in $addlibs; do
4159 # Extract the objects.
4161 [\\/]* |
[A-Za-z
]:[\\/]*) xabs
="$xlib" ;;
4162 *) xabs
=`pwd`"/$xlib" ;;
4164 xlib
=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4165 xdir
="$gentop/$xlib"
4167 $show "${rm}r $xdir"
4169 $show "$mkdir $xdir"
4172 if test $status -ne 0 && test ! -d "$xdir"; then
4175 $show "(cd $xdir && $AR x $xabs)"
4176 $run eval "(cd \$xdir && $AR x \$xabs)" ||
exit $?
4178 oldobjs
="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP`
4182 # Do each command in the archive commands.
4183 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
4184 eval cmds
=\"$old_archive_from_new_cmds\"
4186 # # Ensure that we have .o objects in place in case we decided
4187 # # not to build a shared library, and have fallen back to building
4188 # # static libs even though --disable-static was passed!
4189 # for oldobj in $oldobjs; do
4190 # if test ! -f $oldobj; then
4191 # xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
4192 # if test "X$xdir" = "X$oldobj"; then
4197 # baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
4198 # obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
4199 # $show "(cd $xdir && ${LN_S} $obj $baseobj)"
4200 # $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
4204 compiler_flags
="$compiler_flags $add_flags"
4205 eval cmds
=\"$old_archive_cmds\"
4207 if len
=`expr "X$cmds" : ".*"` &&
4208 test $len -le $max_cmd_len; then
4211 # the command line is too long to link in one step, link in parts
4212 $echo "using piecewise archive linking..."
4217 save_oldobjs
=$oldobjs
4218 for obj
in $save_oldobjs
4220 oldobjs
="$objlist $obj"
4221 objlist
="$objlist $obj"
4222 eval test_cmds
=\"$old_archive_cmds\"
4223 if len
=`expr "X$test_cmds" : ".*"` &&
4224 test $len -le $max_cmd_len; then
4227 # the above command should be used before it gets too long
4229 test -z "$concat_cmds" || concat_cmds
=$concat_cmds~
4230 eval concat_cmds
=\"\
${concat_cmds}$old_archive_cmds\"
4236 eval cmds
=\"\
$concat_cmds~
$old_archive_cmds\"
4239 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4240 for cmd
in $cmds; do
4243 $run eval "$cmd" ||
exit $?
4248 if test -n "$generated"; then
4249 $show "${rm}r$generated"
4250 $run ${rm}r
$generated
4253 # Now create the libtool archive.
4257 test "$build_old_libs" = yes && old_library
="$libname.$libext"
4258 $show "creating $output"
4260 # Preserve any variables that may affect compiler behavior
4261 for var
in $variables_saved_for_relink; do
4262 if eval test -z \"\
${$var+set}\"; then
4263 relink_command
="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4264 elif eval var_value
=\$
$var; test -z "$var_value"; then
4265 relink_command
="$var=; export $var; $relink_command"
4267 var_value
=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4268 relink_command
="$var=\"$var_value\"; export $var; $relink_command"
4271 # Quote the link command for shipping.
4272 relink_command
="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
4273 relink_command
=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4275 # Only create the output if not a dry run.
4276 if test -z "$run"; then
4277 for installed
in no
yes; do
4278 if test "$installed" = yes; then
4279 if test -z "$install_libdir"; then
4282 output
="$output_objdir/$outputname"i
4283 # Replace all uninstalled libtool libraries with the installed ones
4285 for deplib
in $dependency_libs; do
4288 name
=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
4289 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
4290 if test -z "$libdir"; then
4291 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
4294 newdependency_libs
="$newdependency_libs $libdir/$name"
4296 *) newdependency_libs
="$newdependency_libs $deplib" ;;
4299 dependency_libs
="$newdependency_libs"
4301 for lib
in $dlfiles; do
4302 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4303 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4304 if test -z "$libdir"; then
4305 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4308 newdlfiles
="$newdlfiles $libdir/$name"
4310 dlfiles
="$newdlfiles"
4312 for lib
in $dlprefiles; do
4313 name
=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4314 eval libdir
=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4315 if test -z "$libdir"; then
4316 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4319 newdlprefiles
="$newdlprefiles $libdir/$name"
4321 dlprefiles
="$newdlprefiles"
4324 # place dlname in correct position for cygwin
4326 case $host,$output,$installed,$module,$dlname in
4327 *cygwin
*,*lai
,yes,no
,*.dll
) tdlname
=..
/bin
/$dlname ;;
4330 # $outputname - a libtool library file
4331 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4333 # Please DO NOT delete this file!
4334 # It is necessary for linking the library.
4336 # The name that we can dlopen(3).
4339 # Names of this library.
4340 library_names='$library_names'
4342 # The name of the static archive.
4343 old_library='$old_library'
4345 # Libraries that this one depends upon.
4346 dependency_libs='$dependency_libs'
4348 # Version information for $libname.
4353 # Is this an already installed library?
4354 installed=$installed
4356 # Files to dlopen/dlpreopen
4358 dlpreopen='$dlprefiles'
4360 # Directory that this library needs to be installed in:
4361 libdir='$install_libdir'"
4362 if test $hardcode_into_libs = all
&&
4363 test "$installed" = no
&& test $need_relink = yes; then
4365 relink_command=\"$relink_command\""
4370 # Do a symbolic link so that the libtool archive can be found in
4371 # LD_LIBRARY_PATH before the program is installed.
4372 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4373 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' ||
exit $?
4379 # libtool install mode
4381 modename
="$modename: install"
4383 # There may be an optional sh(1) argument at the beginning of
4384 # install_prog (especially on Windows NT).
4385 if test "$nonopt" = "$SHELL" ||
test "$nonopt" = /bin
/sh ||
4386 # Allow the use of GNU shtool's install command.
4387 $echo "X$nonopt" |
$Xsed |
grep shtool
> /dev
/null
; then
4388 # Aesthetically quote it.
4389 arg
=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4391 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4395 install_prog
="$arg "
4403 # The real first argument should be the name of the installation program.
4404 # Aesthetically quote it.
4405 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4407 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4411 install_prog
="$install_prog$arg"
4413 # We need to accept at least all the BSD install flags.
4423 if test -n "$dest"; then
4424 files
="$files $dest"
4442 # If the previous option needed an argument, then skip it.
4443 if test -n "$prev"; then
4452 # Aesthetically quote the argument.
4453 arg
=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4455 *[\
[\~\
#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4459 install_prog
="$install_prog $arg"
4462 if test -z "$install_prog"; then
4463 $echo "$modename: you must specify an install program" 1>&2
4468 if test -n "$prev"; then
4469 $echo "$modename: the \`$prev' option requires an argument" 1>&2
4474 if test -z "$files"; then
4475 if test -z "$dest"; then
4476 $echo "$modename: no file or destination specified" 1>&2
4478 $echo "$modename: you must specify a destination" 1>&2
4484 # Strip any trailing slash from the destination.
4485 dest
=`$echo "X$dest" | $Xsed -e 's%/$%%'`
4487 # Check to see that the destination is a directory.
4488 test -d "$dest" && isdir
=yes
4489 if test "$isdir" = yes; then
4493 destdir
=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
4494 test "X$destdir" = "X$dest" && destdir
=.
4495 destname
=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
4497 # Not a directory, so check to see that there is only one file specified.
4499 if test $# -gt 2; then
4500 $echo "$modename: \`$dest' is not a directory" 1>&2
4506 [\\/]* |
[A-Za-z
]:[\\/]*) ;;
4508 for file in $files; do
4512 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4521 # This variable tells wrapper scripts just to set variables rather
4522 # than running their programs.
4523 libtool_install_magic
="$magic"
4528 for file in $files; do
4530 # Do each installation.
4533 # Do the static libraries later.
4534 staticlibs
="$staticlibs $file"
4538 # Check to see that this really is a libtool archive.
4539 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
4541 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4549 # If there is no directory component, then add one.
4551 */* |
*\\*) .
$file ;;
4555 # Add the libdir to current_libdirs if it is the destination.
4556 if test "X$destdir" = "X$libdir"; then
4557 case "$current_libdirs " in
4559 *) current_libdirs
="$current_libdirs $libdir" ;;
4562 # Note the libdir as a future libdir.
4563 case "$future_libdirs " in
4565 *) future_libdirs
="$future_libdirs $libdir" ;;
4569 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
4570 test "X$dir" = "X$file/" && dir
=
4573 if test "$hardcode_into_libs" = all
&& test -n "$relink_command"; then
4574 $echo "$modename: warning: relinking \`$file'" 1>&2
4575 $show "$relink_command"
4576 if $run eval "$relink_command"; then :
4578 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4583 # See the names of the shared library.
4584 set dummy
$library_names
4585 if test -n "$2"; then
4591 test "$hardcode_into_libs" = all
&& test -n "$relink_command" && srcname
="$realname"T
4593 # Install the shared library and build the symlinks.
4594 $show "$install_prog $dir/$srcname $destdir/$realname"
4595 $run eval "$install_prog $dir/$srcname $destdir/$realname" ||
exit $?
4596 if test -n "$stripme" && test -n "$striplib"; then
4597 $show "$striplib $destdir/$realname"
4598 $run eval "$striplib $destdir/$realname" ||
exit $?
4601 if test $# -gt 0; then
4602 # Delete the old symlinks, and create new ones.
4605 if test "$linkname" != "$realname"; then
4606 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4607 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4612 # Do each command in the postinstall commands.
4613 lib
="$destdir/$realname"
4614 eval cmds
=\"$postinstall_cmds\"
4615 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4616 for cmd
in $cmds; do
4619 $run eval "$cmd" ||
exit $?
4624 # Install the pseudo-library for information purposes.
4625 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4626 instname
="$dir/$name"i
4627 $show "$install_prog $instname $destdir/$name"
4628 $run eval "$install_prog $instname $destdir/$name" ||
exit $?
4630 # Maybe install the static library, too.
4631 test -n "$old_library" && staticlibs
="$staticlibs $dir/$old_library"
4635 # Install (i.e. copy) a libtool object.
4637 # Figure out destination file name, if it wasn't already specified.
4638 if test -n "$destname"; then
4639 destfile
="$destdir/$destname"
4641 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4642 destfile
="$destdir/$destfile"
4645 # Deduce the name of the destination old-style object file.
4648 staticdest
=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4651 staticdest
="$destfile"
4655 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4661 # Install the libtool object if requested.
4662 if test -n "$destfile"; then
4663 $show "$install_prog $file $destfile"
4664 $run eval "$install_prog $file $destfile" ||
exit $?
4667 # Install the old object if enabled.
4668 if test "$build_old_libs" = yes; then
4669 # Deduce the name of the old-style object file.
4670 staticobj
=`$echo "X$file" | $Xsed -e "$lo2o"`
4672 $show "$install_prog $staticobj $staticdest"
4673 $run eval "$install_prog \$staticobj \$staticdest" ||
exit $?
4679 # Figure out destination file name, if it wasn't already specified.
4680 if test -n "$destname"; then
4681 destfile
="$destdir/$destname"
4683 destfile
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4684 destfile
="$destdir/$destfile"
4687 # Do a test to see if this is really a libtool program.
4688 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
4692 # If there is no directory component, then add one.
4694 */* |
*\\*) .
$file ;;
4698 # Check the variables that should have been set.
4699 if test -z "$uninst_deplibs"; then
4700 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4705 for lib
in $uninst_deplibs; do
4706 # Check to see that each library is installed.
4708 if test -f "$lib"; then
4709 # If there is no directory component, then add one.
4711 */* |
*\\*) .
$lib ;;
4715 libfile
="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4716 if test -n "$libdir" && test ! -f "$libfile"; then
4717 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4723 # If there is no directory component, then add one.
4725 */* |
*\\*) .
$file ;;
4730 if test "$fast_install" = no
&& test -n "$relink_command"; then
4731 if test "$finalize" = yes && test -z "$run"; then
4733 test -n "$TMPDIR" && tmpdir
="$TMPDIR"
4734 tmpdir
="$tmpdir/libtool-$$"
4735 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4737 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4740 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4741 outputname
="$tmpdir/$file"
4742 # Replace the output file specification.
4743 relink_command
=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4745 $show "$relink_command"
4746 if $run eval "$relink_command"; then :
4748 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4754 $echo "$modename: warning: cannot relink \`$file'" 1>&2
4757 # Install the binary that we compiled earlier.
4758 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4763 # remove .exe since cygwin /usr/bin/install will append another
4765 case $install_prog,$host in
4766 */usr
/bin
/install*,*cygwin
*)
4767 case $file:$destfile in
4772 destfile
=$destfile.exe
4775 destfile
=`echo $destfile | sed -e 's,.exe$,,'`
4781 $show "$install_prog$stripme $file $destfile"
4782 $run eval "$install_prog\$stripme \$file \$destfile" ||
exit $?
4783 test -n "$outputname" && ${rm}r
"$tmpdir"
4788 for file in $staticlibs; do
4789 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4791 # Set up the ranlib parameters.
4792 oldlib
="$destdir/$name"
4794 $show "$install_prog $file $oldlib"
4795 $run eval "$install_prog \$file \$oldlib" ||
exit $?
4797 if test -n "$stripme" && test -n "$striplib"; then
4798 $show "$old_striplib $oldlib"
4799 $run eval "$old_striplib $oldlib" ||
exit $?
4802 # Do each command in the postinstall commands.
4803 eval cmds
=\"$old_postinstall_cmds\"
4804 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4805 for cmd
in $cmds; do
4808 $run eval "$cmd" ||
exit $?
4813 if test -n "$future_libdirs"; then
4814 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4817 if test -n "$current_libdirs"; then
4818 # Maybe just do a dry run.
4819 test -n "$run" && current_libdirs
=" -n$current_libdirs"
4820 exec $SHELL $0 --finish$current_libdirs
4827 # libtool finish mode
4829 modename
="$modename: finish"
4833 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4836 libdirs
="$libdirs $dir"
4839 for libdir
in $libdirs; do
4840 if test -n "$finish_cmds"; then
4841 # Do each command in the finish commands.
4842 eval cmds
=\"$finish_cmds\"
4843 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
4844 for cmd
in $cmds; do
4847 $run eval "$cmd" || admincmds
="$admincmds
4852 if test -n "$finish_eval"; then
4853 # Do the single finish_eval.
4854 eval cmds
=\"$finish_eval\"
4855 $run eval "$cmds" || admincmds
="$admincmds
4861 # Exit here if they wanted silent mode.
4864 echo "----------------------------------------------------------------------"
4865 echo "Libraries have been installed in:"
4866 for libdir
in $libdirs; do
4870 echo "If you ever happen to want to link against installed libraries"
4871 echo "in a given directory, LIBDIR, you must either use libtool, and"
4872 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
4873 echo "flag during linking and do at least one of the following:"
4874 if test -n "$shlibpath_var"; then
4875 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4876 echo " during execution"
4878 if test -n "$runpath_var"; then
4879 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4880 echo " during linking"
4882 if test -n "$hardcode_libdir_flag_spec"; then
4884 eval flag
=\"$hardcode_libdir_flag_spec\"
4886 echo " - use the \`$flag' linker flag"
4888 if test -n "$admincmds"; then
4889 echo " - have your system administrator run these commands:$admincmds"
4891 if test -f /etc
/ld.so.conf
; then
4892 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4895 echo "See any operating system documentation about shared libraries for"
4896 echo "more information, such as the ld(1) and ld.so(8) manual pages."
4897 echo "----------------------------------------------------------------------"
4901 # libtool execute mode
4903 modename
="$modename: execute"
4905 # The first argument is the command name.
4907 if test -z "$cmd"; then
4908 $echo "$modename: you must specify a COMMAND" 1>&2
4913 # Handle -dlopen flags immediately.
4914 for file in $execute_dlfiles; do
4915 if test ! -f "$file"; then
4916 $echo "$modename: \`$file' is not a file" 1>&2
4924 # Check to see that this really is a libtool archive.
4925 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then :
4927 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4932 # Read the libtool library.
4936 # If there is no directory component, then add one.
4938 */* |
*\\*) .
$file ;;
4942 # Skip this library if it cannot be dlopened.
4943 if test -z "$dlname"; then
4944 # Warn if it was a shared library.
4945 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
4949 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4950 test "X$dir" = "X$file" && dir
=.
4952 if test -f "$dir/$objdir/$dlname"; then
4955 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
4961 # Just add the directory containing the .lo file.
4962 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4963 test "X$dir" = "X$file" && dir
=.
4967 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
4972 # Get the absolute pathname.
4973 absdir
=`cd "$dir" && pwd`
4974 test -n "$absdir" && dir
="$absdir"
4976 # Now add the directory to shlibpath_var.
4977 if eval "test -z \"\$$shlibpath_var\""; then
4978 eval "$shlibpath_var=\"\$dir\""
4980 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
4984 # This variable tells wrapper scripts just to set shlibpath_var
4985 # rather than running their programs.
4986 libtool_execute_magic
="$magic"
4988 # Check if any of the arguments is a wrapper script.
4995 # Do a test to see if this is really a libtool program.
4996 if (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
4997 # If there is no directory component, then add one.
4999 */* |
*\\*) .
$file ;;
5003 # Transform arg to wrapped name.
5004 file="$progdir/$program"
5008 # Quote arguments (to preserve shell metacharacters).
5009 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
5010 args
="$args \"$file\""
5013 if test -z "$run"; then
5014 if test -n "$shlibpath_var"; then
5015 # Export the shlibpath_var.
5016 eval "export $shlibpath_var"
5019 # Restore saved enviroment variables
5020 if test "${save_LC_ALL+set}" = set; then
5021 LC_ALL
="$save_LC_ALL"; export LC_ALL
5023 if test "${save_LANG+set}" = set; then
5024 LANG
="$save_LANG"; export LANG
5027 # Now actually exec the command.
5028 eval "exec \$cmd$args"
5030 $echo "$modename: cannot exec \$cmd$args"
5033 # Display what would be done.
5034 if test -n "$shlibpath_var"; then
5035 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
5036 $echo "export $shlibpath_var"
5043 # libtool clean and uninstall mode
5045 modename
="$modename: $mode"
5049 # This variable tells wrapper scripts just to set variables rather
5050 # than running their programs.
5051 libtool_install_magic
="$magic"
5056 -*) rm="$rm $arg" ;;
5057 *) files
="$files $arg" ;;
5061 if test -z "$rm"; then
5062 $echo "$modename: you must specify an RM program" 1>&2
5069 for file in $files; do
5070 dir
=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5071 if test "X$dir" = "X$file"; then
5075 objdir
="$dir/$objdir"
5077 name
=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5078 test $mode = uninstall
&& objdir
="$dir"
5080 # Remember objdir for removal later, being careful to avoid duplicates
5081 if test $mode = clean
; then
5084 *) rmdirs
="$rmdirs $objdir" ;;
5092 # Possibly a libtool archive, so verify it.
5093 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5096 # Delete the libtool libraries and symlinks.
5097 for n
in $library_names; do
5098 rmfiles
="$rmfiles $objdir/$n"
5100 test -n "$old_library" && rmfiles
="$rmfiles $objdir/$old_library"
5101 test $mode = clean
&& rmfiles
="$rmfiles $objdir/$name $objdir/${name}i"
5103 if test $mode = uninstall
; then
5104 if test -n "$library_names"; then
5105 # Do each command in the postuninstall commands.
5106 eval cmds
=\"$postuninstall_cmds\"
5107 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
5108 for cmd
in $cmds; do
5116 if test -n "$old_library"; then
5117 # Do each command in the old_postuninstall commands.
5118 eval cmds
=\"$old_postuninstall_cmds\"
5119 IFS
="${IFS= }"; save_ifs
="$IFS"; IFS
='~'
5120 for cmd
in $cmds; do
5127 # FIXME: should reinstall the best remaining shared library.
5133 # Possibly a libtool object, so verify it.
5134 if (sed -e '2q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5139 # Add PIC object to the list of files to remove.
5140 if test -n "$pic_object" \
5141 && test "$pic_object" != none
; then
5142 rmfiles
="$rmfiles $dir/$pic_object"
5145 # Add non-PIC object to the list of files to remove.
5146 if test -n "$non_pic_object" \
5147 && test "$non_pic_object" != none
; then
5148 rmfiles
="$rmfiles $dir/$non_pic_object"
5154 # Do a test to see if this is a libtool program.
5155 if test $mode = clean
&&
5156 (sed -e '4q' $file |
egrep "^# Generated by .*$PACKAGE") >/dev
/null
2>&1; then
5160 rmfiles
="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
5161 if test "$fast_install" = yes && test -n "$relink_command"; then
5162 rmfiles
="$rmfiles $objdir/lt-$name"
5167 $show "$rm $rmfiles"
5171 # Try to remove the ${objdir}s in the directories where we deleted files
5172 for dir
in $rmdirs; do
5173 if test -d "$dir"; then
5175 $run rmdir $dir >/dev
/null
2>&1
5183 $echo "$modename: you must specify a MODE" 1>&2
5184 $echo "$generic_help" 1>&2
5189 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5190 $echo "$generic_help" 1>&2
5192 fi # test -z "$show_help"
5194 # We need to display help for each of the modes.
5197 "Usage: $modename [OPTION]... [MODE-ARG]...
5199 Provide generalized library-building support services.
5201 --config show all configuration variables
5202 --debug enable verbose shell tracing
5203 -n, --dry-run display commands without modifying any files
5204 --features display basic configuration information and exit
5205 --finish same as \`--mode=finish'
5206 --help display this help message and exit
5207 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
5208 --quiet same as \`--silent'
5209 --silent don't print informational messages
5210 --tag=TAG use configuration variables from tag TAG
5211 --version print version information
5213 MODE must be one of the following:
5215 clean remove files from the build directory
5216 compile compile a source file into a libtool object
5217 execute automatically set library path, then run a program
5218 finish complete the installation of libtool libraries
5219 install install libraries or executables
5220 link create a library or an executable
5221 uninstall remove libraries from an installed directory
5223 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
5224 a more detailed description of MODE."
5230 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
5232 Remove files from the build directory.
5234 RM is the name of the program to use to delete files associated with each FILE
5235 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5238 If FILE is a libtool library, object or program, all the files associated
5239 with it are deleted. Otherwise, only FILE itself is deleted using RM."
5244 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
5246 Compile a source file into a libtool library object.
5248 This mode accepts the following additional options:
5250 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
5251 -static always build a \`.o' file suitable for static linking
5253 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
5254 from the given SOURCEFILE.
5256 The output file name is determined by removing the directory component from
5257 SOURCEFILE, then substituting the C source code suffix \`.c' with the
5258 library object suffix, \`.lo'."
5263 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
5265 Automatically set library path, then run a program.
5267 This mode accepts the following additional options:
5269 -dlopen FILE add the directory containing FILE to the library path
5271 This mode sets the library path environment variable according to \`-dlopen'
5274 If any of the ARGS are libtool executable wrappers, then they are translated
5275 into their corresponding uninstalled binary, and any of their required library
5276 directories are added to the library path.
5278 Then, COMMAND is executed, with ARGS as arguments."
5283 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
5285 Complete the installation of libtool libraries.
5287 Each LIBDIR is a directory that contains libtool libraries.
5289 The commands that this mode executes may require superuser privileges. Use
5290 the \`--dry-run' option if you just want to see what would be executed."
5295 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
5297 Install executables or libraries.
5299 INSTALL-COMMAND is the installation command. The first component should be
5300 either the \`install' or \`cp' program.
5302 The rest of the components are interpreted as arguments to that command (only
5303 BSD-compatible install options are recognized)."
5308 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
5310 Link object files or libraries together to form another library, or to
5311 create an executable program.
5313 LINK-COMMAND is a command using the C compiler that you would use to create
5314 a program from several object files.
5316 The following components of LINK-COMMAND are treated specially:
5318 -all-static do not do any dynamic linking at all
5319 -avoid-version do not add a version suffix if possible
5320 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
5321 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
5322 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
5323 -export-symbols SYMFILE
5324 try to export only the symbols listed in SYMFILE
5325 -export-symbols-regex REGEX
5326 try to export only the symbols matching REGEX
5327 -LLIBDIR search LIBDIR for required installed libraries
5328 -lNAME OUTPUT-FILE requires the installed library libNAME
5329 -module build a library that can dlopened
5330 -no-fast-install disable the fast-install mode
5331 -no-install link a not-installable executable
5332 -no-undefined declare that a library does not refer to external symbols
5333 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
5334 -objectlist FILE Use a list of object files found in FILE to specify objects
5335 -release RELEASE specify package release information
5336 -rpath LIBDIR the created library will eventually be installed in LIBDIR
5337 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
5338 -static do not do any dynamic linking of libtool libraries
5339 -version-info CURRENT[:REVISION[:AGE]]
5340 specify library version info [each variable defaults to 0]
5342 All other options (arguments beginning with \`-') are ignored.
5344 Every other argument is treated as a filename. Files ending in \`.la' are
5345 treated as uninstalled libtool libraries, other files are standard or library
5348 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
5349 only library objects (\`.lo' files) may be specified, and \`-rpath' is
5350 required, except when creating a convenience library.
5352 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
5353 using \`ar' and \`ranlib', or on Windows using \`lib'.
5355 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
5356 is created, otherwise an executable program is created."
5361 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
5363 Remove libraries from an installation directory.
5365 RM is the name of the program to use to delete files associated with each FILE
5366 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
5369 If FILE is a libtool library, all the files associated with it are deleted.
5370 Otherwise, only FILE itself is deleted using RM."
5374 $echo "$modename: invalid operation mode \`$mode'" 1>&2
5381 $echo "Try \`$modename --help' for more information about other modes."
5385 # The TAGs below are defined such that we never get into a situation
5386 # in which we disable both kinds of libraries. Given conflicting
5387 # choices, we go for a static library, that is the most portable,
5388 # since we can't tell whether shared libraries were disabled because
5389 # the user asked for that or because the platform doesn't support
5390 # them. This is particularly important on AIX, because we don't
5391 # support having both static and shared libraries enabled at the same
5392 # time on that platform, so we default to a shared-only configuration.
5393 # If a disable-shared tag is given, we'll fallback to a static-only
5394 # configuration. But we'll never go from static-only to shared-only.
5396 ### BEGIN LIBTOOL TAG CONFIG: disable-shared
5397 build_libtool_libs
=no
5399 ### END LIBTOOL TAG CONFIG: disable-shared
5401 ### BEGIN LIBTOOL TAG CONFIG: disable-static
5402 build_old_libs
=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
5403 ### END LIBTOOL TAG CONFIG: disable-static