Changeset 605 for branches/GNU/src/binutils/ltmain.sh
- Timestamp:
- Aug 16, 2003, 6:41:03 PM (22 years ago)
- File:
-
- 1 edited
-
branches/GNU/src/binutils/ltmain.sh (modified) (163 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/ltmain.sh
-
Property cvs2svn:cvs-rev
changed from
1.1to1.1.1.2
r604 r605 2 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 6 # Originally by Gordon Matzigkeit <[email protected]>, 1996 6 7 # … … 55 56 PROGRAM=ltmain.sh 56 57 PACKAGE=libtool 57 VERSION=1.4a 58 TIMESTAMP=" (1.641.2. 122 2000/09/30 05:27:52)"58 VERSION=1.4a 59 TIMESTAMP=" (1.641.2.)" 59 60 60 61 default_mode= … … 107 108 lo2o="s/\\.lo\$/.${objext}/" 108 109 o2lo="s/\\.${objext}\$/.lo/" 110 109 111 110 112 # Parse our command line options once, thoroughly. … … 114 116 shift 115 117 116 case "$arg"in118 case in 117 119 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 118 120 *) optarg= ;; … … 121 123 # If the previous option needs an argument, assign it. 122 124 if test -n "$prev"; then 123 case "$prev"in125 case in 124 126 execute_dlfiles) 125 e val "$prev=\"\$$prev \$arg\""127 e" 126 128 ;; 127 129 tag) … … 129 131 130 132 # Check whether tagname contains only valid characters 131 case "$tagname"in133 case in 132 134 *[!-_A-Za-z0-9,/]*) 133 135 echo "$progname: invalid tag name: $tagname" 1>&2 … … 136 138 esac 137 139 138 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then 139 taglist="$taglist $tagname" 140 # Evaluate the configuration. 141 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" 142 else 143 echo "$progname: ignoring unknown tag $tagname" 1>&2 144 fi 140 case $tagname in 141 CC) 142 # Don't test for the "default" C tag, as we know, it's there, but 143 # not specially marked. 144 taglist="$taglist $tagname" 145 ;; 146 *) 147 if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then 148 taglist="$taglist $tagname" 149 # Evaluate the configuration. 150 eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" 151 else 152 echo "$progname: ignoring unknown tag $tagname" 1>&2 153 fi 154 ;; 155 esac 145 156 ;; 146 157 *) … … 155 166 156 167 # Have we seen a non-optional argument yet? 157 case "$arg"in168 case in 158 169 --help) 159 170 show_help=yes … … 238 249 fi 239 250 251 252 253 254 255 240 256 if test -z "$show_help"; then 241 257 242 258 # Infer the operation mode. 243 259 if test -z "$mode"; then 244 case "$nonopt"in260 case in 245 261 *cc | *++ | gcc* | *-gcc*) 246 262 mode=link 247 263 for arg 248 264 do 249 case "$arg"in265 case in 250 266 -c) 251 267 mode=compile … … 292 308 293 309 # These modes are in order of execution frequency so that they run quickly. 294 case "$mode"in310 case in 295 311 # libtool compile mode 296 312 compile) … … 306 322 for arg 307 323 do 308 case "$prev"in324 case in 309 325 "") ;; 310 326 xcompiler) … … 313 329 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 314 330 315 case "$arg"in331 case in 316 332 # Double-quote args containing other shell metacharacters. 317 333 # Many Bourne shells cannot handle close brackets correctly … … 333 349 334 350 # Accept any command-line options. 335 case "$arg"in351 case in 336 352 -o) 337 353 if test "$user_target" != "no"; then … … 372 388 # Many Bourne shells cannot handle close brackets correctly 373 389 # in scan sets, so we specify it separately. 374 case "$arg"in390 case in 375 391 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 376 392 arg="\"$arg\"" … … 392 408 esac 393 409 394 case "$user_target"in410 case in 395 411 next) 396 412 # The next one is the -o target name … … 420 436 # Many Bourne shells cannot handle close brackets correctly 421 437 # in scan sets, so we specify it separately. 422 case "$lastarg"in438 case in 423 439 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 424 440 lastarg="\"$lastarg\"" … … 434 450 done 435 451 436 case "$user_target"in452 case in 437 453 set) 438 454 ;; … … 450 466 # If the user specifies -o file.o, it is replaced with file.lo 451 467 xform='[cCFSfmso]' 452 case "$libobj"in468 case in 453 469 *.ada) xform=ada ;; 454 470 *.adb) xform=adb ;; … … 467 483 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 468 484 469 case "$libobj"in485 case in 470 486 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 471 487 *) … … 545 561 546 562 # On Cygwin there's no "real" PIC flag so we must build both object types 547 case "$host_os"in563 case in 548 564 cygwin* | mingw* | pw32* | os2*) 549 565 pic_mode=default … … 778 794 link | relink) 779 795 modename="$modename: link" 780 case "$host"in796 case in 781 797 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 782 798 # It is impossible to link a dll without this setting, and … … 844 860 for arg 845 861 do 846 case "$arg"in862 case in 847 863 -all-static | -static) 848 864 if test "X$arg" = "X-all-static"; then … … 874 890 base_compile="$base_compile $arg" 875 891 shift 876 case "$arg"in892 case in 877 893 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 878 894 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test … … 884 900 # If the previous option needs an argument, assign it. 885 901 if test -n "$prev"; then 886 case "$prev"in902 case in 887 903 output) 888 904 compile_command="$compile_command @OUTPUT@" … … 891 907 esac 892 908 893 case "$prev"in909 case in 894 910 dlfiles|dlprefiles) 895 911 if test "$preload" = no; then … … 899 915 preload=yes 900 916 fi 901 case "$arg"in917 case in 902 918 *.la | *.lo) ;; # We handle these cases below. 903 919 force) … … 951 967 continue 952 968 ;; 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 953 1076 rpath | xrpath) 954 1077 # We need an absolute path. 955 case "$arg"in1078 case in 956 1079 [\\/]* | [A-Za-z]:[\\/]*) ;; 957 1080 *) … … 995 1118 ;; 996 1119 esac 997 fi 1120 fi 998 1121 999 1122 prevarg="$arg" 1000 1123 1001 case "$arg"in1124 case in 1002 1125 -all-static) 1003 1126 if test -n "$link_static_flag"; then … … 1036 1159 -export-symbols | -export-symbols-regex) 1037 1160 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1038 $echo "$modename: not more than one -exported-symbols argument allowed"1161 $echo "$modename: t allowed" 1039 1162 exit 1 1040 1163 fi … … 1058 1181 continue 1059 1182 ;; 1060 1183 1061 1184 -L*) 1062 1185 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1063 1186 # We need an absolute path. 1064 case "$dir"in1187 case in 1065 1188 [\\/]* | [A-Za-z]:[\\/]*) ;; 1066 1189 *) … … 1080 1203 ;; 1081 1204 esac 1082 case "$host"in1205 case in 1083 1206 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1084 case ":$dllsearchpath:"in1207 case in 1085 1208 *":$dir:"*) ;; 1086 1209 *) dllsearchpath="$dllsearchpath:$dir";; … … 1092 1215 1093 1216 -l*) 1094 if test " $arg" = "-lc"; then1095 case "$host"in1096 *-*-cygwin* | *-*- mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)1097 # These systems don't actually have clibrary (as such)1217 if test ""; then 1218 case in 1219 *-*-cygwin* | *-*-2* | *-*-beos*) 1220 # These systems don't actually have library (as such) 1098 1221 continue 1099 1222 ;; 1100 esac 1101 elif test "$arg" = "-lm"; then 1102 case "$host" in 1103 *-*-cygwin* | *-*-pw32* | *-*-beos*) 1104 # These systems don't actually have math library (as such) 1105 continue 1223 *-*-mingw* | *-*-os2*) 1224 # These systems don't actually have a C library (as such) 1225 test "X$arg" = "X-lc" && continue 1106 1226 ;; 1107 1227 esac … … 1122 1242 1123 1243 -no-install) 1124 case "$host"in1244 case in 1125 1245 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1126 1246 # The PATH hackery in wrapper scripts is required on Windows … … 1130 1250 fast_install=no 1131 1251 ;; 1132 *-*-rhapsody*) 1133 # rhapsody is a little odd... 1134 deplibs="$deplibs -framework System" 1135 ;; 1136 *) 1137 no_install=yes 1138 ;; 1252 *) no_install=yes ;; 1139 1253 esac 1140 1254 continue … … 1146 1260 ;; 1147 1261 1262 1263 1264 1265 1266 1148 1267 -o) prev=output ;; 1149 1268 … … 1166 1285 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` 1167 1286 # We need an absolute path. 1168 case "$dir"in1287 case in 1169 1288 [\\/]* | [A-Za-z]:[\\/]*) ;; 1170 1289 *) … … 1181 1300 1182 1301 -static) 1183 # The effects of -static are defined in a previous loop.1302 # The effects of -static are defined in a previous loop. 1184 1303 # We used to do the same as -all-static on platforms that 1185 1304 # didn't have a PIC flag, but the assumption that the effects … … 1205 1324 for flag in $args; do 1206 1325 IFS="$save_ifs" 1207 case "$flag"in1326 case in 1208 1327 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1209 1328 flag="\"$flag\"" … … 1223 1342 for flag in $args; do 1224 1343 IFS="$save_ifs" 1225 case "$flag"in1344 case in 1226 1345 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1227 1346 flag="\"$flag\"" … … 1251 1370 # to be aesthetically quoted because they are evaled later. 1252 1371 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1253 case "$arg"in1372 case in 1254 1373 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1255 1374 arg="\"$arg\"" … … 1273 1392 # Read the .lo file 1274 1393 # If there is no directory component, then add one. 1275 case "$arg"in1394 case in 1276 1395 */* | *\\*) . $arg ;; 1277 1396 *) . ./$arg ;; … … 1385 1504 # to be aesthetically quoted because they are evaled later. 1386 1505 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1387 case "$arg"in1506 case in 1388 1507 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1389 1508 arg="\"$arg\"" … … 1391 1510 esac 1392 1511 ;; 1393 esac 1512 esac 1394 1513 1395 1514 # Now actually substitute the argument into the commands. … … 1398 1517 finalize_command="$finalize_command $arg" 1399 1518 fi 1400 done 1519 done 1401 1520 1402 1521 if test -n "$prev"; then … … 1456 1575 fi 1457 1576 1458 oldlibs=1459 1577 # calculate the name of the file, without its directory 1460 1578 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` … … 1487 1605 1488 1606 # Determine the type of output 1489 case "$output"in1607 case in 1490 1608 "") 1491 1609 $echo "$modename: you must specify an output file" 1>&2 … … 1512 1630 if test $linkmode = lib; then 1513 1631 libs="$predeps $libs $compiler_lib_search_path $postdeps" 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1514 1644 fi 1515 1645 … … 1518 1648 newlib_search_path= 1519 1649 need_relink=no # whether we're linking any uninstalled libtool libraries 1520 uninst_deplibs= # uninstalled libtool libraries1521 uninst_path= # paths that contain uninstalled libtool libraries1650 installed libtool libraries 1651 installed libtool libraries 1522 1652 case $linkmode in 1523 1653 lib) 1524 1654 passes="conv link" 1525 1655 for file in $dlfiles $dlprefiles; do 1526 case "$file"in1656 case in 1527 1657 *.la) ;; 1528 1658 *) … … 1541 1671 passes="conv scan dlopen dlpreopen link" 1542 1672 ;; 1543 *) passes="conv"1673 *)passes="conv" 1544 1674 ;; 1545 1675 esac 1546 1676 for pass in $passes; do 1547 if test "$linkmode,$pass" = "lib,link" ||1548 test "$linkmode,$pass" = "prog,scan"; then1549 libs="$deplibs"1550 deplibs=1551 fi1552 1677 if test $linkmode = prog; then 1678 1553 1679 case $pass in 1554 dlopen) libs="$dlfiles" ;; 1680 dlopen) 1681 libs="$dlfiles" 1682 save_deplibs="$deplibs" # Collect dlpreopened libraries 1683 deplibs= 1684 ;; 1555 1685 dlpreopen) libs="$dlprefiles" ;; 1556 1686 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 1557 1687 esac 1558 1688 fi 1559 if test $pass = dlopen; then1560 # Collect dlpreopened libraries1561 save_deplibs="$deplibs"1562 deplibs=1563 fi1564 1689 for deplib in $libs; do 1565 1690 lib= 1566 1691 found=no 1567 case "$deplib"in1692 case in 1568 1693 -l*) 1569 if test $linkmode != lib && test $linkmode != prog; then1570 $echo "$modename: warning: \`-l' is ignored for archives/objects " 1>&21694 if test $linkmode ; then 1695 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 1571 1696 continue 1572 1697 fi … … 1585 1710 done 1586 1711 if test "$found" != yes; then 1712 1587 1713 if test "$linkmode,$pass" = "prog,link"; then 1588 1714 compile_deplibs="$deplib $compile_deplibs" … … 1594 1720 continue 1595 1721 fi 1596 ;; 1722 ;; 1597 1723 -L*) 1598 1724 case $linkmode in … … 1617 1743 ;; 1618 1744 *) 1619 $echo "$modename: warning: \`-L' is ignored for archives/objects " 1>&21745 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 1620 1746 ;; 1621 esac 1747 esac 1622 1748 continue 1623 ;; 1749 ;; 1624 1750 -R*) 1625 1751 if test $pass = link; then … … 1665 1791 continue 1666 1792 ;; 1667 esac 1668 ;; 1793 esac 1794 ;; 1669 1795 *.lo | *.$objext) 1670 if test $pass = conv; then 1671 deplibs="$deplib $deplibs" 1672 elif test $linkmode = prog; then 1673 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1674 # If there is no dlopen support or we're linking statically, 1675 # we need to preload. 1676 newdlprefiles="$newdlprefiles $deplib" 1677 compile_deplibs="$deplib $compile_deplibs" 1678 finalize_deplibs="$deplib $finalize_deplibs" 1679 else 1680 newdlfiles="$newdlfiles $deplib" 1681 fi 1796 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1797 # If there is no dlopen support or we're linking statically, 1798 # we need to preload. 1799 newdlprefiles="$newdlprefiles $deplib" 1800 compile_deplibs="$deplib $compile_deplibs" 1801 finalize_deplibs="$deplib $finalize_deplibs" 1802 else 1803 newdlfiles="$newdlfiles $deplib" 1682 1804 fi 1683 1805 continue … … 1687 1809 continue 1688 1810 ;; 1689 esac 1811 esac 1690 1812 if test $found = yes || test -f "$lib"; then : 1691 1813 else … … 1715 1837 1716 1838 # Read the .la file 1717 case "$lib"in1839 case in 1718 1840 */* | *\\*) . $lib ;; 1719 1841 *) . ./$lib ;; … … 1722 1844 if test "$linkmode,$pass" = "lib,link" || 1723 1845 test "$linkmode,$pass" = "prog,scan" || 1724 { test $linkmode != prog && test $linkmode != lib; }; then 1846 { test $linkmode = oldlib && test $linkmode = obj; }; then 1847 # Add dl[pre]opened files of deplib 1725 1848 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 1726 1849 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" … … 1728 1851 1729 1852 if test $pass = conv; then 1730 # only check for convenience libraries1853 # nly check for convenience libraries 1731 1854 deplibs="$lib $deplibs" 1732 1855 if test -z "$libdir"; then … … 1751 1874 fi 1752 1875 continue 1753 fi 1876 fi 1754 1877 1755 1878 # Get the name of the library we link against. … … 1770 1893 fi 1771 1894 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,1773 # we need to preload.1895 # If there is no dlname, no dlopen support or we're linking 1896 # we need to preload. 1774 1897 dlprefiles="$dlprefiles $lib" 1775 1898 else … … 1777 1900 fi 1778 1901 continue 1779 fi 1902 fi 1780 1903 1781 1904 # We need an absolute path. 1782 case "$ladir"in1905 case in 1783 1906 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; 1784 1907 *) … … 1808 1931 absdir="$abs_ladir/$objdir" 1809 1932 # Remove this search path later 1810 uninst_path="$uninst_path $abs_ladir"1811 fi 1933 inst_path $abs_ladir" 1934 fi 1812 1935 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 1813 1936 … … 1828 1951 newdlprefiles="$newdlprefiles $dir/$linklib" 1829 1952 fi 1830 fi 1953 fi 1831 1954 1832 1955 if test -z "$libdir"; then 1833 # link the convenience library1956 # ink the convenience library 1834 1957 if test $linkmode = lib; then 1835 1958 deplibs="$dir/$old_library $deplibs" … … 1838 1961 finalize_deplibs="$dir/$old_library $finalize_deplibs" 1839 1962 else 1840 deplibs="$lib $deplibs" # used for prog,scan pass1963 deplibs="$lib $deplibs" 1841 1964 fi 1842 1965 continue … … 1855 1978 tmp_libs= 1856 1979 for deplib in $dependency_libs; do 1857 case "$deplib"in1980 case in 1858 1981 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 1859 1982 esac … … 1870 1993 esac 1871 1994 tmp_libs="$tmp_libs $deplib" 1872 done 1995 done 1873 1996 continue 1874 fi 1875 1876 if test "$linkmode,$pass" = "prog,link"; then 1877 if test -n "$library_names" && 1878 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1879 # We need to hardcode the library path 1880 if test -n "$shlibpath_var"; then 1881 # Make sure the rpath contains only unique directories. 1882 case "$temp_rpath " in 1883 *" $dir "*) ;; 1884 *" $absdir "*) ;; 1885 *) temp_rpath="$temp_rpath $dir" ;; 1886 esac 1887 fi 1888 1889 # Hardcode the library path. 1890 # Skip directories that are in the system default run-time 1891 # search path. 1892 case " $sys_lib_dlsearch_path " in 1893 *" $absdir "*) ;; 1894 *) 1895 case "$compile_rpath " in 1896 *" $absdir "*) ;; 1897 *) compile_rpath="$compile_rpath $absdir" 1898 esac 1899 ;; 1900 esac 1901 1902 case " $sys_lib_dlsearch_path " in 1903 *" $libdir "*) ;; 1904 *) 1905 case "$finalize_rpath " in 1906 *" $libdir "*) ;; 1907 *) finalize_rpath="$finalize_rpath $libdir" 1908 esac 1909 ;; 1910 esac 1911 fi 1912 1913 if test "$alldeplibs" = yes && 1914 { test "$deplibs_check_method" = pass_all || 1915 { test "$build_libtool_libs" = yes && 1916 test -n "$library_names"; }; }; then 1917 # We only need to search for static libraries 1918 continue 1919 fi 1920 fi 1997 fi # $linkmode = prog... 1921 1998 1922 1999 link_static=no # Whether the deplib will be linked statically 1923 2000 if test -n "$library_names" && 1924 2001 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1925 if test "$installed" = no; then 1926 uninst_deplibs="$uninst_deplibs $lib" 1927 need_relink=yes 1928 fi 1929 # This is a shared library 1930 if test $linkmode = lib && 1931 test $hardcode_into_libs = yes; then 2002 # Link against this shared library 2003 2004 if test "$linkmode,$pass" = "prog,link" || 2005 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then 1932 2006 # Hardcode the library path. 1933 2007 # Skip directories that are in the system default run-time … … 1951 2025 ;; 1952 2026 esac 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 1953 2051 fi 1954 2052 … … 1959 2057 shift; shift 1960 2058 libname=`eval \\$echo \"$libname_spec\"` 1961 if test -n "$soname_spec"; then 2059 # use dlname if we got it. it's perfectly good, no? 2060 if test -n "$dlname"; then 2061 soname="$dlname" 2062 elif test -n "$soname_spec"; then 2063 # bleh windows 2064 case $host in 2065 *cygwin*) 2066 major=`expr $current - $age` 2067 versuffix="-$major" 2068 ;; 2069 esac 1962 2070 eval soname=\"$soname_spec\" 1963 2071 else … … 1966 2074 1967 2075 # Make a new name for the extract_expsyms_cmds to use 2076 2077 1968 2078 newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" 1969 2079 … … 1997 2107 dir=$output_objdir 1998 2108 linklib=$newlib 1999 fi 2109 fi 2000 2110 2001 2111 if test $linkmode = prog || test "$mode" != relink; then … … 2004 2114 add= 2005 2115 lib_linked=yes 2006 case "$hardcode_action"in2116 case in 2007 2117 immediate | unsupported) 2008 2118 if test "$hardcode_direct" = no; then 2009 2119 add="$dir/$linklib" 2010 2120 elif test "$hardcode_minus_L" = no; then 2011 case "$host"in2121 case in 2012 2122 *-*-sunos*) add_shlibpath="$dir" ;; 2013 2123 esac … … 2043 2153 2044 2154 if test -n "$add_shlibpath"; then 2045 case ":$compile_shlibpath:"in2155 case in 2046 2156 *":$add_shlibpath:"*) ;; 2047 2157 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; … … 2057 2167 test "$hardcode_minus_L" != yes && \ 2058 2168 test "$hardcode_shlibpath_var" = yes; then 2059 case ":$finalize_shlibpath:"in2169 case in 2060 2170 *":$libdir:"*) ;; 2061 2171 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; … … 2076 2186 add="-l$name" 2077 2187 elif test "$hardcode_shlibpath_var" = yes; then 2078 case ":$finalize_shlibpath:"in2188 case in 2079 2189 *":$libdir:"*) ;; 2080 2190 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; … … 2096 2206 fi 2097 2207 elif test $linkmode = prog; then 2208 2209 2210 2211 2212 2213 2214 2215 2216 2098 2217 # Here we assume that one of hardcode_direct or hardcode_minus_L 2099 2218 # is not unsupported. This is valid on all known static and … … 2112 2231 # We're trying link a shared library against a static one 2113 2232 # but the system doesn't support it. 2233 2114 2234 # Just print a warning and add the library to dependency_libs so 2115 2235 # that the program can be linked against the static library. … … 2119 2239 echo "*** you link to this library. But I can only do this if you have a" 2120 2240 echo "*** shared version of the library, which you do not appear to have." 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2121 2258 else 2122 2259 convenience="$convenience $dir/$old_library" … … 2125 2262 link_static=yes 2126 2263 fi 2127 fi 2264 fi 2128 2265 2129 2266 if test $linkmode = lib; then … … 2134 2271 temp_deplibs= 2135 2272 for libdir in $dependency_libs; do 2136 case "$libdir"in2273 case in 2137 2274 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` 2138 2275 case " $xrpath " in … … 2162 2299 # Add the search paths of all dependency libraries 2163 2300 for deplib in $dependency_libs; do 2164 case "$deplib"in2301 case in 2165 2302 -L*) path="$deplib" ;; 2166 2303 *.la) … … 2168 2305 test "X$dir" = "X$deplib" && dir="." 2169 2306 # We need an absolute path. 2170 case "$dir"in2307 case in 2171 2308 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; 2172 2309 *) … … 2199 2336 esac 2200 2337 done 2201 fi 2202 fi 2203 done 2204 dependency_libs="$newdependency_libs" 2338 fi # link_all_deplibs != no 2339 fi # linkmode = lib 2340 done # for deplib in $libs 2205 2341 if test $pass = dlpreopen; then 2206 2342 # Link the dlpreopened libraries before other libraries … … 2210 2346 fi 2211 2347 if test $pass != dlopen; then 2348 2212 2349 if test $pass != conv; then 2213 2350 # Make sure lib_search_path contains only unique directories. … … 2228 2365 fi 2229 2366 for var in $vars dependency_libs; do 2230 # Make sure that $var contains only unique libraries 2231 # and add them in reverse order 2367 # Add libraries to $var in reverse order 2232 2368 eval tmp_libs=\"\$$var\" 2233 2369 new_libs= 2234 2370 for deplib in $tmp_libs; do 2235 case "$deplib"in2371 case in 2236 2372 -L*) new_libs="$deplib $new_libs" ;; 2237 2373 *) … … 2250 2386 tmp_libs= 2251 2387 for deplib in $new_libs; do 2252 case "$deplib"in2388 case in 2253 2389 -L*) 2254 2390 case " $tmp_libs " in … … 2261 2397 done 2262 2398 eval $var=\"$tmp_libs\" 2263 done 2264 fi 2265 done 2399 done # for var 2400 fi 2401 if test "$pass" = "conv" && 2402 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then 2403 libs="$deplibs" # reset libs 2404 deplibs= 2405 fi 2406 done # for pass 2266 2407 if test $linkmode = prog; then 2267 2408 dlfiles="$newdlfiles" … … 2271 2412 case $linkmode in 2272 2413 oldlib) 2273 if test -n "$deplibs"; then2274 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&22275 fi2276 2277 2414 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 2278 2415 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 … … 2307 2444 lib) 2308 2445 # Make sure we only generate libraries of the form `libNAME.la'. 2309 case "$outputname"in2446 case in 2310 2447 lib*) 2311 2448 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` … … 2387 2524 2388 2525 # Check that each of the things are valid numbers. 2389 case "$current"in2390 0 | [1-9] | [1-9][0-9] *) ;;2526 case in 2527 0 | [1-9] | [1-9][0-9]) ;; 2391 2528 *) 2392 2529 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 … … 2396 2533 esac 2397 2534 2398 case "$revision"in2399 0 | [1-9] | [1-9][0-9] *) ;;2535 case in 2536 0 | [1-9] | [1-9][0-9]) ;; 2400 2537 *) 2401 2538 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 … … 2405 2542 esac 2406 2543 2407 case "$age"in2408 0 | [1-9] | [1-9][0-9] *) ;;2544 case in 2545 0 | [1-9] | [1-9][0-9]) ;; 2409 2546 *) 2410 2547 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 … … 2424 2561 versuffix= 2425 2562 verstring= 2426 case "$version_type"in2563 case in 2427 2564 none) ;; 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2428 2585 2429 2586 irix) … … 2469 2626 major=".$current" 2470 2627 versuffix=".$current.$revision" 2471 ;;2472 2473 freebsd-aout)2474 major=".$current"2475 versuffix=".$current.$revision";2476 ;;2477 2478 freebsd-elf)2479 major=".$current"2480 versuffix=".$current";2481 2628 ;; 2482 2629 … … 2532 2679 tempremovelist=`echo "$output_objdir/*"` 2533 2680 for p in $tempremovelist; do 2534 case "$p"in2681 case in 2535 2682 *.$objext) 2536 2683 ;; … … 2556 2703 2557 2704 # Eliminate all temporary directories. 2558 for path in $ uninst_path; do2705 for path in $inst_path; do 2559 2706 lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` 2560 2707 deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` … … 2599 2746 if test "$build_libtool_libs" = yes; then 2600 2747 if test -n "$rpath"; then 2601 case "$host"in2748 case in 2602 2749 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) 2603 2750 # these systems don't actually have a c library (as such)! 2604 2751 ;; 2752 2753 2754 2755 2756 2757 2758 2605 2759 *) 2606 # Add libc to deplibs on all other systems if necessary.2607 if test $build_libtool_need_lc = "yes"; then2608 deplibs="$deplibs -lc"2609 fi2760 # Add libc to deplibs on all other systems if necessary. 2761 if test $build_libtool_need_lc = "yes"; then 2762 deplibs="$deplibs -lc" 2763 fi 2610 2764 ;; 2611 2765 esac … … 2626 2780 newdeplibs= 2627 2781 droppeddeps=no 2628 case "$deplibs_check_method"in2782 case in 2629 2783 pass_all) 2630 2784 # Don't check for shared/static. Everything works. … … 2651 2805 name="`expr $i : '-l\(.*\)'`" 2652 2806 # If $name is empty we are operating on a -L argument. 2653 if test "$name" != ""; then2807 if test ; then 2654 2808 libname=`eval \\$echo \"$libname_spec\"` 2655 2809 deplib_matches=`eval \\$echo \"$library_names_spec\"` … … 2676 2830 name="`expr $i : '-l\(.*\)'`" 2677 2831 # If $name is empty we are operating on a -L argument. 2678 if test "$name" != ""; then2832 if test ; then 2679 2833 $rm conftest 2680 2834 $LTCC -o conftest conftest.c $i … … 2716 2870 name="`expr $a_deplib : '-l\(.*\)'`" 2717 2871 # If $name is empty we are operating on a -L argument. 2718 if test "$name" != ""; then2872 if test ; then 2719 2873 libname=`eval \\$echo \"$libname_spec\"` 2720 2874 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do … … 2734 2888 while test -h "$potlib" 2>/dev/null; do 2735 2889 potliblink=`ls -ld $potlib | sed 's/.* -> //'` 2736 case "$potliblink"in2890 case in 2737 2891 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 2738 2892 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; … … 2747 2901 fi 2748 2902 done 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2749 2937 done 2750 2938 if test -n "$a_deplib" ; then … … 2784 2972 name=$name_save 2785 2973 2974 2975 2976 2977 2978 2979 2980 2786 2981 if test "$droppeddeps" = yes; then 2787 2982 if test "$module" = yes; then … … 2809 3004 echo "*** automatically added whenever a program is linked with this library" 2810 3005 echo "*** or is declared to -dlopen it." 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 2811 3021 fi 2812 3022 fi … … 2835 3045 else 2836 3046 # Just accumulate the unique libdirs. 2837 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator"in3047 case in 2838 3048 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 2839 3049 ;; … … 2888 3098 soname="$realname" 2889 3099 fi 3100 2890 3101 2891 3102 lib="$output_objdir/$realname" … … 2944 3155 if test -n "$convenience"; then 2945 3156 if test -n "$whole_archive_flag_spec"; then 3157 2946 3158 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 2947 3159 else … … 2959 3171 for xlib in $convenience; do 2960 3172 # Extract the objects. 2961 case "$xlib"in3173 case in 2962 3174 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 2963 3175 *) xabs=`pwd`"/$xlib" ;; … … 2998 3210 eval cmds=\"$archive_cmds\" 2999 3211 fi 3000 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3001 for cmd in $cmds; do 3002 IFS="$save_ifs" 3003 $show "$cmd" 3004 $run eval "$cmd" || exit $? 3005 done 3006 IFS="$save_ifs" 3212 if len=`expr "X$cmds" : ".*"` && 3213 test $len -le $max_cmd_len; then 3214 : 3215 else 3216 # The command line is too long to link in one step, link piecewise. 3217 $echo "creating reloadable object files..." 3218 3219 # Save the value of $output and $libobjs because we want to 3220 # use them later. If we have whole_archive_flag_spec, we 3221 # want to use save_libobjs as it was before 3222 # whole_archive_flag_spec was expanded, because we can't 3223 # assume the linker understands whole_archive_flag_spec. 3224 # This may have to be revisited, in case too many 3225 # convenience libraries get linked in and end up exceeding 3226 # the spec. 3227 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 3228 save_libobjs=$libobjs 3229 fi 3230 save_output=$output 3231 3232 # Clear the reloadable object creation command queue and 3233 # initialize k to one. 3234 test_cmds= 3235 concat_cmds= 3236 objlist= 3237 delfiles= 3238 last_robj= 3239 k=1 3240 output=$output_objdir/$save_output-${k}.$objext 3241 # Loop over the list of objects to be linked. 3242 for obj in $save_libobjs 3243 do 3244 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 3245 if test "X$objlist" = X || 3246 { len=`expr "X$test_cmds" : ".*"` && 3247 test $len -le $max_cmd_len; }; then 3248 objlist="$objlist $obj" 3249 else 3250 # The command $test_cmds is almost too long, add a 3251 # command to the queue. 3252 if test $k -eq 1 ; then 3253 # The first file doesn't have a previous command to add. 3254 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" 3255 else 3256 # All subsequent reloadable object files will link in 3257 # the last one created. 3258 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" 3259 fi 3260 last_robj=$output_objdir/$save_output-${k}.$objext 3261 k=`expr $k + 1` 3262 output=$output_objdir/$save_output-${k}.$objext 3263 objlist=$obj 3264 len=1 3265 fi 3266 done 3267 # Handle the remaining objects by creating one last 3268 # reloadable object file. All subsequent reloadable object 3269 # files will link in the last one created. 3270 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 3271 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" 3272 3273 # Set up a command to remove the reloadale object files 3274 # after they are used. 3275 i=0 3276 while test $i -lt $k 3277 do 3278 i=`expr $i + 1` 3279 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 3280 done 3281 3282 $echo "creating a temporary reloadable object file: $output" 3283 3284 # Loop through the commands generated above and execute them. 3285 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3286 for cmd in $concat_cmds; do 3287 IFS="$save_ifs" 3288 $show "$cmd" 3289 $run eval "$cmd" || exit $? 3290 done 3291 IFS="$save_ifs" 3292 3293 libobjs=$output 3294 # Restore the value of output. 3295 output=$save_output 3296 3297 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then 3298 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3299 fi 3300 # Expand the library linking commands again to reset the 3301 # value of $libobjs for piecewise linking. 3302 3303 # Do each of the archive commands. 3304 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3305 eval cmds=\"$archive_expsym_cmds\" 3306 else 3307 eval cmds=\"$archive_cmds\" 3308 fi 3309 3310 # Append the command to remove the reloadable object files 3311 # to the just-reset $cmds. 3312 eval cmds=\"\$cmds~$rm $delfiles\" 3313 fi 3314 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' 3315 for cmd in $cmds; do 3316 IFS="$save_ifs" 3317 $show "$cmd" 3318 $run eval "$cmd" || exit $? 3319 done 3320 IFS="$save_ifs" 3007 3321 3008 3322 # Restore the uninstalled library and exit … … 3053 3367 fi 3054 3368 3055 case "$output"in3369 case in 3056 3370 *.lo) 3057 3371 if test -n "$objs$old_deplibs"; then … … 3098 3412 for xlib in $convenience; do 3099 3413 # Extract the objects. 3100 case "$xlib"in3414 case in 3101 3415 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3102 3416 *) xabs=`pwd`"/$xlib" ;; … … 3194 3508 3195 3509 prog) 3510 3511 3512 3196 3513 if test -n "$vinfo"; then 3197 3514 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 … … 3208 3525 fi 3209 3526 fi 3527 3528 3529 3530 3531 3532 3533 3534 3210 3535 3211 3536 compile_command="$compile_command $compile_deplibs" … … 3233 3558 else 3234 3559 # Just accumulate the unique libdirs. 3235 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator"in3560 case in 3236 3561 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 3237 3562 ;; … … 3251 3576 esac 3252 3577 fi 3253 case "$host"in3578 case in 3254 3579 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 3255 case ":$dllsearchpath:"in3580 case in 3256 3581 *":$libdir:"*) ;; 3257 3582 *) dllsearchpath="$dllsearchpath:$libdir";; … … 3277 3602 else 3278 3603 # Just accumulate the unique libdirs. 3279 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator"in3604 case in 3280 3605 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) 3281 3606 ;; … … 3314 3639 3315 3640 if test -n "$dlsyms"; then 3316 case "$dlsyms"in3641 case in 3317 3642 "") ;; 3318 3643 *.c) … … 3445 3770 3446 3771 pic_flag_for_symtable= 3447 case "$host"in3772 case in 3448 3773 # compiling the symbol table file with pic_flag works around 3449 3774 # a FreeBSD bug that causes programs to crash when -lm is … … 3513 3838 rpath= 3514 3839 for dir in $temp_rpath; do 3515 case "$dir"in3840 case in 3516 3841 [\\/]* | [A-Za-z]:[\\/]*) 3517 3842 # Absolute path. … … 3621 3946 # Quote $echo for shipping. 3622 3947 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then 3623 case "$0"in3948 case in 3624 3949 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; 3625 3950 *) qecho="$SHELL `pwd`/$0 --fallback-echo";; … … 3636 3961 case $output in 3637 3962 *.exe) output=`echo $output|sed 's,.exe$,,'` ;; 3963 3964 3965 3966 3967 3638 3968 esac 3639 3969 $rm $output … … 3666 3996 if test \"\$libtool_install_magic\" = \"$magic\"; then 3667 3997 # install mode needs the following variable: 3668 uninst_deplibs='$uninst_deplibs'3998 inst_deplibs' 3669 3999 else 3670 4000 # When we are sourced in execute mode, \$file and \$echo are already set. … … 3715 4045 if test "$fast_install" = yes; then 3716 4046 echo >> $output "\ 3717 program=lt-'$outputname' 4047 program=lt-'$outputname' 3718 4048 progdir=\"\$thisdir/$objdir\" 3719 4049 … … 3734 4064 # relink executable if necessary 3735 4065 if test -n \"\$relink_command\"; then 3736 if (eval \$relink_command); then :4066 if ; then : 3737 4067 else 4068 3738 4069 $rm \"\$progdir/\$file\" 3739 4070 exit 1 … … 3860 4191 for xlib in $addlibs; do 3861 4192 # Extract the objects. 3862 case "$xlib"in4193 case in 3863 4194 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3864 4195 *) xabs=`pwd`"/$xlib" ;; … … 3904 4235 # done 3905 4236 3906 eval cmds=\"$old_archive_cmds\" 4237 eval cmds=\"$old_archive_cmds\" 4238 4239 if len=`expr "X$cmds" : ".*"` && 4240 test $len -le $max_cmd_len; then 4241 : 4242 else 4243 # the command line is too long to link in one step, link in parts 4244 $echo "using piecewise archive linking..." 4245 save_RANLIB=$RANLIB 4246 RANLIB=: 4247 objlist= 4248 concat_cmds= 4249 save_oldobjs=$oldobjs 4250 for obj in $save_oldobjs 4251 do 4252 oldobjs="$objlist $obj" 4253 objlist="$objlist $obj" 4254 eval test_cmds=\"$old_archive_cmds\" 4255 if len=`expr "X$test_cmds" : ".*"` && 4256 test $len -le $max_cmd_len; then 4257 : 4258 else 4259 # the above command should be used before it gets too long 4260 oldobjs=$objlist 4261 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 4262 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 4263 objlist= 4264 fi 4265 done 4266 RANLIB=$save_RANLIB 4267 oldobjs=$objlist 4268 eval cmds=\"\$concat_cmds~$old_archive_cmds\" 4269 fi 3907 4270 fi 3908 4271 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' … … 3921 4284 3922 4285 # Now create the libtool archive. 3923 case "$output"in4286 case in 3924 4287 *.la) 3925 4288 old_library= … … 3939 4302 done 3940 4303 # Quote the link command for shipping. 3941 relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" 4304 tagopts= 4305 for tag in $taglist; do 4306 tagopts="$tagopts --tag $tag" 4307 done 4308 relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)" 3942 4309 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 3943 4310 … … 3953 4320 newdependency_libs= 3954 4321 for deplib in $dependency_libs; do 3955 case "$deplib"in4322 case in 3956 4323 *.la) 3957 4324 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` … … 3991 4358 fi 3992 4359 $rm $output 4360 4361 4362 4363 4364 3993 4365 $echo > $output "\ 3994 4366 # $outputname - a libtool library file … … 3999 4371 4000 4372 # The name that we can dlopen(3). 4001 dlname='$ dlname'4373 dlname='$dlname' 4002 4374 4003 4375 # Names of this library. … … 4051 4423 # Aesthetically quote it. 4052 4424 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` 4053 case "$arg"in4425 case in 4054 4426 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4055 4427 arg="\"$arg\"" … … 4067 4439 # Aesthetically quote it. 4068 4440 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 4069 case "$arg"in4441 case in 4070 4442 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4071 4443 arg="\"$arg\"" … … 4090 4462 fi 4091 4463 4092 case "$arg"in4464 case in 4093 4465 -d) isdir=yes ;; 4094 4466 -f) prev="-f" ;; … … 4115 4487 # Aesthetically quote the argument. 4116 4488 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 4117 case "$arg"in4489 case in 4118 4490 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) 4119 4491 arg="\"$arg\"" … … 4166 4538 fi 4167 4539 fi 4168 case "$destdir"in4540 case in 4169 4541 [\\/]* | [A-Za-z]:[\\/]*) ;; 4170 4542 *) 4171 4543 for file in $files; do 4172 case "$file"in4544 case in 4173 4545 *.lo) ;; 4174 4546 *) … … 4192 4564 4193 4565 # Do each installation. 4194 case "$file"in4566 case in 4195 4567 *.$libext) 4196 4568 # Do the static libraries later. … … 4211 4583 relink_command= 4212 4584 # If there is no directory component, then add one. 4213 case "$file"in4585 case in 4214 4586 */* | *\\*) . $file ;; 4215 4587 *) . ./$file ;; … … 4240 4612 else 4241 4613 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 4242 continue4614 4243 4615 fi 4244 4616 fi … … 4307 4679 4308 4680 # Deduce the name of the destination old-style object file. 4309 case "$destfile"in4681 case in 4310 4682 *.lo) 4311 4683 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` … … 4350 4722 # Do a test to see if this is really a libtool program. 4351 4723 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4352 uninst_deplibs=4724 inst_deplibs= 4353 4725 relink_command= 4354 4726 4355 4727 # If there is no directory component, then add one. 4356 case "$file"in4728 case in 4357 4729 */* | *\\*) . $file ;; 4358 4730 *) . ./$file ;; … … 4360 4732 4361 4733 # Check the variables that should have been set. 4362 if test -z "$ uninst_deplibs"; then4734 if test -z "$inst_deplibs"; then 4363 4735 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 4364 4736 exit 1 … … 4366 4738 4367 4739 finalize=yes 4368 for lib in $ uninst_deplibs; do4740 for lib in $inst_deplibs; do 4369 4741 # Check to see that each library is installed. 4370 4742 libdir= 4371 4743 if test -f "$lib"; then 4372 4744 # If there is no directory component, then add one. 4373 case "$lib"in4745 case in 4374 4746 */* | *\\*) . $lib ;; 4375 4747 *) . ./$lib ;; … … 4385 4757 relink_command= 4386 4758 # If there is no directory component, then add one. 4387 case "$file"in4759 case in 4388 4760 */* | *\\*) . $file ;; 4389 4761 *) . ./$file ;; … … 4423 4795 fi 4424 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4425 4816 $show "$install_prog$stripme $file $destfile" 4426 4817 $run eval "$install_prog\$stripme \$file \$destfile" || exit $? … … 4462 4853 # Maybe just do a dry run. 4463 4854 test -n "$run" && current_libdirs=" -n$current_libdirs" 4464 exec $SHELL $0 --finish$current_libdirs 4465 exit 1 4855 exec_cmd='$SHELL $0 --finish$current_libdirs' 4856 else 4857 exit 0 4466 4858 fi 4467 4468 exit 04469 4859 ;; 4470 4860 … … 4504 4894 4505 4895 # Exit here if they wanted silent mode. 4506 test "$show" = :&& exit 04896 test "$show" = && exit 0 4507 4897 4508 4898 echo "----------------------------------------------------------------------" … … 4514 4904 echo "If you ever happen to want to link against installed libraries" 4515 4905 echo "in a given directory, LIBDIR, you must either use libtool, and" 4516 echo "specify the full pathname of the library, or use \`-LLIBDIR'"4906 echo "specify the full pathname of the library, or use \`-LLIBDIR'" 4517 4907 echo "flag during linking and do at least one of the following:" 4518 4908 if test -n "$shlibpath_var"; then … … 4564 4954 4565 4955 dir= 4566 case "$file"in4956 case in 4567 4957 *.la) 4568 4958 # Check to see that this really is a libtool archive. … … 4579 4969 4580 4970 # If there is no directory component, then add one. 4581 case "$file"in4971 case in 4582 4972 */* | *\\*) . $file ;; 4583 4973 *) . ./$file ;; … … 4634 5024 for file 4635 5025 do 4636 case "$file"in5026 case in 4637 5027 -*) ;; 4638 5028 *) … … 4640 5030 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4641 5031 # If there is no directory component, then add one. 4642 case "$file"in5032 case in 4643 5033 */* | *\\*) . $file ;; 4644 5034 *) . ./$file ;; … … 4669 5059 fi 4670 5060 4671 # Now actually exec the command. 4672 eval "exec \$cmd$args" 4673 4674 $echo "$modename: cannot exec \$cmd$args" 4675 exit 1 5061 # Now prepare to actually exec the command. 5062 exec_cmd='"$cmd"$args' 4676 5063 else 4677 5064 # Display what would be done. … … 4690 5077 rm="$nonopt" 4691 5078 files= 5079 5080 4692 5081 4693 5082 # This variable tells wrapper scripts just to set variables rather … … 4697 5086 for arg 4698 5087 do 4699 case "$arg" in 5088 case $arg in 5089 -f) rm="$rm $arg"; rmforce=yes ;; 4700 5090 -*) rm="$rm $arg" ;; 4701 5091 *) files="$files $arg" ;; … … 4708 5098 exit 1 4709 5099 fi 5100 5101 4710 5102 4711 5103 for file in $files; do … … 4720 5112 test $mode = uninstall && objdir="$dir" 4721 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 4722 5134 rmfiles="$file" 4723 5135 4724 case "$name"in5136 case in 4725 5137 *.la) 4726 5138 # Possibly a libtool archive, so verify it. … … 4744 5156 $show "$cmd" 4745 5157 $run eval "$cmd" 5158 5159 5160 4746 5161 done 4747 5162 IFS="$save_ifs" … … 4756 5171 $show "$cmd" 4757 5172 $run eval "$cmd" 5173 5174 5175 4758 5176 done 4759 5177 IFS="$save_ifs" … … 4766 5184 *.lo) 4767 5185 # Possibly a libtool object, so verify it. 4768 if (sed -e '2q' $ arg| egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then5186 if (sed -e '2q' $ | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4769 5187 4770 5188 # Read the .lo file 4771 . ./$file5189 . e 4772 5190 4773 5191 # Add PIC object to the list of files to remove. … … 4800 5218 esac 4801 5219 $show "$rm $rmfiles" 4802 $run $rm $rmfiles 5220 $run $rm $rmfiles 4803 5221 done 4804 exit 0 5222 5223 # Try to remove the ${objdir}s in the directories where we deleted files 5224 for dir in $rmdirs; do 5225 if test -d "$dir"; then 5226 $show "rmdir $dir" 5227 $run rmdir $dir >/dev/null 2>&1 5228 fi 5229 done 5230 5231 exit $exit_status 4805 5232 ;; 4806 5233 … … 4812 5239 esac 4813 5240 4814 $echo "$modename: invalid operation mode \`$mode'" 1>&2 4815 $echo "$generic_help" 1>&2 5241 if test -z "$exec_cmd"; then 5242 $echo "$modename: invalid operation mode \`$mode'" 1>&2 5243 $echo "$generic_help" 1>&2 5244 exit 1 5245 fi 5246 fi # test -z "$show_help" 5247 5248 if test -n "$exec_cmd"; then 5249 eval exec $exec_cmd 4816 5250 exit 1 4817 fi # test -z "$show_help"5251 fi 4818 5252 4819 5253 # We need to display help for each of the modes. 4820 case "$mode"in5254 case in 4821 5255 "") $echo \ 4822 5256 "Usage: $modename [OPTION]... [MODE-ARG]... … … 4874 5308 4875 5309 -o OUTPUT-FILE set the output file name to OUTPUT-FILE 5310 5311 4876 5312 -static always build a \`.o' file suitable for static linking 4877 5313 … … 4957 5393 -no-undefined declare that a library does not refer to external symbols 4958 5394 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 5395 4959 5396 -release RELEASE specify package release information 4960 5397 -rpath LIBDIR the created library will eventually be installed in LIBDIR -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.
