summaryrefslogtreecommitdiffstats
path: root/ltmain.sh
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-03-22 06:48:32 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-03-22 06:48:32 +0000
commit82e232360ddbe45a46588e80aa620eb416e2d6ee (patch)
tree263e2343daebef64f5353d3bc54ae4ea676f67bf /ltmain.sh
parentMethod.java (getExceptionTypes): Call getType() to initialize if exception_ty... (diff)
downloadgcc-82e232360ddbe45a46588e80aa620eb416e2d6ee.tar.gz
gcc-82e232360ddbe45a46588e80aa620eb416e2d6ee.tar.bz2
gcc-82e232360ddbe45a46588e80aa620eb416e2d6ee.tar.xz
ltconfig, [...]: Upgraded to libtool 1.4a 1.641.2.198.
* ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh, ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.198. From-SVN: r40731
Diffstat (limited to 'ltmain.sh')
-rw-r--r--ltmain.sh527
1 files changed, 410 insertions, 117 deletions
diff --git a/ltmain.sh b/ltmain.sh
index 2bccd110f03..b81cb285ed6 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,7 +1,8 @@
1# ltmain.sh - Provide generalized library-building support services. 1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun ltconfig. 2# NOTE: Changing this file will not affect anything until you rerun ltconfig.
3# 3#
4# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc. 4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5# Free Software Foundation, Inc.
5# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6# 7#
7# This program is free software; you can redistribute it and/or modify 8# This program is free software; you can redistribute it and/or modify
@@ -55,7 +56,7 @@ modename="$progname"
55PROGRAM=ltmain.sh 56PROGRAM=ltmain.sh
56PACKAGE=libtool 57PACKAGE=libtool
57VERSION=1.4a 58VERSION=1.4a
58TIMESTAMP=" (1.641.2.122 2000/09/30 05:27:52)" 59TIMESTAMP=" (1.641.2.198 2001/03/20 05:47:28)"
59 60
60default_mode= 61default_mode=
61help="Try \`$progname --help' for more information." 62help="Try \`$progname --help' for more information."
@@ -113,22 +114,22 @@ do
113 arg="$1" 114 arg="$1"
114 shift 115 shift
115 116
116 case "$arg" in 117 case $arg in
117 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 118 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
118 *) optarg= ;; 119 *) optarg= ;;
119 esac 120 esac
120 121
121 # If the previous option needs an argument, assign it. 122 # If the previous option needs an argument, assign it.
122 if test -n "$prev"; then 123 if test -n "$prev"; then
123 case "$prev" in 124 case $prev in
124 execute_dlfiles) 125 execute_dlfiles)
125 eval "$prev=\"\$$prev \$arg\"" 126 execute_dlfiles="$execute_dlfiles $arg"
126 ;; 127 ;;
127 tag) 128 tag)
128 tagname="$arg" 129 tagname="$arg"
129 130
130 # Check whether tagname contains only valid characters 131 # Check whether tagname contains only valid characters
131 case "$tagname" in 132 case $tagname in
132 *[!-_A-Za-z0-9,/]*) 133 *[!-_A-Za-z0-9,/]*)
133 echo "$progname: invalid tag name: $tagname" 1>&2 134 echo "$progname: invalid tag name: $tagname" 1>&2
134 exit 1 135 exit 1
@@ -154,7 +155,7 @@ do
154 fi 155 fi
155 156
156 # Have we seen a non-optional argument yet? 157 # Have we seen a non-optional argument yet?
157 case "$arg" in 158 case $arg in
158 --help) 159 --help)
159 show_help=yes 160 show_help=yes
160 ;; 161 ;;
@@ -241,12 +242,12 @@ if test -z "$show_help"; then
241 242
242 # Infer the operation mode. 243 # Infer the operation mode.
243 if test -z "$mode"; then 244 if test -z "$mode"; then
244 case "$nonopt" in 245 case $nonopt in
245 *cc | *++ | gcc* | *-gcc*) 246 *cc | *++ | gcc* | *-gcc*)
246 mode=link 247 mode=link
247 for arg 248 for arg
248 do 249 do
249 case "$arg" in 250 case $arg in
250 -c) 251 -c)
251 mode=compile 252 mode=compile
252 break 253 break
@@ -291,7 +292,7 @@ if test -z "$show_help"; then
291 help="Try \`$modename --help --mode=$mode' for more information." 292 help="Try \`$modename --help --mode=$mode' for more information."
292 293
293 # These modes are in order of execution frequency so that they run quickly. 294 # These modes are in order of execution frequency so that they run quickly.
294 case "$mode" in 295 case $mode in
295 # libtool compile mode 296 # libtool compile mode
296 compile) 297 compile)
297 modename="$modename: compile" 298 modename="$modename: compile"
@@ -305,14 +306,14 @@ if test -z "$show_help"; then
305 user_target=no 306 user_target=no
306 for arg 307 for arg
307 do 308 do
308 case "$prev" in 309 case $prev in
309 "") ;; 310 "") ;;
310 xcompiler) 311 xcompiler)
311 # Aesthetically quote the previous argument. 312 # Aesthetically quote the previous argument.
312 prev= 313 prev=
313 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 314 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
314 315
315 case "$arg" in 316 case $arg in
316 # Double-quote args containing other shell metacharacters. 317 # Double-quote args containing other shell metacharacters.
317 # Many Bourne shells cannot handle close brackets correctly 318 # Many Bourne shells cannot handle close brackets correctly
318 # in scan sets, so we specify it separately. 319 # in scan sets, so we specify it separately.
@@ -332,7 +333,7 @@ if test -z "$show_help"; then
332 esac 333 esac
333 334
334 # Accept any command-line options. 335 # Accept any command-line options.
335 case "$arg" in 336 case $arg in
336 -o) 337 -o)
337 if test "$user_target" != "no"; then 338 if test "$user_target" != "no"; then
338 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 339 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
@@ -371,7 +372,7 @@ if test -z "$show_help"; then
371 # Double-quote args containing other shell metacharacters. 372 # Double-quote args containing other shell metacharacters.
372 # Many Bourne shells cannot handle close brackets correctly 373 # Many Bourne shells cannot handle close brackets correctly
373 # in scan sets, so we specify it separately. 374 # in scan sets, so we specify it separately.
374 case "$arg" in 375 case $arg in
375 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 376 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
376 arg="\"$arg\"" 377 arg="\"$arg\""
377 ;; 378 ;;
@@ -391,7 +392,7 @@ if test -z "$show_help"; then
391 ;; 392 ;;
392 esac 393 esac
393 394
394 case "$user_target" in 395 case $user_target in
395 next) 396 next)
396 # The next one is the -o target name 397 # The next one is the -o target name
397 user_target=yes 398 user_target=yes
@@ -419,7 +420,7 @@ if test -z "$show_help"; then
419 # Double-quote args containing other shell metacharacters. 420 # Double-quote args containing other shell metacharacters.
420 # Many Bourne shells cannot handle close brackets correctly 421 # Many Bourne shells cannot handle close brackets correctly
421 # in scan sets, so we specify it separately. 422 # in scan sets, so we specify it separately.
422 case "$lastarg" in 423 case $lastarg in
423 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 424 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
424 lastarg="\"$lastarg\"" 425 lastarg="\"$lastarg\""
425 ;; 426 ;;
@@ -433,7 +434,7 @@ if test -z "$show_help"; then
433 fi 434 fi
434 done 435 done
435 436
436 case "$user_target" in 437 case $user_target in
437 set) 438 set)
438 ;; 439 ;;
439 no) 440 no)
@@ -449,7 +450,7 @@ if test -z "$show_help"; then
449 # Recognize several different file suffixes. 450 # Recognize several different file suffixes.
450 # If the user specifies -o file.o, it is replaced with file.lo 451 # If the user specifies -o file.o, it is replaced with file.lo
451 xform='[cCFSfmso]' 452 xform='[cCFSfmso]'
452 case "$libobj" in 453 case $libobj in
453 *.ada) xform=ada ;; 454 *.ada) xform=ada ;;
454 *.adb) xform=adb ;; 455 *.adb) xform=adb ;;
455 *.ads) xform=ads ;; 456 *.ads) xform=ads ;;
@@ -466,7 +467,7 @@ if test -z "$show_help"; then
466 467
467 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 468 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
468 469
469 case "$libobj" in 470 case $libobj in
470 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 471 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
471 *) 472 *)
472 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 473 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
@@ -544,7 +545,7 @@ if test -z "$show_help"; then
544 trap "$run $rm $removelist; exit 1" 1 2 15 545 trap "$run $rm $removelist; exit 1" 1 2 15
545 546
546 # On Cygwin there's no "real" PIC flag so we must build both object types 547 # On Cygwin there's no "real" PIC flag so we must build both object types
547 case "$host_os" in 548 case $host_os in
548 cygwin* | mingw* | pw32* | os2*) 549 cygwin* | mingw* | pw32* | os2*)
549 pic_mode=default 550 pic_mode=default
550 ;; 551 ;;
@@ -777,7 +778,7 @@ EOF
777 # libtool link mode 778 # libtool link mode
778 link | relink) 779 link | relink)
779 modename="$modename: link" 780 modename="$modename: link"
780 case "$host" in 781 case $host in
781 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 782 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
782 # It is impossible to link a dll without this setting, and 783 # It is impossible to link a dll without this setting, and
783 # we shouldn't force the makefile maintainer to figure out 784 # we shouldn't force the makefile maintainer to figure out
@@ -843,7 +844,7 @@ EOF
843 # We need to know -static, to get the right output filenames. 844 # We need to know -static, to get the right output filenames.
844 for arg 845 for arg
845 do 846 do
846 case "$arg" in 847 case $arg in
847 -all-static | -static) 848 -all-static | -static)
848 if test "X$arg" = "X-all-static"; then 849 if test "X$arg" = "X-all-static"; then
849 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then 850 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
@@ -873,7 +874,7 @@ EOF
873 arg="$1" 874 arg="$1"
874 base_compile="$base_compile $arg" 875 base_compile="$base_compile $arg"
875 shift 876 shift
876 case "$arg" in 877 case $arg in
877 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 878 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
878 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test 879 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
879 ;; 880 ;;
@@ -883,14 +884,14 @@ EOF
883 884
884 # If the previous option needs an argument, assign it. 885 # If the previous option needs an argument, assign it.
885 if test -n "$prev"; then 886 if test -n "$prev"; then
886 case "$prev" in 887 case $prev in
887 output) 888 output)
888 compile_command="$compile_command @OUTPUT@" 889 compile_command="$compile_command @OUTPUT@"
889 finalize_command="$finalize_command @OUTPUT@" 890 finalize_command="$finalize_command @OUTPUT@"
890 ;; 891 ;;
891 esac 892 esac
892 893
893 case "$prev" in 894 case $prev in
894 dlfiles|dlprefiles) 895 dlfiles|dlprefiles)
895 if test "$preload" = no; then 896 if test "$preload" = no; then
896 # Add the symbol object into the linking commands. 897 # Add the symbol object into the linking commands.
@@ -898,7 +899,7 @@ EOF
898 finalize_command="$finalize_command @SYMFILE@" 899 finalize_command="$finalize_command @SYMFILE@"
899 preload=yes 900 preload=yes
900 fi 901 fi
901 case "$arg" in 902 case $arg in
902 *.la | *.lo) ;; # We handle these cases below. 903 *.la | *.lo) ;; # We handle these cases below.
903 force) 904 force)
904 if test "$dlself" = no; then 905 if test "$dlself" = no; then
@@ -950,9 +951,116 @@ EOF
950 prev= 951 prev=
951 continue 952 continue
952 ;; 953 ;;
954 objectlist)
955 if test -f "$arg"; then
956 save_arg=$arg
957 moreargs=
958 for fil in `cat $save_arg`
959 do
960# moreargs="$moreargs $fil"
961 arg=$fil
962 # A libtool-controlled object.
963
964 # Check to see that this really is a libtool object.
965 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
966 pic_object=
967 non_pic_object=
968
969 # Read the .lo file
970 # If there is no directory component, then add one.
971 case $arg in
972 */* | *\\*) . $arg ;;
973 *) . ./$arg ;;
974 esac
975
976 if test -z "$pic_object" || \
977 test -z "$non_pic_object" ||
978 test "$pic_object" = none && \
979 test "$non_pic_object" = none; then
980 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
981 exit 1
982 fi
983
984 # Extract subdirectory from the argument.
985 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
986 if test "X$xdir" = "X$arg"; then
987 xdir=
988 else
989 xdir="$xdir/"
990 fi
991
992 if test "$pic_object" != none; then
993 # Prepend the subdirectory the object is found in.
994 pic_object="$xdir$pic_object"
995
996 if test "$prev" = dlfiles; then
997 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
998 dlfiles="$dlfiles $pic_object"
999 prev=
1000 continue
1001 else
1002 # If libtool objects are unsupported, then we need to preload.
1003 prev=dlprefiles
1004 fi
1005 fi
1006
1007 # CHECK ME: I think I busted this. -Ossama
1008 if test "$prev" = dlprefiles; then
1009 # Preload the old-style object.
1010 dlprefiles="$dlprefiles $pic_object"
1011 prev=
1012 fi
1013
1014 # A PIC object.
1015 libobjs="$libobjs $pic_object"
1016 arg="$pic_object"
1017 fi
1018
1019 # Non-PIC object.
1020 if test "$non_pic_object" != none; then
1021 # Prepend the subdirectory the object is found in.
1022 non_pic_object="$xdir$non_pic_object"
1023
1024 # A standard non-PIC object
1025 non_pic_objects="$non_pic_objects $non_pic_object"
1026 if test -z "$pic_object" || test "$pic_object" = none ; then
1027 arg="$non_pic_object"
1028 fi
1029 fi
1030 else
1031 # Only an error if not doing a dry-run.
1032 if test -z "$run"; then
1033 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1034 exit 1
1035 else
1036 # Dry-run case.
1037
1038 # Extract subdirectory from the argument.
1039 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1040 if test "X$xdir" = "X$arg"; then
1041 xdir=
1042 else
1043 xdir="$xdir/"
1044 fi
1045
1046 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1047 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1048 libobjs="$libobjs $pic_object"
1049 non_pic_objects="$non_pic_objects $non_pic_object"
1050 fi
1051 fi
1052 done
1053 else
1054 $echo "$modename: link input file \`$save_arg' does not exist"
1055 exit 1
1056 fi
1057 arg=$save_arg
1058 prev=
1059 continue
1060 ;;
953 rpath | xrpath) 1061 rpath | xrpath)
954 # We need an absolute path. 1062 # We need an absolute path.
955 case "$arg" in 1063 case $arg in
956 [\\/]* | [A-Za-z]:[\\/]*) ;; 1064 [\\/]* | [A-Za-z]:[\\/]*) ;;
957 *) 1065 *)
958 $echo "$modename: only absolute run-paths are allowed" 1>&2 1066 $echo "$modename: only absolute run-paths are allowed" 1>&2
@@ -998,7 +1106,7 @@ EOF
998 1106
999 prevarg="$arg" 1107 prevarg="$arg"
1000 1108
1001 case "$arg" in 1109 case $arg in
1002 -all-static) 1110 -all-static)
1003 if test -n "$link_static_flag"; then 1111 if test -n "$link_static_flag"; then
1004 compile_command="$compile_command $link_static_flag" 1112 compile_command="$compile_command $link_static_flag"
@@ -1061,7 +1169,7 @@ EOF
1061 -L*) 1169 -L*)
1062 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1170 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1063 # We need an absolute path. 1171 # We need an absolute path.
1064 case "$dir" in 1172 case $dir in
1065 [\\/]* | [A-Za-z]:[\\/]*) ;; 1173 [\\/]* | [A-Za-z]:[\\/]*) ;;
1066 *) 1174 *)
1067 absdir=`cd "$dir" && pwd` 1175 absdir=`cd "$dir" && pwd`
@@ -1079,9 +1187,9 @@ EOF
1079 lib_search_path="$lib_search_path $dir" 1187 lib_search_path="$lib_search_path $dir"
1080 ;; 1188 ;;
1081 esac 1189 esac
1082 case "$host" in 1190 case $host in
1083 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1191 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1084 case ":$dllsearchpath:" in 1192 case :$dllsearchpath: in
1085 *":$dir:"*) ;; 1193 *":$dir:"*) ;;
1086 *) dllsearchpath="$dllsearchpath:$dir";; 1194 *) dllsearchpath="$dllsearchpath:$dir";;
1087 esac 1195 esac
@@ -1092,18 +1200,26 @@ EOF
1092 1200
1093 -l*) 1201 -l*)
1094 if test "$arg" = "-lc"; then 1202 if test "$arg" = "-lc"; then
1095 case "$host" in 1203 case $host in
1096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) 1204 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
1097 # These systems don't actually have c library (as such) 1205 # These systems don't actually have c library (as such)
1098 continue 1206 continue
1099 ;; 1207 ;;
1208 *-*-rhapsody* | *-*-darwin*)
1209 # Darwin C library is in the System framework
1210 deplibs="$deplibs -framework System"
1211 ;;
1100 esac 1212 esac
1101 elif test "$arg" = "-lm"; then 1213 elif test "$arg" = "-lm"; then
1102 case "$host" in 1214 case $host in
1103 *-*-cygwin* | *-*-pw32* | *-*-beos*) 1215 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1104 # These systems don't actually have math library (as such) 1216 # These systems don't actually have math library (as such)
1105 continue 1217 continue
1106 ;; 1218 ;;
1219 *-*-rhapsody* | *-*-darwin*)
1220 # Darwin math library is in the System framework
1221 deplibs="$deplibs -framework System"
1222 ;;
1107 esac 1223 esac
1108 fi 1224 fi
1109 deplibs="$deplibs $arg" 1225 deplibs="$deplibs $arg"
@@ -1121,7 +1237,7 @@ EOF
1121 ;; 1237 ;;
1122 1238
1123 -no-install) 1239 -no-install)
1124 case "$host" in 1240 case $host in
1125 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1241 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1126 # The PATH hackery in wrapper scripts is required on Windows 1242 # The PATH hackery in wrapper scripts is required on Windows
1127 # in order for the loader to find any dlls it needs. 1243 # in order for the loader to find any dlls it needs.
@@ -1129,8 +1245,8 @@ EOF
1129 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 1245 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1130 fast_install=no 1246 fast_install=no
1131 ;; 1247 ;;
1132 *-*-rhapsody*) 1248 *-*-rhapsody* | *-*-darwin*)
1133 # rhapsody is a little odd... 1249 # Darwin C library is in the System framework
1134 deplibs="$deplibs -framework System" 1250 deplibs="$deplibs -framework System"
1135 ;; 1251 ;;
1136 *) 1252 *)
@@ -1145,6 +1261,11 @@ EOF
1145 continue 1261 continue
1146 ;; 1262 ;;
1147 1263
1264 -objectlist)
1265 prev=objectlist
1266 continue
1267 ;;
1268
1148 -o) prev=output ;; 1269 -o) prev=output ;;
1149 1270
1150 -release) 1271 -release)
@@ -1165,7 +1286,7 @@ EOF
1165 -R*) 1286 -R*)
1166 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` 1287 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1167 # We need an absolute path. 1288 # We need an absolute path.
1168 case "$dir" in 1289 case $dir in
1169 [\\/]* | [A-Za-z]:[\\/]*) ;; 1290 [\\/]* | [A-Za-z]:[\\/]*) ;;
1170 *) 1291 *)
1171 $echo "$modename: only absolute run-paths are allowed" 1>&2 1292 $echo "$modename: only absolute run-paths are allowed" 1>&2
@@ -1204,7 +1325,7 @@ EOF
1204 IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' 1325 IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1205 for flag in $args; do 1326 for flag in $args; do
1206 IFS="$save_ifs" 1327 IFS="$save_ifs"
1207 case "$flag" in 1328 case $flag in
1208 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1329 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1209 flag="\"$flag\"" 1330 flag="\"$flag\""
1210 ;; 1331 ;;
@@ -1222,7 +1343,7 @@ EOF
1222 IFS="${IFS= }"; save_ifs="$IFS"; IFS=',' 1343 IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1223 for flag in $args; do 1344 for flag in $args; do
1224 IFS="$save_ifs" 1345 IFS="$save_ifs"
1225 case "$flag" in 1346 case $flag in
1226 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1347 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1227 flag="\"$flag\"" 1348 flag="\"$flag\""
1228 ;; 1349 ;;
@@ -1250,7 +1371,7 @@ EOF
1250 # Unknown arguments in both finalize_command and compile_command need 1371 # Unknown arguments in both finalize_command and compile_command need
1251 # to be aesthetically quoted because they are evaled later. 1372 # to be aesthetically quoted because they are evaled later.
1252 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1373 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1253 case "$arg" in 1374 case $arg in
1254 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1375 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1255 arg="\"$arg\"" 1376 arg="\"$arg\""
1256 ;; 1377 ;;
@@ -1272,7 +1393,7 @@ EOF
1272 1393
1273 # Read the .lo file 1394 # Read the .lo file
1274 # If there is no directory component, then add one. 1395 # If there is no directory component, then add one.
1275 case "$arg" in 1396 case $arg in
1276 */* | *\\*) . $arg ;; 1397 */* | *\\*) . $arg ;;
1277 *) . ./$arg ;; 1398 *) . ./$arg ;;
1278 esac 1399 esac
@@ -1384,7 +1505,7 @@ EOF
1384 # Unknown arguments in both finalize_command and compile_command need 1505 # Unknown arguments in both finalize_command and compile_command need
1385 # to be aesthetically quoted because they are evaled later. 1506 # to be aesthetically quoted because they are evaled later.
1386 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1507 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1387 case "$arg" in 1508 case $arg in
1388 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1509 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1389 arg="\"$arg\"" 1510 arg="\"$arg\""
1390 ;; 1511 ;;
@@ -1486,7 +1607,7 @@ EOF
1486 fi 1607 fi
1487 1608
1488 # Determine the type of output 1609 # Determine the type of output
1489 case "$output" in 1610 case $output in
1490 "") 1611 "")
1491 $echo "$modename: you must specify an output file" 1>&2 1612 $echo "$modename: you must specify an output file" 1>&2
1492 $echo "$help" 1>&2 1613 $echo "$help" 1>&2
@@ -1523,7 +1644,7 @@ EOF
1523 lib) 1644 lib)
1524 passes="conv link" 1645 passes="conv link"
1525 for file in $dlfiles $dlprefiles; do 1646 for file in $dlfiles $dlprefiles; do
1526 case "$file" in 1647 case $file in
1527 *.la) ;; 1648 *.la) ;;
1528 *) 1649 *)
1529 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 1650 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
@@ -1564,7 +1685,7 @@ EOF
1564 for deplib in $libs; do 1685 for deplib in $libs; do
1565 lib= 1686 lib=
1566 found=no 1687 found=no
1567 case "$deplib" in 1688 case $deplib in
1568 -l*) 1689 -l*)
1569 if test $linkmode != lib && test $linkmode != prog; then 1690 if test $linkmode != lib && test $linkmode != prog; then
1570 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 1691 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
@@ -1714,7 +1835,7 @@ EOF
1714 installed=yes 1835 installed=yes
1715 1836
1716 # Read the .la file 1837 # Read the .la file
1717 case "$lib" in 1838 case $lib in
1718 */* | *\\*) . $lib ;; 1839 */* | *\\*) . $lib ;;
1719 *) . ./$lib ;; 1840 *) . ./$lib ;;
1720 esac 1841 esac
@@ -1769,9 +1890,11 @@ EOF
1769 exit 1 1890 exit 1
1770 fi 1891 fi
1771 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1892 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1772 # If there is no dlname, no dlopen support or we're linking statically, 1893 # If there is no dlname, no dlopen support or we're linking
1773 # we need to preload. 1894 # statically, we need to preload. We also need to preload any
1774 dlprefiles="$dlprefiles $lib" 1895 # dependent libraries so libltdl's deplib preloader doesn't
1896 # bomb out in the load deplibs phase.
1897 dlprefiles="$dlprefiles $lib $dependency_libs"
1775 else 1898 else
1776 newdlfiles="$newdlfiles $lib" 1899 newdlfiles="$newdlfiles $lib"
1777 fi 1900 fi
@@ -1779,7 +1902,7 @@ EOF
1779 fi 1902 fi
1780 1903
1781 # We need an absolute path. 1904 # We need an absolute path.
1782 case "$ladir" in 1905 case $ladir in
1783 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; 1906 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
1784 *) 1907 *)
1785 abs_ladir=`cd "$ladir" && pwd` 1908 abs_ladir=`cd "$ladir" && pwd`
@@ -1854,7 +1977,7 @@ EOF
1854 1977
1855 tmp_libs= 1978 tmp_libs=
1856 for deplib in $dependency_libs; do 1979 for deplib in $dependency_libs; do
1857 case "$deplib" in 1980 case $deplib in
1858 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 1981 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1859 esac 1982 esac
1860 # Need to link against all dependency_libs? 1983 # Need to link against all dependency_libs?
@@ -2003,12 +2126,12 @@ EOF
2003 add_dir= 2126 add_dir=
2004 add= 2127 add=
2005 lib_linked=yes 2128 lib_linked=yes
2006 case "$hardcode_action" in 2129 case $hardcode_action in
2007 immediate | unsupported) 2130 immediate | unsupported)
2008 if test "$hardcode_direct" = no; then 2131 if test "$hardcode_direct" = no; then
2009 add="$dir/$linklib" 2132 add="$dir/$linklib"
2010 elif test "$hardcode_minus_L" = no; then 2133 elif test "$hardcode_minus_L" = no; then
2011 case "$host" in 2134 case $host in
2012 *-*-sunos*) add_shlibpath="$dir" ;; 2135 *-*-sunos*) add_shlibpath="$dir" ;;
2013 esac 2136 esac
2014 add_dir="-L$dir" 2137 add_dir="-L$dir"
@@ -2042,7 +2165,7 @@ EOF
2042 fi 2165 fi
2043 2166
2044 if test -n "$add_shlibpath"; then 2167 if test -n "$add_shlibpath"; then
2045 case ":$compile_shlibpath:" in 2168 case :$compile_shlibpath: in
2046 *":$add_shlibpath:"*) ;; 2169 *":$add_shlibpath:"*) ;;
2047 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; 2170 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2048 esac 2171 esac
@@ -2056,7 +2179,7 @@ EOF
2056 if test "$hardcode_direct" != yes && \ 2179 if test "$hardcode_direct" != yes && \
2057 test "$hardcode_minus_L" != yes && \ 2180 test "$hardcode_minus_L" != yes && \
2058 test "$hardcode_shlibpath_var" = yes; then 2181 test "$hardcode_shlibpath_var" = yes; then
2059 case ":$finalize_shlibpath:" in 2182 case :$finalize_shlibpath: in
2060 *":$libdir:"*) ;; 2183 *":$libdir:"*) ;;
2061 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 2184 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2062 esac 2185 esac
@@ -2075,7 +2198,7 @@ EOF
2075 add_dir="-L$libdir" 2198 add_dir="-L$libdir"
2076 add="-l$name" 2199 add="-l$name"
2077 elif test "$hardcode_shlibpath_var" = yes; then 2200 elif test "$hardcode_shlibpath_var" = yes; then
2078 case ":$finalize_shlibpath:" in 2201 case :$finalize_shlibpath: in
2079 *":$libdir:"*) ;; 2202 *":$libdir:"*) ;;
2080 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; 2203 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2081 esac 2204 esac
@@ -2133,7 +2256,7 @@ EOF
2133 # Extract -R from dependency_libs 2256 # Extract -R from dependency_libs
2134 temp_deplibs= 2257 temp_deplibs=
2135 for libdir in $dependency_libs; do 2258 for libdir in $dependency_libs; do
2136 case "$libdir" in 2259 case $libdir in
2137 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 2260 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2138 case " $xrpath " in 2261 case " $xrpath " in
2139 *" $temp_xrpath "*) ;; 2262 *" $temp_xrpath "*) ;;
@@ -2161,13 +2284,13 @@ EOF
2161 if test $link_all_deplibs != no; then 2284 if test $link_all_deplibs != no; then
2162 # Add the search paths of all dependency libraries 2285 # Add the search paths of all dependency libraries
2163 for deplib in $dependency_libs; do 2286 for deplib in $dependency_libs; do
2164 case "$deplib" in 2287 case $deplib in
2165 -L*) path="$deplib" ;; 2288 -L*) path="$deplib" ;;
2166 *.la) 2289 *.la)
2167 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` 2290 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2168 test "X$dir" = "X$deplib" && dir="." 2291 test "X$dir" = "X$deplib" && dir="."
2169 # We need an absolute path. 2292 # We need an absolute path.
2170 case "$dir" in 2293 case $dir in
2171 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 2294 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2172 *) 2295 *)
2173 absdir=`cd "$dir" && pwd` 2296 absdir=`cd "$dir" && pwd`
@@ -2232,7 +2355,7 @@ EOF
2232 eval tmp_libs=\"\$$var\" 2355 eval tmp_libs=\"\$$var\"
2233 new_libs= 2356 new_libs=
2234 for deplib in $tmp_libs; do 2357 for deplib in $tmp_libs; do
2235 case "$deplib" in 2358 case $deplib in
2236 -L*) new_libs="$deplib $new_libs" ;; 2359 -L*) new_libs="$deplib $new_libs" ;;
2237 *) 2360 *)
2238 case " $specialdeplibs " in 2361 case " $specialdeplibs " in
@@ -2249,7 +2372,7 @@ EOF
2249 done 2372 done
2250 tmp_libs= 2373 tmp_libs=
2251 for deplib in $new_libs; do 2374 for deplib in $new_libs; do
2252 case "$deplib" in 2375 case $deplib in
2253 -L*) 2376 -L*)
2254 case " $tmp_libs " in 2377 case " $tmp_libs " in
2255 *" $deplib "*) ;; 2378 *" $deplib "*) ;;
@@ -2306,7 +2429,7 @@ EOF
2306 2429
2307 lib) 2430 lib)
2308 # Make sure we only generate libraries of the form `libNAME.la'. 2431 # Make sure we only generate libraries of the form `libNAME.la'.
2309 case "$outputname" in 2432 case $outputname in
2310 lib*) 2433 lib*)
2311 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2434 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2312 eval libname=\"$libname_spec\" 2435 eval libname=\"$libname_spec\"
@@ -2386,7 +2509,7 @@ EOF
2386 age="$4" 2509 age="$4"
2387 2510
2388 # Check that each of the things are valid numbers. 2511 # Check that each of the things are valid numbers.
2389 case "$current" in 2512 case $current in
2390 0 | [1-9] | [1-9][0-9]*) ;; 2513 0 | [1-9] | [1-9][0-9]*) ;;
2391 *) 2514 *)
2392 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 2515 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
@@ -2395,7 +2518,7 @@ EOF
2395 ;; 2518 ;;
2396 esac 2519 esac
2397 2520
2398 case "$revision" in 2521 case $revision in
2399 0 | [1-9] | [1-9][0-9]*) ;; 2522 0 | [1-9] | [1-9][0-9]*) ;;
2400 *) 2523 *)
2401 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 2524 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
@@ -2404,7 +2527,7 @@ EOF
2404 ;; 2527 ;;
2405 esac 2528 esac
2406 2529
2407 case "$age" in 2530 case $age in
2408 0 | [1-9] | [1-9][0-9]*) ;; 2531 0 | [1-9] | [1-9][0-9]*) ;;
2409 *) 2532 *)
2410 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 2533 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
@@ -2423,7 +2546,7 @@ EOF
2423 major= 2546 major=
2424 versuffix= 2547 versuffix=
2425 verstring= 2548 verstring=
2426 case "$version_type" in 2549 case $version_type in
2427 none) ;; 2550 none) ;;
2428 2551
2429 irix) 2552 irix)
@@ -2531,7 +2654,7 @@ EOF
2531 removelist= 2654 removelist=
2532 tempremovelist=`echo "$output_objdir/*"` 2655 tempremovelist=`echo "$output_objdir/*"`
2533 for p in $tempremovelist; do 2656 for p in $tempremovelist; do
2534 case "$p" in 2657 case $p in
2535 *.$objext) 2658 *.$objext)
2536 ;; 2659 ;;
2537 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) 2660 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
@@ -2598,7 +2721,7 @@ EOF
2598 2721
2599 if test "$build_libtool_libs" = yes; then 2722 if test "$build_libtool_libs" = yes; then
2600 if test -n "$rpath"; then 2723 if test -n "$rpath"; then
2601 case "$host" in 2724 case $host in
2602 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) 2725 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
2603 # these systems don't actually have a c library (as such)! 2726 # these systems don't actually have a c library (as such)!
2604 ;; 2727 ;;
@@ -2625,7 +2748,7 @@ EOF
2625 major="" 2748 major=""
2626 newdeplibs= 2749 newdeplibs=
2627 droppeddeps=no 2750 droppeddeps=no
2628 case "$deplibs_check_method" in 2751 case $deplibs_check_method in
2629 pass_all) 2752 pass_all)
2630 # Don't check for shared/static. Everything works. 2753 # Don't check for shared/static. Everything works.
2631 # This might be a little naive. We might want to check 2754 # This might be a little naive. We might want to check
@@ -2650,7 +2773,7 @@ EOF
2650 for i in $deplibs; do 2773 for i in $deplibs; do
2651 name="`expr $i : '-l\(.*\)'`" 2774 name="`expr $i : '-l\(.*\)'`"
2652 # If $name is empty we are operating on a -L argument. 2775 # If $name is empty we are operating on a -L argument.
2653 if test "$name" != "" ; then 2776 if test "$name" != "" -a "$name" != "0"; then
2654 libname=`eval \\$echo \"$libname_spec\"` 2777 libname=`eval \\$echo \"$libname_spec\"`
2655 deplib_matches=`eval \\$echo \"$library_names_spec\"` 2778 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2656 set dummy $deplib_matches 2779 set dummy $deplib_matches
@@ -2675,7 +2798,7 @@ EOF
2675 for i in $deplibs; do 2798 for i in $deplibs; do
2676 name="`expr $i : '-l\(.*\)'`" 2799 name="`expr $i : '-l\(.*\)'`"
2677 # If $name is empty we are operating on a -L argument. 2800 # If $name is empty we are operating on a -L argument.
2678 if test "$name" != "" ; then 2801 if test "$name" != "" -a "$name" != "0"; then
2679 $rm conftest 2802 $rm conftest
2680 $LTCC -o conftest conftest.c $i 2803 $LTCC -o conftest conftest.c $i
2681 # Did it work? 2804 # Did it work?
@@ -2715,7 +2838,7 @@ EOF
2715 for a_deplib in $deplibs; do 2838 for a_deplib in $deplibs; do
2716 name="`expr $a_deplib : '-l\(.*\)'`" 2839 name="`expr $a_deplib : '-l\(.*\)'`"
2717 # If $name is empty we are operating on a -L argument. 2840 # If $name is empty we are operating on a -L argument.
2718 if test "$name" != "" ; then 2841 if test "$name" != "" -a "$name" != "0"; then
2719 libname=`eval \\$echo \"$libname_spec\"` 2842 libname=`eval \\$echo \"$libname_spec\"`
2720 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2843 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2721 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2844 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
@@ -2733,7 +2856,7 @@ EOF
2733 potlib="$potent_lib" 2856 potlib="$potent_lib"
2734 while test -h "$potlib" 2>/dev/null; do 2857 while test -h "$potlib" 2>/dev/null; do
2735 potliblink=`ls -ld $potlib | sed 's/.* -> //'` 2858 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2736 case "$potliblink" in 2859 case $potliblink in
2737 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 2860 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2738 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; 2861 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2739 esac 2862 esac
@@ -2808,6 +2931,21 @@ EOF
2808 echo "*** The inter-library dependencies that have been dropped here will be" 2931 echo "*** The inter-library dependencies that have been dropped here will be"
2809 echo "*** automatically added whenever a program is linked with this library" 2932 echo "*** automatically added whenever a program is linked with this library"
2810 echo "*** or is declared to -dlopen it." 2933 echo "*** or is declared to -dlopen it."
2934
2935 if test $allow_undefined = no; then
2936 echo
2937 echo "*** Since this library must not contain undefined symbols,"
2938 echo "*** because either the platform does not support them or"
2939 echo "*** it was explicitly requested with -no-undefined,"
2940 echo "*** libtool will only create a static version of it."
2941 if test "$build_old_libs" = no; then
2942 oldlibs="$output_objdir/$libname.$libext"
2943 build_libtool_libs=module
2944 build_old_libs=yes
2945 else
2946 build_libtool_libs=no
2947 fi
2948 fi
2811 fi 2949 fi
2812 fi 2950 fi
2813 # Done checking deplibs! 2951 # Done checking deplibs!
@@ -2834,7 +2972,7 @@ EOF
2834 hardcode_libdirs="$libdir" 2972 hardcode_libdirs="$libdir"
2835 else 2973 else
2836 # Just accumulate the unique libdirs. 2974 # Just accumulate the unique libdirs.
2837 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in 2975 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
2838 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 2976 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2839 ;; 2977 ;;
2840 *) 2978 *)
@@ -2943,6 +3081,7 @@ EOF
2943 3081
2944 if test -n "$convenience"; then 3082 if test -n "$convenience"; then
2945 if test -n "$whole_archive_flag_spec"; then 3083 if test -n "$whole_archive_flag_spec"; then
3084 save_libobjs=$libobjs
2946 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3085 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
2947 else 3086 else
2948 gentop="$output_objdir/${outputname}x" 3087 gentop="$output_objdir/${outputname}x"
@@ -2958,7 +3097,7 @@ EOF
2958 3097
2959 for xlib in $convenience; do 3098 for xlib in $convenience; do
2960 # Extract the objects. 3099 # Extract the objects.
2961 case "$xlib" in 3100 case $xlib in
2962 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3101 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2963 *) xabs=`pwd`"/$xlib" ;; 3102 *) xabs=`pwd`"/$xlib" ;;
2964 esac 3103 esac
@@ -2997,13 +3136,115 @@ EOF
2997 else 3136 else
2998 eval cmds=\"$archive_cmds\" 3137 eval cmds=\"$archive_cmds\"
2999 fi 3138 fi
3000 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3139 if len=`expr "X$cmds" : ".*"` &&
3001 for cmd in $cmds; do 3140 test $len -le $max_cmd_len; then
3002 IFS="$save_ifs" 3141 :
3003 $show "$cmd" 3142 else
3004 $run eval "$cmd" || exit $? 3143 # The command line is too long to link in one step, link piecewise.
3005 done 3144 $echo "creating reloadable object files..."
3006 IFS="$save_ifs" 3145
3146 # Save the value of $output and $libobjs because we want to
3147 # use them later. If we have whole_archive_flag_spec, we
3148 # want to use save_libobjs as it was before
3149 # whole_archive_flag_spec was expanded, because we can't
3150 # assume the linker understands whole_archive_flag_spec.
3151 # This may have to be revisited, in case too many
3152 # convenience libraries get linked in and end up exceeding
3153 # the spec.
3154 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
3155 save_libobjs=$libobjs
3156 fi
3157 save_output=$output
3158
3159 # Clear the reloadable object creation command queue and
3160 # initialize k to one.
3161 test_cmds=
3162 concat_cmds=
3163 objlist=
3164 delfiles=
3165 last_robj=
3166 k=1
3167 output=$output_objdir/$save_output-${k}.$objext
3168 # Loop over the list of objects to be linked.
3169 for obj in $save_libobjs
3170 do
3171 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3172 if test "X$objlist" = X ||
3173 { len=`expr "X$test_cmds" : ".*"` &&
3174 test $len -le $max_cmd_len; }; then
3175 objlist="$objlist $obj"
3176 else
3177 # The command $test_cmds is almost too long, add a
3178 # command to the queue.
3179 if test $k -eq 1 ; then
3180 # The first file doesn't have a previous command to add.
3181 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
3182 else
3183 # All subsequent reloadable object files will link in
3184 # the last one created.
3185 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3186 fi
3187 last_robj=$output_objdir/$save_output-${k}.$objext
3188 k=`expr $k + 1`
3189 output=$output_objdir/$save_output-${k}.$objext
3190 objlist=$obj
3191 len=1
3192 fi
3193 done
3194 # Handle the remaining objects by creating one last
3195 # reloadable object file. All subsequent reloadable object
3196 # files will link in the last one created.
3197 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
3198 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
3199
3200 # Set up a command to remove the reloadale object files
3201 # after they are used.
3202 i=0
3203 while test $i -lt $k
3204 do
3205 i=`expr $i + 1`
3206 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
3207 done
3208
3209 $echo "creating a temporary reloadable object file: $output"
3210
3211 # Loop through the commands generated above and execute them.
3212 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3213 for cmd in $concat_cmds; do
3214 IFS="$save_ifs"
3215 $show "$cmd"
3216 $run eval "$cmd" || exit $?
3217 done
3218 IFS="$save_ifs"
3219
3220 libobjs=$output
3221 # Restore the value of output.
3222 output=$save_output
3223
3224 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
3225 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3226 fi
3227 # Expand the library linking commands again to reset the
3228 # value of $libobjs for piecewise linking.
3229
3230 # Do each of the archive commands.
3231 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3232 eval cmds=\"$archive_expsym_cmds\"
3233 else
3234 eval cmds=\"$archive_cmds\"
3235 fi
3236
3237 # Append the command to remove the reloadable object files
3238 # to the just-reset $cmds.
3239 eval cmds=\"\$cmds~$rm $delfiles\"
3240 fi
3241 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3242 for cmd in $cmds; do
3243 IFS="$save_ifs"
3244 $show "$cmd"
3245 $run eval "$cmd" || exit $?
3246 done
3247 IFS="$save_ifs"
3007 3248
3008 # Restore the uninstalled library and exit 3249 # Restore the uninstalled library and exit
3009 if test "$mode" = relink; then 3250 if test "$mode" = relink; then
@@ -3052,7 +3293,7 @@ EOF
3052 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 3293 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3053 fi 3294 fi
3054 3295
3055 case "$output" in 3296 case $output in
3056 *.lo) 3297 *.lo)
3057 if test -n "$objs$old_deplibs"; then 3298 if test -n "$objs$old_deplibs"; then
3058 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 3299 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
@@ -3097,7 +3338,7 @@ EOF
3097 3338
3098 for xlib in $convenience; do 3339 for xlib in $convenience; do
3099 # Extract the objects. 3340 # Extract the objects.
3100 case "$xlib" in 3341 case $xlib in
3101 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3342 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3102 *) xabs=`pwd`"/$xlib" ;; 3343 *) xabs=`pwd`"/$xlib" ;;
3103 esac 3344 esac
@@ -3232,7 +3473,7 @@ EOF
3232 hardcode_libdirs="$libdir" 3473 hardcode_libdirs="$libdir"
3233 else 3474 else
3234 # Just accumulate the unique libdirs. 3475 # Just accumulate the unique libdirs.
3235 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in 3476 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3236 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 3477 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3237 ;; 3478 ;;
3238 *) 3479 *)
@@ -3250,9 +3491,9 @@ EOF
3250 *) perm_rpath="$perm_rpath $libdir" ;; 3491 *) perm_rpath="$perm_rpath $libdir" ;;
3251 esac 3492 esac
3252 fi 3493 fi
3253 case "$host" in 3494 case $host in
3254 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 3495 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
3255 case ":$dllsearchpath:" in 3496 case :$dllsearchpath: in
3256 *":$libdir:"*) ;; 3497 *":$libdir:"*) ;;
3257 *) dllsearchpath="$dllsearchpath:$libdir";; 3498 *) dllsearchpath="$dllsearchpath:$libdir";;
3258 esac 3499 esac
@@ -3276,7 +3517,7 @@ EOF
3276 hardcode_libdirs="$libdir" 3517 hardcode_libdirs="$libdir"
3277 else 3518 else
3278 # Just accumulate the unique libdirs. 3519 # Just accumulate the unique libdirs.
3279 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in 3520 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3280 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 3521 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3281 ;; 3522 ;;
3282 *) 3523 *)
@@ -3313,7 +3554,7 @@ EOF
3313 fi 3554 fi
3314 3555
3315 if test -n "$dlsyms"; then 3556 if test -n "$dlsyms"; then
3316 case "$dlsyms" in 3557 case $dlsyms in
3317 "") ;; 3558 "") ;;
3318 *.c) 3559 *.c)
3319 # Discover the nlist of each of the dlfiles. 3560 # Discover the nlist of each of the dlfiles.
@@ -3444,7 +3685,7 @@ static const void *lt_preloaded_setup() {
3444 fi 3685 fi
3445 3686
3446 pic_flag_for_symtable= 3687 pic_flag_for_symtable=
3447 case "$host" in 3688 case $host in
3448 # compiling the symbol table file with pic_flag works around 3689 # compiling the symbol table file with pic_flag works around
3449 # a FreeBSD bug that causes programs to crash when -lm is 3690 # a FreeBSD bug that causes programs to crash when -lm is
3450 # linked before any other PIC object. But we must not use 3691 # linked before any other PIC object. But we must not use
@@ -3512,7 +3753,7 @@ static const void *lt_preloaded_setup() {
3512 # We should set the shlibpath_var 3753 # We should set the shlibpath_var
3513 rpath= 3754 rpath=
3514 for dir in $temp_rpath; do 3755 for dir in $temp_rpath; do
3515 case "$dir" in 3756 case $dir in
3516 [\\/]* | [A-Za-z]:[\\/]*) 3757 [\\/]* | [A-Za-z]:[\\/]*)
3517 # Absolute path. 3758 # Absolute path.
3518 rpath="$rpath$dir:" 3759 rpath="$rpath$dir:"
@@ -3620,7 +3861,7 @@ static const void *lt_preloaded_setup() {
3620 3861
3621 # Quote $echo for shipping. 3862 # Quote $echo for shipping.
3622 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then 3863 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3623 case "$0" in 3864 case $0 in
3624 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; 3865 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3625 *) qecho="$SHELL `pwd`/$0 --fallback-echo";; 3866 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
3626 esac 3867 esac
@@ -3859,7 +4100,7 @@ fi\
3859 # Add in members from convenience archives. 4100 # Add in members from convenience archives.
3860 for xlib in $addlibs; do 4101 for xlib in $addlibs; do
3861 # Extract the objects. 4102 # Extract the objects.
3862 case "$xlib" in 4103 case $xlib in
3863 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 4104 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3864 *) xabs=`pwd`"/$xlib" ;; 4105 *) xabs=`pwd`"/$xlib" ;;
3865 esac 4106 esac
@@ -3903,7 +4144,39 @@ fi\
3903# fi 4144# fi
3904# done 4145# done
3905 4146
3906 eval cmds=\"$old_archive_cmds\" 4147 eval cmds=\"$old_archive_cmds\"
4148
4149 if len=`expr "X$cmds" : ".*"` &&
4150 test $len -le $max_cmd_len; then
4151 :
4152 else
4153 # the command line is too long to link in one step, link in parts
4154 $echo "using piecewise archive linking..."
4155 save_RANLIB=$RANLIB
4156 RANLIB=:
4157 objlist=
4158 concat_cmds=
4159 save_oldobjs=$oldobjs
4160 for obj in $save_oldobjs
4161 do
4162 oldobjs="$objlist $obj"
4163 objlist="$objlist $obj"
4164 eval test_cmds=\"$old_archive_cmds\"
4165 if len=`expr "X$test_cmds" : ".*"` &&
4166 test $len -le $max_cmd_len; then
4167 :
4168 else
4169 # the above command should be used before it gets too long
4170 oldobjs=$objlist
4171 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4172 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
4173 objlist=
4174 fi
4175 done
4176 RANLIB=$save_RANLIB
4177 oldobjs=$objlist
4178 eval cmds=\"\$concat_cmds~$old_archive_cmds\"
4179 fi
3907 fi 4180 fi
3908 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 4181 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3909 for cmd in $cmds; do 4182 for cmd in $cmds; do
@@ -3920,7 +4193,7 @@ fi\
3920 fi 4193 fi
3921 4194
3922 # Now create the libtool archive. 4195 # Now create the libtool archive.
3923 case "$output" in 4196 case $output in
3924 *.la) 4197 *.la)
3925 old_library= 4198 old_library=
3926 test "$build_old_libs" = yes && old_library="$libname.$libext" 4199 test "$build_old_libs" = yes && old_library="$libname.$libext"
@@ -3952,7 +4225,7 @@ fi\
3952 # Replace all uninstalled libtool libraries with the installed ones 4225 # Replace all uninstalled libtool libraries with the installed ones
3953 newdependency_libs= 4226 newdependency_libs=
3954 for deplib in $dependency_libs; do 4227 for deplib in $dependency_libs; do
3955 case "$deplib" in 4228 case $deplib in
3956 *.la) 4229 *.la)
3957 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 4230 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3958 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 4231 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
@@ -4050,7 +4323,7 @@ relink_command=\"$relink_command\""
4050 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then 4323 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
4051 # Aesthetically quote it. 4324 # Aesthetically quote it.
4052 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` 4325 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4053 case "$arg" in 4326 case $arg in
4054 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4327 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4055 arg="\"$arg\"" 4328 arg="\"$arg\""
4056 ;; 4329 ;;
@@ -4066,7 +4339,7 @@ relink_command=\"$relink_command\""
4066 # The real first argument should be the name of the installation program. 4339 # The real first argument should be the name of the installation program.
4067 # Aesthetically quote it. 4340 # Aesthetically quote it.
4068 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 4341 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4069 case "$arg" in 4342 case $arg in
4070 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4343 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4071 arg="\"$arg\"" 4344 arg="\"$arg\""
4072 ;; 4345 ;;
@@ -4089,7 +4362,7 @@ relink_command=\"$relink_command\""
4089 continue 4362 continue
4090 fi 4363 fi
4091 4364
4092 case "$arg" in 4365 case $arg in
4093 -d) isdir=yes ;; 4366 -d) isdir=yes ;;
4094 -f) prev="-f" ;; 4367 -f) prev="-f" ;;
4095 -g) prev="-g" ;; 4368 -g) prev="-g" ;;
@@ -4114,7 +4387,7 @@ relink_command=\"$relink_command\""
4114 4387
4115 # Aesthetically quote the argument. 4388 # Aesthetically quote the argument.
4116 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 4389 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4117 case "$arg" in 4390 case $arg in
4118 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4391 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4119 arg="\"$arg\"" 4392 arg="\"$arg\""
4120 ;; 4393 ;;
@@ -4165,11 +4438,11 @@ relink_command=\"$relink_command\""
4165 exit 1 4438 exit 1
4166 fi 4439 fi
4167 fi 4440 fi
4168 case "$destdir" in 4441 case $destdir in
4169 [\\/]* | [A-Za-z]:[\\/]*) ;; 4442 [\\/]* | [A-Za-z]:[\\/]*) ;;
4170 *) 4443 *)
4171 for file in $files; do 4444 for file in $files; do
4172 case "$file" in 4445 case $file in
4173 *.lo) ;; 4446 *.lo) ;;
4174 *) 4447 *)
4175 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 4448 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
@@ -4191,7 +4464,7 @@ relink_command=\"$relink_command\""
4191 for file in $files; do 4464 for file in $files; do
4192 4465
4193 # Do each installation. 4466 # Do each installation.
4194 case "$file" in 4467 case $file in
4195 *.$libext) 4468 *.$libext)
4196 # Do the static libraries later. 4469 # Do the static libraries later.
4197 staticlibs="$staticlibs $file" 4470 staticlibs="$staticlibs $file"
@@ -4210,7 +4483,7 @@ relink_command=\"$relink_command\""
4210 old_library= 4483 old_library=
4211 relink_command= 4484 relink_command=
4212 # If there is no directory component, then add one. 4485 # If there is no directory component, then add one.
4213 case "$file" in 4486 case $file in
4214 */* | *\\*) . $file ;; 4487 */* | *\\*) . $file ;;
4215 *) . ./$file ;; 4488 *) . ./$file ;;
4216 esac 4489 esac
@@ -4306,7 +4579,7 @@ relink_command=\"$relink_command\""
4306 fi 4579 fi
4307 4580
4308 # Deduce the name of the destination old-style object file. 4581 # Deduce the name of the destination old-style object file.
4309 case "$destfile" in 4582 case $destfile in
4310 *.lo) 4583 *.lo)
4311 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` 4584 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4312 ;; 4585 ;;
@@ -4353,7 +4626,7 @@ relink_command=\"$relink_command\""
4353 relink_command= 4626 relink_command=
4354 4627
4355 # If there is no directory component, then add one. 4628 # If there is no directory component, then add one.
4356 case "$file" in 4629 case $file in
4357 */* | *\\*) . $file ;; 4630 */* | *\\*) . $file ;;
4358 *) . ./$file ;; 4631 *) . ./$file ;;
4359 esac 4632 esac
@@ -4370,7 +4643,7 @@ relink_command=\"$relink_command\""
4370 libdir= 4643 libdir=
4371 if test -f "$lib"; then 4644 if test -f "$lib"; then
4372 # If there is no directory component, then add one. 4645 # If there is no directory component, then add one.
4373 case "$lib" in 4646 case $lib in
4374 */* | *\\*) . $lib ;; 4647 */* | *\\*) . $lib ;;
4375 *) . ./$lib ;; 4648 *) . ./$lib ;;
4376 esac 4649 esac
@@ -4384,7 +4657,7 @@ relink_command=\"$relink_command\""
4384 4657
4385 relink_command= 4658 relink_command=
4386 # If there is no directory component, then add one. 4659 # If there is no directory component, then add one.
4387 case "$file" in 4660 case $file in
4388 */* | *\\*) . $file ;; 4661 */* | *\\*) . $file ;;
4389 *) . ./$file ;; 4662 *) . ./$file ;;
4390 esac 4663 esac
@@ -4563,7 +4836,7 @@ relink_command=\"$relink_command\""
4563 fi 4836 fi
4564 4837
4565 dir= 4838 dir=
4566 case "$file" in 4839 case $file in
4567 *.la) 4840 *.la)
4568 # Check to see that this really is a libtool archive. 4841 # Check to see that this really is a libtool archive.
4569 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 4842 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
@@ -4578,7 +4851,7 @@ relink_command=\"$relink_command\""
4578 library_names= 4851 library_names=
4579 4852
4580 # If there is no directory component, then add one. 4853 # If there is no directory component, then add one.
4581 case "$file" in 4854 case $file in
4582 */* | *\\*) . $file ;; 4855 */* | *\\*) . $file ;;
4583 *) . ./$file ;; 4856 *) . ./$file ;;
4584 esac 4857 esac
@@ -4633,13 +4906,13 @@ relink_command=\"$relink_command\""
4633 args= 4906 args=
4634 for file 4907 for file
4635 do 4908 do
4636 case "$file" in 4909 case $file in
4637 -*) ;; 4910 -*) ;;
4638 *) 4911 *)
4639 # Do a test to see if this is really a libtool program. 4912 # Do a test to see if this is really a libtool program.
4640 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4913 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4641 # If there is no directory component, then add one. 4914 # If there is no directory component, then add one.
4642 case "$file" in 4915 case $file in
4643 */* | *\\*) . $file ;; 4916 */* | *\\*) . $file ;;
4644 *) . ./$file ;; 4917 *) . ./$file ;;
4645 esac 4918 esac
@@ -4696,7 +4969,7 @@ relink_command=\"$relink_command\""
4696 4969
4697 for arg 4970 for arg
4698 do 4971 do
4699 case "$arg" in 4972 case $arg in
4700 -*) rm="$rm $arg" ;; 4973 -*) rm="$rm $arg" ;;
4701 *) files="$files $arg" ;; 4974 *) files="$files $arg" ;;
4702 esac 4975 esac
@@ -4708,6 +4981,8 @@ relink_command=\"$relink_command\""
4708 exit 1 4981 exit 1
4709 fi 4982 fi
4710 4983
4984 rmdirs=
4985
4711 for file in $files; do 4986 for file in $files; do
4712 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 4987 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4713 if test "X$dir" = "X$file"; then 4988 if test "X$dir" = "X$file"; then
@@ -4719,9 +4994,17 @@ relink_command=\"$relink_command\""
4719 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 4994 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4720 test $mode = uninstall && objdir="$dir" 4995 test $mode = uninstall && objdir="$dir"
4721 4996
4997 # Remember objdir for removal later, being careful to avoid duplicates
4998 if test $mode = clean; then
4999 case " $rmdirs " in
5000 *" $objdir "*) ;;
5001 *) rmdirs="$rmdirs $objdir" ;;
5002 esac
5003 fi
5004
4722 rmfiles="$file" 5005 rmfiles="$file"
4723 5006
4724 case "$name" in 5007 case $name in
4725 *.la) 5008 *.la)
4726 # Possibly a libtool archive, so verify it. 5009 # Possibly a libtool archive, so verify it.
4727 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 5010 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
@@ -4765,10 +5048,10 @@ relink_command=\"$relink_command\""
4765 5048
4766 *.lo) 5049 *.lo)
4767 # Possibly a libtool object, so verify it. 5050 # Possibly a libtool object, so verify it.
4768 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 5051 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4769 5052
4770 # Read the .lo file 5053 # Read the .lo file
4771 . ./$file 5054 . $dir/$name
4772 5055
4773 # Add PIC object to the list of files to remove. 5056 # Add PIC object to the list of files to remove.
4774 if test -n "$pic_object" \ 5057 if test -n "$pic_object" \
@@ -4801,6 +5084,15 @@ relink_command=\"$relink_command\""
4801 $show "$rm $rmfiles" 5084 $show "$rm $rmfiles"
4802 $run $rm $rmfiles 5085 $run $rm $rmfiles
4803 done 5086 done
5087
5088 # Try to remove the ${objdir}s in the directories where we deleted files
5089 for dir in $rmdirs; do
5090 if test -d "$dir"; then
5091 $show "rmdir $dir"
5092 $run rmdir $dir >/dev/null 2>&1
5093 fi
5094 done
5095
4804 exit 0 5096 exit 0
4805 ;; 5097 ;;
4806 5098
@@ -4817,7 +5109,7 @@ relink_command=\"$relink_command\""
4817fi # test -z "$show_help" 5109fi # test -z "$show_help"
4818 5110
4819# We need to display help for each of the modes. 5111# We need to display help for each of the modes.
4820case "$mode" in 5112case $mode in
4821"") $echo \ 5113"") $echo \
4822"Usage: $modename [OPTION]... [MODE-ARG]... 5114"Usage: $modename [OPTION]... [MODE-ARG]...
4823 5115
@@ -4956,6 +5248,7 @@ The following components of LINK-COMMAND are treated specially:
4956 -no-install link a not-installable executable 5248 -no-install link a not-installable executable
4957 -no-undefined declare that a library does not refer to external symbols 5249 -no-undefined declare that a library does not refer to external symbols
4958 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 5250 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
5251 -objectlist FILE Use a list of object files found in FILE to specify objects
4959 -release RELEASE specify package release information 5252 -release RELEASE specify package release information
4960 -rpath LIBDIR the created library will eventually be installed in LIBDIR 5253 -rpath LIBDIR the created library will eventually be installed in LIBDIR
4961 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 5254 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries