source:
scripts/untested/blfs-patches/freeglut-2.2.0-update_ltmain-1.patch@
d1afb9e
Last change on this file since d1afb9e was 617118d, checked in by , 19 years ago | |
---|---|
|
|
File size: 45.9 KB |
-
freeglut-2.2.
diff -uNr freeglut-2.2.0-orig/ltmain.sh freeglut-2.2.0/ltmain.sh
old new 48 48 exit 0 49 49 fi 50 50 51 # define SED for historic ltconfig's generated by Libtool 1.352 test -z "$SED" && SED=sed53 54 51 # The name of this program. 55 progname=`$echo "$0" | ${SED}'s%^.*/%%'`52 progname=`$echo "$0" | sed 's%^.*/%%'` 56 53 modename="$progname" 57 54 58 55 # Constants. 59 56 PROGRAM=ltmain.sh 60 57 PACKAGE=libtool 61 VERSION=1.4. 362 TIMESTAMP=" (1.922.2. 110 2002/10/23 01:39:54)"58 VERSION=1.4.2 59 TIMESTAMP=" (1.922.2.54 2001/09/11 03:33:37)" 63 60 64 61 default_mode= 65 62 help="Try \`$progname --help' for more information." … … 70 67 71 68 # Sed substitution that helps us do robust quoting. It backslashifies 72 69 # metacharacters that are still active within double-quoted strings. 73 Xsed= "${SED}"'-e 1s/^X//'70 Xsed='sed -e 1s/^X//' 74 71 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' 75 # test EBCDIC or ASCII 76 case `echo A|od -x` in 77 *[Cc]1*) # EBCDIC based system 78 SP2NL="tr '\100' '\n'" 79 NL2SP="tr '\r\n' '\100\100'" 80 ;; 81 *) # Assume ASCII based system 82 SP2NL="tr '\040' '\012'" 83 NL2SP="tr '\015\012' '\040\040'" 84 ;; 85 esac 72 SP2NL='tr \040 \012' 73 NL2SP='tr \015\012 \040\040' 86 74 87 75 # NLS nuisances. 88 76 # Only set LANG and LC_ALL to C if already set. … … 156 144 ;; 157 145 158 146 --config) 159 ${SED}-e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0147 sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 160 148 exit 0 161 149 ;; 162 150 … … 219 207 exit 1 220 208 fi 221 209 222 # Mandrake: (gc) It's bad to link C++ code with GCC, so we need to use the compiler name if provided223 if test "$mode" = link && test -n "$archive_cmds" && test -x "/usr/bin/perl"; then224 case $nonopt in225 *cc | *++ | gcc* | *-gcc* | egcs*)226 archive_cmds=`echo $archive_cmds | perl -pe 's/^\S+\s+//'`227 archive_cmds="$nonopt $archive_cmds"228 archive_expsym_cmds=`echo $archive_expsym_cmds | perl -pe 's/^\S+\s+//'`229 archive_expsym_cmds="$nonopt $archive_expsym_cmds"230 esac231 fi232 233 210 # If this variable is set in any of the actions, the command in it 234 211 # will be execed at the end. This prevents here-documents from being 235 212 # left over by shells. … … 240 217 # Infer the operation mode. 241 218 if test -z "$mode"; then 242 219 case $nonopt in 243 *cc | *++ | gcc* | *-gcc* | xlc*)220 *cc | *++ | gcc* | *-gcc*) 244 221 mode=link 245 222 for arg 246 223 do … … 782 759 linker_flags= 783 760 dllsearchpath= 784 761 lib_search_path=`pwd` 762 inst_prefix_dir= 785 763 786 764 avoid_version=no 787 765 dlfiles= … … 912 890 prev= 913 891 continue 914 892 ;; 893 inst_prefix) 894 inst_prefix_dir="$arg" 895 prev= 896 continue 897 ;; 915 898 release) 916 899 release="-$arg" 917 900 prev= … … 1013 996 continue 1014 997 ;; 1015 998 999 -inst-prefix-dir) 1000 prev=inst_prefix 1001 continue 1002 ;; 1003 1016 1004 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* 1017 1005 # so, if we see these flags be careful not to treat them like -L 1018 1006 -L[A-Z][A-Z]*:*) 1019 1007 case $with_gcc/$host in 1020 no/*-*-irix* | no/*-*-nonstopux*)1008 no/*-*-irix*) 1021 1009 compile_command="$compile_command $arg" 1022 1010 finalize_command="$finalize_command $arg" 1023 1011 ;; … … 1068 1056 # These systems don't actually have a C library (as such) 1069 1057 test "X$arg" = "X-lc" && continue 1070 1058 ;; 1071 *-*-openbsd* | *-*-freebsd*)1059 *-*-openbsd*) 1072 1060 # Do not include libc due to us having libc/libc_r. 1073 1061 test "X$arg" = "X-lc" && continue 1074 1062 ;; 1075 1063 esac 1076 1064 elif test "X$arg" = "X-lc_r"; then 1077 1065 case $host in 1078 *-*-openbsd* | *-*-freebsd*)1066 *-*-openbsd*) 1079 1067 # Do not include libc_r directly, use -pthread flag. 1080 1068 continue 1081 1069 ;; … … 1328 1316 output_objdir="$output_objdir/$objdir" 1329 1317 fi 1330 1318 # Create the object directory. 1331 if test ! -d $output_objdir; then1319 if test ! -d "$output_objdir"; then 1332 1320 $show "$mkdir $output_objdir" 1333 1321 $run $mkdir $output_objdir 1334 1322 status=$? 1335 if test $status -ne 0 && test ! -d $output_objdir; then1323 if test "$status" -ne 0 && test ! -d "$output_objdir"; then 1336 1324 exit $status 1337 1325 fi 1338 1326 fi … … 1362 1350 fi 1363 1351 libs="$libs $deplib" 1364 1352 done 1353 1354 if test "$linkmode" = lib; then 1355 libs="$predeps $libs $compiler_lib_search_path $postdeps" 1356 1357 # Compute libraries that are listed more than once in $predeps 1358 # $postdeps and mark them as special (i.e., whose duplicates are 1359 # not to be eliminated). 1360 pre_post_deps= 1361 if test "X$duplicate_deps" = "Xyes" ; then 1362 for pre_post_dep in $predeps $postdeps; do 1363 case "$pre_post_deps " in 1364 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; 1365 esac 1366 pre_post_deps="$pre_post_deps $pre_post_dep" 1367 done 1368 fi 1369 pre_post_deps= 1370 fi 1371 1365 1372 deplibs= 1366 1373 newdependency_libs= 1367 1374 newlib_search_path= … … 1393 1400 ;; 1394 1401 esac 1395 1402 for pass in $passes; do 1396 if test $linkmode= prog; then1403 if test "$linkmode" = prog; then 1397 1404 # Determine which files to process 1398 1405 case $pass in 1399 1406 dlopen) … … 1410 1417 found=no 1411 1418 case $deplib in 1412 1419 -l*) 1413 if test $linkmode = oldlib && test $linkmode= obj; then1420 if test "$linkmode" = oldlib && test "$linkmode" = obj; then 1414 1421 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 1415 1422 continue 1416 1423 fi 1417 if test $pass= conv; then1424 if test "$pass" = conv; then 1418 1425 deplibs="$deplib $deplibs" 1419 1426 continue 1420 1427 fi … … 1434 1441 finalize_deplibs="$deplib $finalize_deplibs" 1435 1442 else 1436 1443 deplibs="$deplib $deplibs" 1437 test $linkmode= lib && newdependency_libs="$deplib $newdependency_libs"1444 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 1438 1445 fi 1439 1446 continue 1440 1447 fi … … 1443 1450 case $linkmode in 1444 1451 lib) 1445 1452 deplibs="$deplib $deplibs" 1446 test $pass= conv && continue1453 test "$pass" = conv && continue 1447 1454 newdependency_libs="$deplib $newdependency_libs" 1448 1455 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1449 1456 ;; 1450 1457 prog) 1451 if test $pass= conv; then1458 if test "$pass" = conv; then 1452 1459 deplibs="$deplib $deplibs" 1453 1460 continue 1454 1461 fi 1455 if test $pass= scan; then1462 if test "$pass" = scan; then 1456 1463 deplibs="$deplib $deplibs" 1457 1464 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1458 1465 else … … 1467 1474 continue 1468 1475 ;; # -L 1469 1476 -R*) 1470 if test $pass= link; then1477 if test "$pass" = link; then 1471 1478 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` 1472 1479 # Make sure the xrpath contains only unique directories. 1473 1480 case "$xrpath " in … … 1480 1487 ;; 1481 1488 *.la) lib="$deplib" ;; 1482 1489 *.$libext) 1483 if test $pass= conv; then1490 if test "$pass" = conv; then 1484 1491 deplibs="$deplib $deplibs" 1485 1492 continue 1486 1493 fi … … 1488 1495 lib) 1489 1496 if test "$deplibs_check_method" != pass_all; then 1490 1497 echo 1491 echo "*** Warning: T rying to link with static lib archive$deplib."1498 echo "*** Warning: This library needs some functionality provided by $deplib." 1492 1499 echo "*** I have the capability to make that library automatically link in when" 1493 1500 echo "*** you link to this library. But I can only do this if you have a" 1494 echo "*** shared version of the library, which you do not appear to have" 1495 echo "*** because the file extensions .$libext of this argument makes me believe" 1496 echo "*** that it is just a static archive that I should not used here." 1501 echo "*** shared version of the library, which you do not appear to have." 1497 1502 else 1498 1503 echo 1499 1504 echo "*** Warning: Linking the shared library $output against the" … … 1503 1508 continue 1504 1509 ;; 1505 1510 prog) 1506 if test $pass!= link; then1511 if test "$pass" != link; then 1507 1512 deplibs="$deplib $deplibs" 1508 1513 else 1509 1514 compile_deplibs="$deplib $compile_deplibs" … … 1514 1519 esac # linkmode 1515 1520 ;; # *.$libext 1516 1521 *.lo | *.$objext) 1517 if test $pass= dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then1522 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1518 1523 # If there is no dlopen support or we're linking statically, 1519 1524 # we need to preload. 1520 1525 newdlprefiles="$newdlprefiles $deplib" … … 1530 1535 continue 1531 1536 ;; 1532 1537 esac # case $deplib 1533 if test $found= yes || test -f "$lib"; then :1538 if test "$found" = yes || test -f "$lib"; then : 1534 1539 else 1535 1540 $echo "$modename: cannot find the library \`$lib'" 1>&2 1536 1541 exit 1 1537 1542 fi 1538 1543 1539 1544 # Check to see that this really is a libtool archive. 1540 if ( ${SED}-e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :1545 if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 1541 1546 else 1542 1547 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 1543 1548 exit 1 … … 1564 1569 1565 1570 if test "$linkmode,$pass" = "lib,link" || 1566 1571 test "$linkmode,$pass" = "prog,scan" || 1567 { test $linkmode = oldlib && test $linkmode= obj; }; then1572 { test "$linkmode" = oldlib && test "$linkmode" = obj; }; then 1568 1573 # Add dl[pre]opened files of deplib 1569 1574 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 1570 1575 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" 1571 1576 fi 1572 1577 1573 if test $pass= conv; then1578 if test "$pass" = conv; then 1574 1579 # Only check for convenience libraries 1575 1580 deplibs="$lib $deplibs" 1576 1581 if test -z "$libdir"; then … … 1591 1596 fi 1592 1597 tmp_libs="$tmp_libs $deplib" 1593 1598 done 1594 elif test $linkmode != prog && test $linkmode!= lib; then1599 elif test "$linkmode" != prog && test "$linkmode" != lib; then 1595 1600 $echo "$modename: \`$lib' is not a convenience library" 1>&2 1596 1601 exit 1 1597 1602 fi … … 1609 1614 fi 1610 1615 1611 1616 # This library was specified with -dlopen. 1612 if test $pass= dlopen; then1617 if test "$pass" = dlopen; then 1613 1618 if test -z "$libdir"; then 1614 1619 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 1615 1620 exit 1 … … 1658 1663 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 1659 1664 1660 1665 # This library was specified with -dlpreopen. 1661 if test $pass= dlpreopen; then1666 if test "$pass" = dlpreopen; then 1662 1667 if test -z "$libdir"; then 1663 1668 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 1664 1669 exit 1 … … 1677 1682 1678 1683 if test -z "$libdir"; then 1679 1684 # Link the convenience library 1680 if test $linkmode= lib; then1685 if test "$linkmode" = lib; then 1681 1686 deplibs="$dir/$old_library $deplibs" 1682 1687 elif test "$linkmode,$pass" = "prog,link"; then 1683 1688 compile_deplibs="$dir/$old_library $compile_deplibs" … … 1688 1693 continue 1689 1694 fi 1690 1695 1691 if test $linkmode = prog && test $pass!= link; then1696 if test "$linkmode" = prog && test "$pass" != link; then 1692 1697 newlib_search_path="$newlib_search_path $ladir" 1693 1698 deplibs="$lib $deplibs" 1694 1699 … … 1704 1709 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test 1705 1710 esac 1706 1711 # Need to link against all dependency_libs? 1707 if test $linkalldeplibs= yes; then1712 if test "$linkalldeplibs" = yes; then 1708 1713 deplibs="$deplib $deplibs" 1709 1714 else 1710 1715 # Need to hardcode shared library paths … … 1727 1732 # Link against this shared library 1728 1733 1729 1734 if test "$linkmode,$pass" = "prog,link" || 1730 { test $linkmode = lib && test $hardcode_into_libs= yes; }; then1735 { test "$linkmode" = lib && test "$hardcode_into_libs" = yes; }; then 1731 1736 # Hardcode the library path. 1732 1737 # Skip directories that are in the system default run-time 1733 1738 # search path. … … 1749 1754 esac 1750 1755 ;; 1751 1756 esac 1752 if test $linkmode= prog; then1757 if test "$linkmode" = prog; then 1753 1758 # We need to hardcode the library path 1754 1759 if test -n "$shlibpath_var"; then 1755 1760 # Make sure the rpath contains only unique directories. … … 1799 1804 1800 1805 # Make a new name for the extract_expsyms_cmds to use 1801 1806 soroot="$soname" 1802 soname=`echo $soroot | ${SED}-e 's/^.*\///'`1803 newlib="libimp-`echo $soname | ${SED}'s/^lib//;s/\.dll$//'`.a"1807 soname=`echo $soroot | sed -e 's/^.*\///'` 1808 newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" 1804 1809 1805 1810 # If the library has no export list, then create one now 1806 1811 if test -f "$output_objdir/$soname-def"; then : … … 1831 1836 # make sure the library variables are pointing to the new library 1832 1837 dir=$output_objdir 1833 1838 linklib=$newlib 1834 fi # test -n $old_archive_from_expsyms_cmds1839 fi # test -n "$old_archive_from_expsyms_cmds" 1835 1840 1836 if test $linkmode= prog || test "$mode" != relink; then1841 if test "$linkmode" = prog || test "$mode" != relink; then 1837 1842 add_shlibpath= 1838 1843 add_dir= 1839 1844 add= … … 1882 1887 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; 1883 1888 esac 1884 1889 fi 1885 if test $linkmode= prog; then1890 if test "$linkmode" = prog; then 1886 1891 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" 1887 1892 test -n "$add" && compile_deplibs="$add $compile_deplibs" 1888 1893 else … … 1899 1904 fi 1900 1905 fi 1901 1906 1902 if test $linkmode= prog || test "$mode" = relink; then1907 if test "$linkmode" = prog || test "$mode" = relink; then 1903 1908 add_shlibpath= 1904 1909 add_dir= 1905 1910 add= … … 1907 1912 if test "$hardcode_direct" = yes; then 1908 1913 add="$libdir/$linklib" 1909 1914 elif test "$hardcode_minus_L" = yes; then 1910 add_dir="-L$libdir" 1915 # Try looking first in the location we're being installed to. 1916 add_dir= 1917 if test -n "$inst_prefix_dir"; then 1918 case "$libdir" in 1919 [\\/]*) 1920 add_dir="-L$inst_prefix_dir$libdir" 1921 ;; 1922 esac 1923 fi 1924 add_dir="$add_dir -L$libdir" 1911 1925 add="-l$name" 1912 1926 elif test "$hardcode_shlibpath_var" = yes; then 1913 1927 case :$finalize_shlibpath: in … … 1917 1931 add="-l$name" 1918 1932 else 1919 1933 # We cannot seem to hardcode it, guess we'll fake it. 1920 add_dir="-L$libdir" 1934 # Try looking first in the location we're being installed to. 1935 add_dir= 1936 if test -n "$inst_prefix_dir"; then 1937 case "$libdir" in 1938 [\\/]*) 1939 add_dir="-L$inst_prefix_dir$libdir" 1940 ;; 1941 esac 1942 fi 1943 add_dir="$add_dir -L$libdir" 1921 1944 add="-l$name" 1922 1945 fi 1923 1946 1924 if test $linkmode= prog; then1947 if test "$linkmode" = prog; then 1925 1948 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" 1926 1949 test -n "$add" && finalize_deplibs="$add $finalize_deplibs" 1927 1950 else … … 1929 1952 test -n "$add" && deplibs="$add $deplibs" 1930 1953 fi 1931 1954 fi 1932 elif test $linkmode= prog; then1955 elif test "$linkmode" = prog; then 1933 1956 if test "$alldeplibs" = yes && 1934 1957 { test "$deplibs_check_method" = pass_all || 1935 1958 { test "$build_libtool_libs" = yes && … … 1959 1982 # Just print a warning and add the library to dependency_libs so 1960 1983 # that the program can be linked against the static library. 1961 1984 echo 1962 echo "*** Warning: This system can not link to static lib archive$lib."1985 echo "*** Warning: This library needs some functionality provided by $lib." 1963 1986 echo "*** I have the capability to make that library automatically link in when" 1964 1987 echo "*** you link to this library. But I can only do this if you have a" 1965 1988 echo "*** shared version of the library, which you do not appear to have." 1966 1989 if test "$module" = yes; then 1967 echo "*** But as you try to build a module library, libtool will still create " 1968 echo "*** a static module, that should work as long as the dlopening application" 1969 echo "*** is linked with the -dlopen flag to resolve symbols at runtime." 1990 echo "*** Therefore, libtool will create a static module, that should work " 1991 echo "*** as long as the dlopening application is linked with the -dlopen flag." 1970 1992 if test -z "$global_symbol_pipe"; then 1971 1993 echo 1972 1994 echo "*** However, this would only work if libtool was able to extract symbol" … … 1989 2011 fi 1990 2012 fi # link shared/static library? 1991 2013 1992 if test $linkmode= lib; then2014 if test "$linkmode" = lib; then 1993 2015 if test -n "$dependency_libs" && 1994 { test $hardcode_into_libs != yes || test $build_old_libs= yes ||1995 test $link_static= yes; }; then2016 { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || 2017 test "$link_static" = yes; }; then 1996 2018 # Extract -R from dependency_libs 1997 2019 temp_deplibs= 1998 2020 for libdir in $dependency_libs; do … … 2023 2045 tmp_libs="$tmp_libs $deplib" 2024 2046 done 2025 2047 2026 if test $link_all_deplibs!= no; then2048 if test "$link_all_deplibs" != no; then 2027 2049 # Add the search paths of all dependency libraries 2028 2050 for deplib in $dependency_libs; do 2029 2051 case $deplib in … … 2045 2067 if grep "^installed=no" $deplib > /dev/null; then 2046 2068 path="-L$absdir/$objdir" 2047 2069 else 2048 eval libdir=` ${SED}-n -e 's/^libdir=\(.*\)$/\1/p' $deplib`2070 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 2049 2071 if test -z "$libdir"; then 2050 2072 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 2051 2073 exit 1 … … 2066 2088 fi # link_all_deplibs != no 2067 2089 fi # linkmode = lib 2068 2090 done # for deplib in $libs 2069 if test $pass= dlpreopen; then2091 if test "$pass" = dlpreopen; then 2070 2092 # Link the dlpreopened libraries before other libraries 2071 2093 for deplib in $save_deplibs; do 2072 2094 deplibs="$deplib $deplibs" 2073 2095 done 2074 2096 fi 2075 if test $pass!= dlopen; then2076 test $pass!= scan && dependency_libs="$newdependency_libs"2077 if test $pass!= conv; then2097 if test "$pass" != dlopen; then 2098 test "$pass" != scan && dependency_libs="$newdependency_libs" 2099 if test "$pass" != conv; then 2078 2100 # Make sure lib_search_path contains only unique directories. 2079 2101 lib_search_path= 2080 2102 for dir in $newlib_search_path; do … … 2132 2154 deplibs= 2133 2155 fi 2134 2156 done # for pass 2135 if test $linkmode= prog; then2157 if test "$linkmode" = prog; then 2136 2158 dlfiles="$newdlfiles" 2137 2159 dlprefiles="$newdlprefiles" 2138 2160 fi … … 2209 2231 fi 2210 2232 2211 2233 set dummy $rpath 2212 if test $#-gt 2; then2234 if test "$#" -gt 2; then 2213 2235 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 2214 2236 fi 2215 2237 install_libdir="$2" … … 2250 2272 2251 2273 # Check that each of the things are valid numbers. 2252 2274 case $current in 2253 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;2275 [0-9]*) ;; 2254 2276 *) 2255 2277 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 2256 2278 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 … … 2259 2281 esac 2260 2282 2261 2283 case $revision in 2262 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;2284 [0-9]*) ;; 2263 2285 *) 2264 2286 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 2265 2287 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 … … 2268 2290 esac 2269 2291 2270 2292 case $age in 2271 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;2293 [0-9]*) ;; 2272 2294 *) 2273 2295 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 2274 2296 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 … … 2276 2298 ;; 2277 2299 esac 2278 2300 2279 if test $age -gt $current; then2301 if test "$age" -gt "$current"; then 2280 2302 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 2281 2303 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2282 2304 exit 1 … … 2309 2331 versuffix=".$current"; 2310 2332 ;; 2311 2333 2312 irix | nonstopux)2334 irix) 2313 2335 major=`expr $current - $age + 1` 2314 2315 case $version_type in 2316 nonstopux) verstring_prefix=nonstopux ;; 2317 *) verstring_prefix=sgi ;; 2318 esac 2319 verstring="$verstring_prefix$major.$revision" 2336 verstring="sgi$major.$revision" 2320 2337 2321 2338 # Add in all the interfaces that we are compatible with. 2322 2339 loop=$revision 2323 while test $loop !=0; do2340 while test "$loop" -ne 0; do 2324 2341 iface=`expr $revision - $loop` 2325 2342 loop=`expr $loop - 1` 2326 verstring=" $verstring_prefix$major.$iface:$verstring"2343 verstring="sgi$major.$iface:$verstring" 2327 2344 done 2328 2345 2329 2346 # Before this point, $major must not contain `.'. … … 2337 2354 ;; 2338 2355 2339 2356 osf) 2340 major= .`expr $current - $age`2357 major=`expr $current - $age` 2341 2358 versuffix=".$current.$age.$revision" 2342 2359 verstring="$current.$age.$revision" 2343 2360 2344 2361 # Add in all the interfaces that we are compatible with. 2345 2362 loop=$age 2346 while test $loop !=0; do2363 while test "$loop" -ne 0; do 2347 2364 iface=`expr $current - $loop` 2348 2365 loop=`expr $loop - 1` 2349 2366 verstring="$verstring:${iface}.0" … … 2429 2446 2430 2447 # Eliminate all temporary directories. 2431 2448 for path in $notinst_path; do 2432 lib_search_path=`echo "$lib_search_path " | ${SED}-e 's% $path % %g'`2433 deplibs=`echo "$deplibs " | ${SED}-e 's% -L$path % %g'`2434 dependency_libs=`echo "$dependency_libs " | ${SED}-e 's% -L$path % %g'`2449 lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` 2450 deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` 2451 dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` 2435 2452 done 2436 2453 2437 2454 if test -n "$xrpath"; then … … 2444 2461 *) finalize_rpath="$finalize_rpath $libdir" ;; 2445 2462 esac 2446 2463 done 2447 if test $hardcode_into_libs != yes || test $build_old_libs= yes; then2464 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then 2448 2465 dependency_libs="$temp_xrpath $dependency_libs" 2449 2466 fi 2450 2467 fi … … 2482 2499 *-*-netbsd*) 2483 2500 # Don't link with libc until the a.out ld.so is fixed. 2484 2501 ;; 2485 *-*-openbsd* | *-*-freebsd*)2502 *-*-openbsd*) 2486 2503 # Do not include libc due to us having libc/libc_r. 2487 2504 ;; 2488 2505 *) 2489 2506 # Add libc to deplibs on all other systems if necessary. 2490 if test $build_libtool_need_lc= "yes"; then2507 if test "$build_libtool_need_lc" = "yes"; then 2491 2508 deplibs="$deplibs -lc" 2492 2509 fi 2493 2510 ;; … … 2528 2545 EOF 2529 2546 $rm conftest 2530 2547 $CC -o conftest conftest.c $deplibs 2531 if test $?-eq 0 ; then2548 if test "$?" -eq 0 ; then 2532 2549 ldd_output=`ldd conftest` 2533 2550 for i in $deplibs; do 2534 2551 name="`expr $i : '-l\(.*\)'`" … … 2543 2560 else 2544 2561 droppeddeps=yes 2545 2562 echo 2546 echo "*** Warning: dynamic linker does not accept needed library $i."2563 echo "*** Warning: This library needs some functionality provided by $i." 2547 2564 echo "*** I have the capability to make that library automatically link in when" 2548 2565 echo "*** you link to this library. But I can only do this if you have a" 2549 echo "*** shared version of the library, which I believe you do not have" 2550 echo "*** because a test_compile did reveal that the linker did not use it for" 2551 echo "*** its dynamic dependency list that programs get resolved with at runtime." 2566 echo "*** shared version of the library, which you do not appear to have." 2552 2567 fi 2553 2568 else 2554 2569 newdeplibs="$newdeplibs $i" 2555 2570 fi 2556 2571 done 2557 2572 else 2558 # Error occured in the first compile. Let's try to salvage 2559 # the situation: Compile a separate program for each library.2573 # Error occured in the first compile. Let's try to salvage the situation: 2574 # Compile a seperate program for each library. 2560 2575 for i in $deplibs; do 2561 2576 name="`expr $i : '-l\(.*\)'`" 2562 2577 # If $name is empty we are operating on a -L argument. … … 2564 2579 $rm conftest 2565 2580 $CC -o conftest conftest.c $i 2566 2581 # Did it work? 2567 if test $?-eq 0 ; then2582 if test "$?" -eq 0 ; then 2568 2583 ldd_output=`ldd conftest` 2569 2584 libname=`eval \\$echo \"$libname_spec\"` 2570 2585 deplib_matches=`eval \\$echo \"$library_names_spec\"` … … 2575 2590 else 2576 2591 droppeddeps=yes 2577 2592 echo 2578 echo "*** Warning: dynamic linker does not accept needed library $i."2593 echo "*** Warning: This library needs some functionality provided by $i." 2579 2594 echo "*** I have the capability to make that library automatically link in when" 2580 2595 echo "*** you link to this library. But I can only do this if you have a" 2581 echo "*** shared version of the library, which you do not appear to have" 2582 echo "*** because a test_compile did reveal that the linker did not use this one" 2583 echo "*** as a dynamic dependency that programs can get resolved with at runtime." 2596 echo "*** shared version of the library, which you do not appear to have." 2584 2597 fi 2585 2598 else 2586 2599 droppeddeps=yes … … 2619 2632 # but so what? 2620 2633 potlib="$potent_lib" 2621 2634 while test -h "$potlib" 2>/dev/null; do 2622 potliblink=`ls -ld $potlib | ${SED}'s/.* -> //'`2635 potliblink=`ls -ld $potlib | sed 's/.* -> //'` 2623 2636 case $potliblink in 2624 2637 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; 2625 2638 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; 2626 2639 esac 2627 2640 done 2628 # It is ok to link against an archive when2629 # building a shared library.2630 if $AR -t $potlib > /dev/null 2>&1; then2631 newdeplibs="$newdeplibs $a_deplib"2632 a_deplib=""2633 break 22634 fi2635 2641 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ 2636 | ${SED}10q \2642 | sed 10q \ 2637 2643 | egrep "$file_magic_regex" > /dev/null; then 2638 2644 newdeplibs="$newdeplibs $a_deplib" 2639 2645 a_deplib="" … … 2644 2650 if test -n "$a_deplib" ; then 2645 2651 droppeddeps=yes 2646 2652 echo 2647 echo "*** Warning: linker path does not have real file for library $a_deplib."2653 echo "*** Warning: This library needs some functionality provided by $a_deplib." 2648 2654 echo "*** I have the capability to make that library automatically link in when" 2649 2655 echo "*** you link to this library. But I can only do this if you have a" 2650 echo "*** shared version of the library, which you do not appear to have" 2651 echo "*** because I did check the linker path looking for a file starting" 2652 if test -z "$potlib" ; then 2653 echo "*** with $libname but no candidates were found. (...for file magic test)" 2654 else 2655 echo "*** with $libname and none of the candidates passed a file format test" 2656 echo "*** using a file magic. Last file checked: $potlib" 2657 fi 2656 echo "*** shared version of the library, which you do not appear to have." 2658 2657 fi 2659 2658 else 2660 2659 # Add a -L argument. … … 2673 2672 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2674 2673 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2675 2674 for potent_lib in $potential_libs; do 2676 potlib="$potent_lib" # see symlink-check below in file_magic test2677 2675 if eval echo \"$potent_lib\" 2>/dev/null \ 2678 | ${SED}10q \2676 | sed 10q \ 2679 2677 | egrep "$match_pattern_regex" > /dev/null; then 2680 2678 newdeplibs="$newdeplibs $a_deplib" 2681 2679 a_deplib="" … … 2686 2684 if test -n "$a_deplib" ; then 2687 2685 droppeddeps=yes 2688 2686 echo 2689 echo "*** Warning: linker path does not have real file for library $a_deplib."2687 echo "*** Warning: This library needs some functionality provided by $a_deplib." 2690 2688 echo "*** I have the capability to make that library automatically link in when" 2691 2689 echo "*** you link to this library. But I can only do this if you have a" 2692 echo "*** shared version of the library, which you do not appear to have" 2693 echo "*** because I did check the linker path looking for a file starting" 2694 if test -z "$potlib" ; then 2695 echo "*** with $libname but no candidates were found. (...for regex pattern test)" 2696 else 2697 echo "*** with $libname and none of the candidates passed a file format test" 2698 echo "*** using a regex pattern. Last file checked: $potlib" 2699 fi 2690 echo "*** shared version of the library, which you do not appear to have." 2700 2691 fi 2701 2692 else 2702 2693 # Add a -L argument. … … 2759 2750 echo "*** automatically added whenever a program is linked with this library" 2760 2751 echo "*** or is declared to -dlopen it." 2761 2752 2762 if test $allow_undefined= no; then2753 if test "$allow_undefined" = no; then 2763 2754 echo 2764 2755 echo "*** Since this library must not contain undefined symbols," 2765 2756 echo "*** because either the platform does not support them or" … … 2786 2777 2787 2778 # Test again, we may have decided not to build it any more 2788 2779 if test "$build_libtool_libs" = yes; then 2789 if test $hardcode_into_libs= yes; then2780 if test "$hardcode_into_libs" = yes; then 2790 2781 # Hardcode the library paths 2791 2782 hardcode_libdirs= 2792 2783 dep_rpath= … … 2917 2908 $show "mkdir $gentop" 2918 2909 $run mkdir "$gentop" 2919 2910 status=$? 2920 if test $status-ne 0 && test ! -d "$gentop"; then2911 if test "$status" -ne 0 && test ! -d "$gentop"; then 2921 2912 exit $status 2922 2913 fi 2923 2914 generated="$generated $gentop" … … 2936 2927 $show "mkdir $xdir" 2937 2928 $run mkdir "$xdir" 2938 2929 status=$? 2939 if test $status-ne 0 && test ! -d "$xdir"; then2930 if test "$status" -ne 0 && test ! -d "$xdir"; then 2940 2931 exit $status 2941 2932 fi 2942 2933 $show "(cd $xdir && $AR x $xabs)" … … 2961 2952 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 2962 2953 eval cmds=\"$archive_expsym_cmds\" 2963 2954 else 2964 save_deplibs="$deplibs"2965 for conv in $convenience; do2966 tmp_deplibs=2967 for test_deplib in $deplibs; do2968 if test "$test_deplib" != "$conv"; then2969 tmp_deplibs="$tmp_deplibs $test_deplib"2970 fi2971 done2972 deplibs="$tmp_deplibs"2973 done2974 2955 eval cmds=\"$archive_cmds\" 2975 deplibs="$save_deplibs"2976 2956 fi 2977 2957 save_ifs="$IFS"; IFS='~' 2978 2958 for cmd in $cmds; do … … 3067 3047 $show "mkdir $gentop" 3068 3048 $run mkdir "$gentop" 3069 3049 status=$? 3070 if test $status-ne 0 && test ! -d "$gentop"; then3050 if test "$status" -ne 0 && test ! -d "$gentop"; then 3071 3051 exit $status 3072 3052 fi 3073 3053 generated="$generated $gentop" … … 3086 3066 $show "mkdir $xdir" 3087 3067 $run mkdir "$xdir" 3088 3068 status=$? 3089 if test $status-ne 0 && test ! -d "$xdir"; then3069 if test "$status" -ne 0 && test ! -d "$xdir"; then 3090 3070 exit $status 3091 3071 fi 3092 3072 $show "(cd $xdir && $AR x $xabs)" … … 3171 3151 3172 3152 prog) 3173 3153 case $host in 3174 *cygwin*) output=`echo $output | ${SED}-e 's,.exe$,,;s,$,.exe,'` ;;3154 *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; 3175 3155 esac 3176 3156 if test -n "$vinfo"; then 3177 3157 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 … … 3193 3173 # On Rhapsody replace the C library is the System framework 3194 3174 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3195 3175 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3196 case $host in3197 *darwin*)3198 # Don't allow lazy linking, it breaks C++ global constructors3199 compile_command="$compile_command ${wl}-bind_at_load"3200 finalize_command="$finalize_command ${wl}-bind_at_load"3201 ;;3202 esac3203 3176 ;; 3204 3177 esac 3205 3178 … … 3366 3339 if test -z "$export_symbols"; then 3367 3340 export_symbols="$output_objdir/$output.exp" 3368 3341 $run $rm $export_symbols 3369 $run eval " ${SED}-n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'3342 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 3370 3343 else 3371 $run eval " ${SED}-e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'3344 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' 3372 3345 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' 3373 3346 $run eval 'mv "$nlist"T "$nlist"' 3374 3347 fi … … 3376 3349 3377 3350 for arg in $dlprefiles; do 3378 3351 $show "extracting global C symbols from \`$arg'" 3379 name=`echo "$arg" | ${SED}-e 's%^.*/%%'`3352 name=`echo "$arg" | sed -e 's%^.*/%%'` 3380 3353 $run eval 'echo ": $name " >> "$nlist"' 3381 3354 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 3382 3355 done … … 3391 3364 fi 3392 3365 3393 3366 # Try sorting and uniquifying the output. 3394 if grep -v "^: " < "$nlist" | 3395 if sort -k 3 </dev/null >/dev/null 2>&1; then 3396 sort -k 3 3397 else 3398 sort +2 3399 fi | 3400 uniq > "$nlist"S; then 3367 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then 3401 3368 : 3402 3369 else 3403 3370 grep -v "^: " < "$nlist" > "$nlist"S … … 3494 3461 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` 3495 3462 fi 3496 3463 3497 if test $need_relink= no || test "$build_libtool_libs" != yes; then3464 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then 3498 3465 # Replace the output file specification. 3499 3466 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` 3500 3467 link_command="$compile_command$compile_rpath" … … 3639 3606 # win32 will think the script is a binary if it has 3640 3607 # a .exe suffix, so we strip it off here. 3641 3608 case $output in 3642 *.exe) output=`echo $output| ${SED}'s,.exe$,,'` ;;3609 *.exe) output=`echo $output|sed 's,.exe$,,'` ;; 3643 3610 esac 3644 3611 # test for cygwin because mv fails w/o .exe extensions 3645 3612 case $host in … … 3663 3630 3664 3631 # Sed substitution that helps us do robust quoting. It backslashifies 3665 3632 # metacharacters that are still active within double-quoted strings. 3666 Xsed= "${SED}"'-e 1s/^X//'3633 Xsed='sed -e 1s/^X//' 3667 3634 sed_quote_subst='$sed_quote_subst' 3668 3635 3669 3636 # The HP-UX ksh and POSIX shell print the target directory to stdout … … 3701 3668 test \"x\$thisdir\" = \"x\$file\" && thisdir=. 3702 3669 3703 3670 # Follow symbolic links until we get to the real thisdir. 3704 file=\`ls -ld \"\$file\" | ${SED}-n 's/.*-> //p'\`3671 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\` 3705 3672 while test -n \"\$file\"; do 3706 3673 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` 3707 3674 … … 3714 3681 fi 3715 3682 3716 3683 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` 3717 file=\`ls -ld \"\$thisdir/\$file\" | ${SED}-n 's/.*-> //p'\`3684 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\` 3718 3685 done 3719 3686 3720 3687 # Try to get the absolute directory name. … … 3728 3695 progdir=\"\$thisdir/$objdir\" 3729 3696 3730 3697 if test ! -f \"\$progdir/\$program\" || \\ 3731 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED}1q\`; \\3698 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ 3732 3699 test \"X\$file\" != \"X\$progdir/\$program\"; }; then 3733 3700 3734 3701 file=\"\$\$-\$program\" … … 3774 3741 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" 3775 3742 3776 3743 # Some systems cannot cope with colon-terminated $shlibpath_var 3777 # The second colon is a workaround for a bug in BeOS R4 ${SED}3744 # The second colon is a workaround for a bug in BeOS R4 sed 3778 3745 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` 3779 3746 3780 3747 export $shlibpath_var … … 3862 3829 $show "mkdir $gentop" 3863 3830 $run mkdir "$gentop" 3864 3831 status=$? 3865 if test $status-ne 0 && test ! -d "$gentop"; then3832 if test "$status" -ne 0 && test ! -d "$gentop"; then 3866 3833 exit $status 3867 3834 fi 3868 3835 generated="$generated $gentop" … … 3882 3849 $show "mkdir $xdir" 3883 3850 $run mkdir "$xdir" 3884 3851 status=$? 3885 if test $status-ne 0 && test ! -d "$xdir"; then3852 if test "$status" -ne 0 && test ! -d "$xdir"; then 3886 3853 exit $status 3887 3854 fi 3888 3855 $show "(cd $xdir && $AR x $xabs)" … … 3949 3916 fi 3950 3917 done 3951 3918 # Quote the link command for shipping. 3952 relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args )"3919 relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" 3953 3920 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 3954 3921 3955 3922 # Only create the output if not a dry run. … … 3966 3933 case $deplib in 3967 3934 *.la) 3968 3935 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 3969 eval libdir=` ${SED}-n -e 's/^libdir=\(.*\)$/\1/p' $deplib`3936 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 3970 3937 if test -z "$libdir"; then 3971 3938 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 3972 3939 exit 1 3973 3940 fi 3974 # We do not want portage's install root ($D) present. Check only for 3975 # this if the .la is being installed. 3976 if test "$installed" = yes && test "$D"; then 3977 eval mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`" 3978 else 3979 mynewdependency_lib="$libdir/$name" 3980 fi 3981 # Do not add duplicates 3982 if test "$mynewdependency_lib"; then 3983 if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then 3984 newdependency_libs="$newdependency_libs $mynewdependency_lib" 3985 fi 3986 fi 3987 ;; 3988 *) 3989 if test "$installed" = yes; then 3990 # Rather use S=WORKDIR if our version of portage supports it. 3991 # This is because some ebuild (gcc) do not use $S as buildroot. 3992 if test "$PWORKDIR"; then 3993 S="$PWORKDIR" 3994 fi 3995 # We do not want portage's build root ($S) present. 3996 if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then 3997 mynewdependency_lib="" 3998 # We do not want portage's install root ($D) present. 3999 elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then 4000 eval mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`" 4001 else 4002 mynewdependency_lib="$deplib" 4003 fi 4004 else 4005 mynewdependency_lib="$deplib" 4006 fi 4007 # Do not add duplicates 4008 if test "$mynewdependency_lib"; then 4009 if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then 4010 newdependency_libs="$newdependency_libs $mynewdependency_lib" 4011 fi 4012 fi 3941 newdependency_libs="$newdependency_libs $libdir/$name" 4013 3942 ;; 3943 *) newdependency_libs="$newdependency_libs $deplib" ;; 4014 3944 esac 4015 3945 done 4016 3946 dependency_libs="$newdependency_libs" 4017 3947 newdlfiles= 4018 3948 for lib in $dlfiles; do 4019 3949 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 4020 eval libdir=` ${SED}-n -e 's/^libdir=\(.*\)$/\1/p' $lib`3950 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 4021 3951 if test -z "$libdir"; then 4022 3952 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 4023 3953 exit 1 … … 4028 3958 newdlprefiles= 4029 3959 for lib in $dlprefiles; do 4030 3960 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` 4031 eval libdir=` ${SED}-n -e 's/^libdir=\(.*\)$/\1/p' $lib`3961 eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` 4032 3962 if test -z "$libdir"; then 4033 3963 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 4034 3964 exit 1 … … 4043 3973 case $host,$output,$installed,$module,$dlname in 4044 3974 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; 4045 3975 esac 4046 # Do not add duplicates4047 if test "$installed" = yes && test "$D"; then4048 install_libdir="`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`"4049 fi4050 3976 $echo > $output "\ 4051 3977 # $outputname - a libtool library file 4052 3978 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP … … 4080 4006 4081 4007 # Directory that this library needs to be installed in: 4082 4008 libdir='$install_libdir'" 4083 if test "$installed" = no && test $need_relink= yes; then4009 if test "$installed" = no && test "$need_relink" = yes; then 4084 4010 $echo >> $output "\ 4085 4011 relink_command=\"$relink_command\"" 4086 4012 fi … … 4216 4142 4217 4143 # Not a directory, so check to see that there is only one file specified. 4218 4144 set dummy $files 4219 if test $#-gt 2; then4145 if test "$#" -gt 2; then 4220 4146 $echo "$modename: \`$dest' is not a directory" 1>&2 4221 4147 $echo "$help" 1>&2 4222 4148 exit 1 … … 4256 4182 4257 4183 *.la) 4258 4184 # Check to see that this really is a libtool archive. 4259 if ( ${SED}-e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :4185 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 4260 4186 else 4261 4187 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 4262 4188 $echo "$help" 1>&2 … … 4291 4217 dir="$dir$objdir" 4292 4218 4293 4219 if test -n "$relink_command"; then 4220 # Determine the prefix the user has applied to our future dir. 4221 inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"` 4222 4223 # Don't allow the user to place us outside of our expected 4224 # location b/c this prevents finding dependent libraries that 4225 # are installed to the same prefix. 4226 if test "$inst_prefix_dir" = "$destdir"; then 4227 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 4228 exit 1 4229 fi 4230 4231 if test -n "$inst_prefix_dir"; then 4232 # Stick the inst_prefix_dir data into the link command. 4233 relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` 4234 else 4235 relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"` 4236 fi 4237 4294 4238 $echo "$modename: warning: relinking \`$file'" 1>&2 4295 4239 $show "$relink_command" 4296 4240 if $run eval "$relink_command"; then : 4297 4241 else 4298 4242 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 4299 continue4243 exit 1 4300 4244 fi 4301 4245 fi 4302 4246 … … 4318 4262 $run eval "$striplib $destdir/$realname" || exit $? 4319 4263 fi 4320 4264 4321 if test $#-gt 0; then4265 if test "$#" -gt 0; then 4322 4266 # Delete the old symlinks, and create new ones. 4323 4267 for linkname 4324 4268 do … … 4405 4349 fi 4406 4350 4407 4351 # Do a test to see if this is really a libtool program. 4408 case $host in 4409 *cygwin*|*mingw*) 4410 wrapper=`echo $file | ${SED} -e 's,.exe$,,'` 4411 ;; 4412 *) 4413 wrapper=$file 4414 ;; 4415 esac 4416 if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then 4352 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4417 4353 notinst_deplibs= 4418 4354 relink_command= 4419 4355 4420 4356 # If there is no directory component, then add one. 4421 4357 case $file in 4422 */* | *\\*) . $ wrapper;;4423 *) . ./$ wrapper;;4358 */* | *\\*) . $file ;; 4359 *) . ./$file ;; 4424 4360 esac 4425 4361 4426 4362 # Check the variables that should have been set. 4427 4363 if test -z "$notinst_deplibs"; then 4428 $echo "$modename: invalid libtool wrapper script \`$ wrapper'" 1>&24364 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 4429 4365 exit 1 4430 4366 fi 4431 4367 … … 4450 4386 relink_command= 4451 4387 # If there is no directory component, then add one. 4452 4388 case $file in 4453 */* | *\\*) . $ wrapper;;4454 *) . ./$ wrapper;;4389 */* | *\\*) . $file ;; 4390 *) . ./$file ;; 4455 4391 esac 4456 4392 4457 4393 outputname= … … 4459 4395 if test "$finalize" = yes && test -z "$run"; then 4460 4396 tmpdir="/tmp" 4461 4397 test -n "$TMPDIR" && tmpdir="$TMPDIR" 4462 tmpdir="$tmpdir/libtool-$$" 4398 tmpdir=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` 4399 if test $? = 0 ; then : 4400 else 4401 tmpdir="$tmpdir/libtool-$$" 4402 fi 4463 4403 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : 4464 4404 else 4465 4405 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 … … 4499 4439 destfile=$destfile.exe 4500 4440 ;; 4501 4441 *:*.exe) 4502 destfile=`echo $destfile | ${SED}-e 's,.exe$,,'`4442 destfile=`echo $destfile | sed -e 's,.exe$,,'` 4503 4443 ;; 4504 4444 esac 4505 4445 ;; … … 4584 4524 fi 4585 4525 4586 4526 # Exit here if they wanted silent mode. 4587 test "$show" = ":"&& exit 04527 test "$show" = : && exit 0 4588 4528 4589 4529 echo "----------------------------------------------------------------------" 4590 4530 echo "Libraries have been installed in:" … … 4647 4587 case $file in 4648 4588 *.la) 4649 4589 # Check to see that this really is a libtool archive. 4650 if ( ${SED}-e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :4590 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 4651 4591 else 4652 4592 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 4653 4593 $echo "$help" 1>&2 … … 4718 4658 -*) ;; 4719 4659 *) 4720 4660 # Do a test to see if this is really a libtool program. 4721 if ( ${SED}-e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then4661 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4722 4662 # If there is no directory component, then add one. 4723 4663 case $file in 4724 4664 */* | *\\*) . $file ;; … … 4800 4740 objdir="$dir/$objdir" 4801 4741 fi 4802 4742 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 4803 test $mode= uninstall && objdir="$dir"4743 test "$mode" = uninstall && objdir="$dir" 4804 4744 4805 4745 # Remember objdir for removal later, being careful to avoid duplicates 4806 if test $mode= clean; then4746 if test "$mode" = clean; then 4807 4747 case " $rmdirs " in 4808 4748 *" $objdir "*) ;; 4809 4749 *) rmdirs="$rmdirs $objdir" ;; … … 4827 4767 case $name in 4828 4768 *.la) 4829 4769 # Possibly a libtool archive, so verify it. 4830 if ( ${SED}-e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then4770 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4831 4771 . $dir/$name 4832 4772 4833 4773 # Delete the libtool libraries and symlinks. … … 4835 4775 rmfiles="$rmfiles $objdir/$n" 4836 4776 done 4837 4777 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" 4838 test $mode= clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"4778 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" 4839 4779 4840 if test $mode= uninstall; then4780 if test "$mode" = uninstall; then 4841 4781 if test -n "$library_names"; then 4842 4782 # Do each command in the postuninstall commands. 4843 4783 eval cmds=\"$postuninstall_cmds\" … … 4846 4786 IFS="$save_ifs" 4847 4787 $show "$cmd" 4848 4788 $run eval "$cmd" 4849 if test $? !=0 && test "$rmforce" != yes; then4789 if test "$?" -ne 0 && test "$rmforce" != yes; then 4850 4790 exit_status=1 4851 4791 fi 4852 4792 done … … 4861 4801 IFS="$save_ifs" 4862 4802 $show "$cmd" 4863 4803 $run eval "$cmd" 4864 if test $? !=0 && test "$rmforce" != yes; then4804 if test "$?" -ne 0 && test "$rmforce" != yes; then 4865 4805 exit_status=1 4866 4806 fi 4867 4807 done … … 4881 4821 4882 4822 *) 4883 4823 # Do a test to see if this is a libtool program. 4884 if test $mode= clean &&4885 ( ${SED}-e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then4824 if test "$mode" = clean && 4825 (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4886 4826 relink_command= 4887 4827 . $dir/$file 4888 4828
Note:
See TracBrowser
for help on using the repository browser.