1110 |
continue |
continue |
1111 |
;; |
;; |
1112 |
esac |
esac |
1113 |
fi |
fi # test -n $prev |
1114 |
|
|
1115 |
prevarg="$arg" |
prevarg="$arg" |
1116 |
|
|
1151 |
|
|
1152 |
-export-symbols | -export-symbols-regex) |
-export-symbols | -export-symbols-regex) |
1153 |
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then |
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then |
1154 |
$echo "$modename: not more than one -exported-symbols argument allowed" |
$echo "$modename: more than one -exported-symbols argument is not allowed" |
1155 |
exit 1 |
exit 1 |
1156 |
fi |
fi |
1157 |
if test "X$arg" = "X-export-symbols"; then |
if test "X$arg" = "X-export-symbols"; then |
1173 |
esac |
esac |
1174 |
continue |
continue |
1175 |
;; |
;; |
1176 |
|
|
1177 |
-L*) |
-L*) |
1178 |
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` |
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` |
1179 |
# We need an absolute path. |
# We need an absolute path. |
1207 |
;; |
;; |
1208 |
|
|
1209 |
-l*) |
-l*) |
1210 |
if test "$arg" = "-lc"; then |
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then |
|
case $host in |
|
|
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) |
|
|
# These systems don't actually have c library (as such) |
|
|
continue |
|
|
;; |
|
|
*-*-rhapsody* | *-*-darwin1.[012]) |
|
|
# Rhapsody C library is in the System framework |
|
|
deplibs="$deplibs -framework System" |
|
|
continue |
|
|
;; |
|
|
esac |
|
|
elif test "$arg" = "-lm"; then |
|
1211 |
case $host in |
case $host in |
1212 |
*-*-cygwin* | *-*-pw32* | *-*-beos*) |
*-*-cygwin* | *-*-pw32* | *-*-beos*) |
1213 |
# These systems don't actually have math library (as such) |
# These systems don't actually have a C or math library (as such) |
1214 |
continue |
continue |
1215 |
;; |
;; |
1216 |
*-*-rhapsody* | *-*-darwin1.[012]) |
*-*-mingw* | *-*-os2*) |
1217 |
# Rhapsody math library is in the System framework |
# These systems don't actually have a C library (as such) |
1218 |
deplibs="$deplibs -framework System" |
test "X$arg" = "X-lc" && continue |
|
continue |
|
1219 |
;; |
;; |
1220 |
esac |
esac |
1221 |
fi |
fi |
1242 |
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 |
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 |
1243 |
fast_install=no |
fast_install=no |
1244 |
;; |
;; |
1245 |
*) |
*) no_install=yes ;; |
|
no_install=yes |
|
|
;; |
|
1246 |
esac |
esac |
1247 |
continue |
continue |
1248 |
;; |
;; |
1292 |
;; |
;; |
1293 |
|
|
1294 |
-static) |
-static) |
1295 |
# The effects of -static are defined in a previous loop. |
# The effects of -static are defined in a previous loop. |
1296 |
# We used to do the same as -all-static on platforms that |
# We used to do the same as -all-static on platforms that |
1297 |
# didn't have a PIC flag, but the assumption that the effects |
# didn't have a PIC flag, but the assumption that the effects |
1298 |
# would be equivalent was wrong. It would break on at least |
# would be equivalent was wrong. It would break on at least |
1502 |
;; |
;; |
1503 |
esac |
esac |
1504 |
;; |
;; |
1505 |
esac |
esac # arg |
1506 |
|
|
1507 |
# Now actually substitute the argument into the commands. |
# Now actually substitute the argument into the commands. |
1508 |
if test -n "$arg"; then |
if test -n "$arg"; then |
1509 |
compile_command="$compile_command $arg" |
compile_command="$compile_command $arg" |
1510 |
finalize_command="$finalize_command $arg" |
finalize_command="$finalize_command $arg" |
1511 |
fi |
fi |
1512 |
done |
done # argument parsing loop |
1513 |
|
|
1514 |
if test -n "$prev"; then |
if test -n "$prev"; then |
1515 |
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2 |
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2 |
1567 |
finalize_command="$finalize_command $arg" |
finalize_command="$finalize_command $arg" |
1568 |
fi |
fi |
1569 |
|
|
|
oldlibs= |
|
1570 |
# calculate the name of the file, without its directory |
# calculate the name of the file, without its directory |
1571 |
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` |
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` |
1572 |
libobjs_save="$libobjs" |
libobjs_save="$libobjs" |
1640 |
newdependency_libs= |
newdependency_libs= |
1641 |
newlib_search_path= |
newlib_search_path= |
1642 |
need_relink=no # whether we're linking any uninstalled libtool libraries |
need_relink=no # whether we're linking any uninstalled libtool libraries |
1643 |
uninst_deplibs= # uninstalled libtool libraries |
notinst_deplibs= # not-installed libtool libraries |
1644 |
uninst_path= # paths that contain uninstalled libtool libraries |
notinst_path= # paths that contain not-installed libtool libraries |
1645 |
case $linkmode in |
case $linkmode in |
1646 |
lib) |
lib) |
1647 |
passes="conv link" |
passes="conv link" |
1663 |
newdlprefiles= |
newdlprefiles= |
1664 |
passes="conv scan dlopen dlpreopen link" |
passes="conv scan dlopen dlpreopen link" |
1665 |
;; |
;; |
1666 |
*) passes="conv" |
*) passes="conv" |
1667 |
;; |
;; |
1668 |
esac |
esac |
1669 |
for pass in $passes; do |
for pass in $passes; do |
|
if test "$linkmode,$pass" = "lib,link" || |
|
|
test "$linkmode,$pass" = "prog,scan"; then |
|
|
libs="$deplibs" |
|
|
deplibs= |
|
|
fi |
|
1670 |
if test $linkmode = prog; then |
if test $linkmode = prog; then |
1671 |
|
# Determine which files to process |
1672 |
case $pass in |
case $pass in |
1673 |
dlopen) libs="$dlfiles" ;; |
dlopen) |
1674 |
|
libs="$dlfiles" |
1675 |
|
save_deplibs="$deplibs" # Collect dlpreopened libraries |
1676 |
|
deplibs= |
1677 |
|
;; |
1678 |
dlpreopen) libs="$dlprefiles" ;; |
dlpreopen) libs="$dlprefiles" ;; |
1679 |
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; |
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; |
1680 |
esac |
esac |
1681 |
fi |
fi |
|
if test $pass = dlopen; then |
|
|
# Collect dlpreopened libraries |
|
|
save_deplibs="$deplibs" |
|
|
deplibs= |
|
|
fi |
|
1682 |
for deplib in $libs; do |
for deplib in $libs; do |
1683 |
lib= |
lib= |
1684 |
found=no |
found=no |
1685 |
case $deplib in |
case $deplib in |
1686 |
-l*) |
-l*) |
1687 |
if test $linkmode != lib && test $linkmode != prog; then |
if test $linkmode = oldlib && test $linkmode = obj; then |
1688 |
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 |
$echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 |
1689 |
continue |
continue |
1690 |
fi |
fi |
1691 |
if test $pass = conv; then |
if test $pass = conv; then |
1702 |
fi |
fi |
1703 |
done |
done |
1704 |
if test "$found" != yes; then |
if test "$found" != yes; then |
1705 |
|
# deplib doesn't seem to be a libtool library |
1706 |
if test "$linkmode,$pass" = "prog,link"; then |
if test "$linkmode,$pass" = "prog,link"; then |
1707 |
compile_deplibs="$deplib $compile_deplibs" |
compile_deplibs="$deplib $compile_deplibs" |
1708 |
finalize_deplibs="$deplib $finalize_deplibs" |
finalize_deplibs="$deplib $finalize_deplibs" |
1712 |
fi |
fi |
1713 |
continue |
continue |
1714 |
fi |
fi |
1715 |
;; |
;; # -l |
1716 |
-L*) |
-L*) |
1717 |
case $linkmode in |
case $linkmode in |
1718 |
lib) |
lib) |
1735 |
fi |
fi |
1736 |
;; |
;; |
1737 |
*) |
*) |
1738 |
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 |
$echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 |
1739 |
;; |
;; |
1740 |
esac |
esac # linkmode |
1741 |
continue |
continue |
1742 |
;; |
;; # -L |
1743 |
-R*) |
-R*) |
1744 |
if test $pass = link; then |
if test $pass = link; then |
1745 |
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` |
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` |
1783 |
fi |
fi |
1784 |
continue |
continue |
1785 |
;; |
;; |
1786 |
esac |
esac # linkmode |
1787 |
;; |
;; # *.$libext |
1788 |
*.lo | *.$objext) |
*.lo | *.$objext) |
1789 |
if test $pass = conv; then |
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then |
1790 |
deplibs="$deplib $deplibs" |
# If there is no dlopen support or we're linking statically, |
1791 |
elif test $linkmode = prog; then |
# we need to preload. |
1792 |
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then |
newdlprefiles="$newdlprefiles $deplib" |
1793 |
# If there is no dlopen support or we're linking statically, |
compile_deplibs="$deplib $compile_deplibs" |
1794 |
# we need to preload. |
finalize_deplibs="$deplib $finalize_deplibs" |
1795 |
newdlprefiles="$newdlprefiles $deplib" |
else |
1796 |
compile_deplibs="$deplib $compile_deplibs" |
newdlfiles="$newdlfiles $deplib" |
|
finalize_deplibs="$deplib $finalize_deplibs" |
|
|
else |
|
|
newdlfiles="$newdlfiles $deplib" |
|
|
fi |
|
1797 |
fi |
fi |
1798 |
continue |
continue |
1799 |
;; |
;; |
1801 |
alldeplibs=yes |
alldeplibs=yes |
1802 |
continue |
continue |
1803 |
;; |
;; |
1804 |
esac |
esac # case $deplib |
1805 |
if test $found = yes || test -f "$lib"; then : |
if test $found = yes || test -f "$lib"; then : |
1806 |
else |
else |
1807 |
$echo "$modename: cannot find the library \`$lib'" 1>&2 |
$echo "$modename: cannot find the library \`$lib'" 1>&2 |
1836 |
|
|
1837 |
if test "$linkmode,$pass" = "lib,link" || |
if test "$linkmode,$pass" = "lib,link" || |
1838 |
test "$linkmode,$pass" = "prog,scan" || |
test "$linkmode,$pass" = "prog,scan" || |
1839 |
{ test $linkmode != prog && test $linkmode != lib; }; then |
{ test $linkmode = oldlib && test $linkmode = obj; }; then |
1840 |
|
# Add dl[pre]opened files of deplib |
1841 |
test -n "$dlopen" && dlfiles="$dlfiles $dlopen" |
test -n "$dlopen" && dlfiles="$dlfiles $dlopen" |
1842 |
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" |
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" |
1843 |
fi |
fi |
1844 |
|
|
1845 |
if test $pass = conv; then |
if test $pass = conv; then |
1846 |
# only check for convenience libraries |
# Only check for convenience libraries |
1847 |
deplibs="$lib $deplibs" |
deplibs="$lib $deplibs" |
1848 |
if test -z "$libdir"; then |
if test -z "$libdir"; then |
1849 |
if test -z "$old_library"; then |
if test -z "$old_library"; then |
1866 |
exit 1 |
exit 1 |
1867 |
fi |
fi |
1868 |
continue |
continue |
1869 |
fi |
fi # $pass = conv |
1870 |
|
|
1871 |
# Get the name of the library we link against. |
# Get the name of the library we link against. |
1872 |
linklib= |
linklib= |
1886 |
fi |
fi |
1887 |
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then |
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then |
1888 |
# If there is no dlname, no dlopen support or we're linking |
# If there is no dlname, no dlopen support or we're linking |
1889 |
# statically, we need to preload. We also need to preload any |
# statically, we need to preload. |
1890 |
# dependent libraries so libltdl's deplib preloader doesn't |
dlprefiles="$dlprefiles $lib" |
|
# bomb out in the load deplibs phase. |
|
|
dlprefiles="$dlprefiles $lib $dependency_libs" |
|
1891 |
else |
else |
1892 |
newdlfiles="$newdlfiles $lib" |
newdlfiles="$newdlfiles $lib" |
1893 |
fi |
fi |
1894 |
continue |
continue |
1895 |
fi |
fi # $pass = dlopen |
1896 |
|
|
1897 |
# We need an absolute path. |
# We need an absolute path. |
1898 |
case $ladir in |
case $ladir in |
1923 |
dir="$ladir/$objdir" |
dir="$ladir/$objdir" |
1924 |
absdir="$abs_ladir/$objdir" |
absdir="$abs_ladir/$objdir" |
1925 |
# Remove this search path later |
# Remove this search path later |
1926 |
uninst_path="$uninst_path $abs_ladir" |
notinst_path="$notinst_path $abs_ladir" |
1927 |
fi |
fi # $installed = yes |
1928 |
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
1929 |
|
|
1930 |
# This library was specified with -dlpreopen. |
# This library was specified with -dlpreopen. |
1943 |
else |
else |
1944 |
newdlprefiles="$newdlprefiles $dir/$linklib" |
newdlprefiles="$newdlprefiles $dir/$linklib" |
1945 |
fi |
fi |
1946 |
fi |
fi # $pass = dlpreopen |
1947 |
|
|
1948 |
if test -z "$libdir"; then |
if test -z "$libdir"; then |
1949 |
# link the convenience library |
# Link the convenience library |
1950 |
if test $linkmode = lib; then |
if test $linkmode = lib; then |
1951 |
deplibs="$dir/$old_library $deplibs" |
deplibs="$dir/$old_library $deplibs" |
1952 |
elif test "$linkmode,$pass" = "prog,link"; then |
elif test "$linkmode,$pass" = "prog,link"; then |
1953 |
compile_deplibs="$dir/$old_library $compile_deplibs" |
compile_deplibs="$dir/$old_library $compile_deplibs" |
1954 |
finalize_deplibs="$dir/$old_library $finalize_deplibs" |
finalize_deplibs="$dir/$old_library $finalize_deplibs" |
1955 |
else |
else |
1956 |
deplibs="$lib $deplibs" # used for prog,scan pass |
deplibs="$lib $deplibs" |
1957 |
fi |
fi |
1958 |
continue |
continue |
1959 |
fi |
fi |
1985 |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
1986 |
esac |
esac |
1987 |
tmp_libs="$tmp_libs $deplib" |
tmp_libs="$tmp_libs $deplib" |
1988 |
done |
done # for deplib |
1989 |
continue |
continue |
1990 |
fi |
fi # $linkmode = prog... |
1991 |
|
|
1992 |
if test "$linkmode,$pass" = "prog,link"; then |
link_static=no # Whether the deplib will be linked statically |
1993 |
if test -n "$library_names" && |
if test -n "$library_names" && |
1994 |
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
1995 |
# We need to hardcode the library path |
# Link against this shared library |
|
if test -n "$shlibpath_var"; then |
|
|
# Make sure the rpath contains only unique directories. |
|
|
case "$temp_rpath " in |
|
|
*" $dir "*) ;; |
|
|
*" $absdir "*) ;; |
|
|
*) temp_rpath="$temp_rpath $dir" ;; |
|
|
esac |
|
|
fi |
|
1996 |
|
|
1997 |
|
if test "$linkmode,$pass" = "prog,link" || |
1998 |
|
{ test $linkmode = lib && test $hardcode_into_libs = yes; }; then |
1999 |
# Hardcode the library path. |
# Hardcode the library path. |
2000 |
# Skip directories that are in the system default run-time |
# Skip directories that are in the system default run-time |
2001 |
# search path. |
# search path. |
2008 |
esac |
esac |
2009 |
;; |
;; |
2010 |
esac |
esac |
|
|
|
2011 |
case " $sys_lib_dlsearch_path " in |
case " $sys_lib_dlsearch_path " in |
2012 |
*" $libdir "*) ;; |
*" $libdir "*) ;; |
2013 |
*) |
*) |
2017 |
esac |
esac |
2018 |
;; |
;; |
2019 |
esac |
esac |
2020 |
fi |
if test $linkmode = prog; then |
2021 |
|
# We need to hardcode the library path |
2022 |
|
if test -n "$shlibpath_var"; then |
2023 |
|
# Make sure the rpath contains only unique directories. |
2024 |
|
case "$temp_rpath " in |
2025 |
|
*" $dir "*) ;; |
2026 |
|
*" $absdir "*) ;; |
2027 |
|
*) temp_rpath="$temp_rpath $dir" ;; |
2028 |
|
esac |
2029 |
|
fi |
2030 |
|
fi |
2031 |
|
fi # $linkmode,$pass = prog,link... |
2032 |
|
|
2033 |
if test "$alldeplibs" = yes && |
if test "$alldeplibs" = yes && |
2034 |
{ test "$deplibs_check_method" = pass_all || |
{ test "$deplibs_check_method" = pass_all || |
2037 |
# We only need to search for static libraries |
# We only need to search for static libraries |
2038 |
continue |
continue |
2039 |
fi |
fi |
|
fi |
|
2040 |
|
|
|
link_static=no # Whether the deplib will be linked statically |
|
|
if test -n "$library_names" && |
|
|
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
|
2041 |
if test "$installed" = no; then |
if test "$installed" = no; then |
2042 |
uninst_deplibs="$uninst_deplibs $lib" |
notinst_deplibs="$notinst_deplibs $lib" |
2043 |
need_relink=yes |
need_relink=yes |
2044 |
fi |
fi |
|
# This is a shared library |
|
|
if test $linkmode = lib && |
|
|
test $hardcode_into_libs = yes; then |
|
|
# Hardcode the library path. |
|
|
# Skip directories that are in the system default run-time |
|
|
# search path. |
|
|
case " $sys_lib_dlsearch_path " in |
|
|
*" $absdir "*) ;; |
|
|
*) |
|
|
case "$compile_rpath " in |
|
|
*" $absdir "*) ;; |
|
|
*) compile_rpath="$compile_rpath $absdir" |
|
|
esac |
|
|
;; |
|
|
esac |
|
|
case " $sys_lib_dlsearch_path " in |
|
|
*" $libdir "*) ;; |
|
|
*) |
|
|
case "$finalize_rpath " in |
|
|
*" $libdir "*) ;; |
|
|
*) finalize_rpath="$finalize_rpath $libdir" |
|
|
esac |
|
|
;; |
|
|
esac |
|
|
fi |
|
2045 |
|
|
2046 |
if test -n "$old_archive_from_expsyms_cmds"; then |
if test -n "$old_archive_from_expsyms_cmds"; then |
2047 |
# figure out the soname |
# figure out the soname |
2099 |
# make sure the library variables are pointing to the new library |
# make sure the library variables are pointing to the new library |
2100 |
dir=$output_objdir |
dir=$output_objdir |
2101 |
linklib=$newlib |
linklib=$newlib |
2102 |
fi |
fi # test -n $old_archive_from_expsyms_cmds |
2103 |
|
|
2104 |
if test $linkmode = prog || test "$mode" != relink; then |
if test $linkmode = prog || test "$mode" != relink; then |
2105 |
add_shlibpath= |
add_shlibpath= |
2198 |
fi |
fi |
2199 |
fi |
fi |
2200 |
elif test $linkmode = prog; then |
elif test $linkmode = prog; then |
2201 |
|
if test "$alldeplibs" = yes && |
2202 |
|
{ test "$deplibs_check_method" = pass_all || |
2203 |
|
{ test "$build_libtool_libs" = yes && |
2204 |
|
test -n "$library_names"; }; }; then |
2205 |
|
# We only need to search for static libraries |
2206 |
|
continue |
2207 |
|
fi |
2208 |
|
|
2209 |
|
# Try to link the static library |
2210 |
# Here we assume that one of hardcode_direct or hardcode_minus_L |
# Here we assume that one of hardcode_direct or hardcode_minus_L |
2211 |
# is not unsupported. This is valid on all known static and |
# is not unsupported. This is valid on all known static and |
2212 |
# shared platforms. |
# shared platforms. |
2223 |
if test "$deplibs_check_method" != pass_all; then |
if test "$deplibs_check_method" != pass_all; then |
2224 |
# We're trying link a shared library against a static one |
# We're trying link a shared library against a static one |
2225 |
# but the system doesn't support it. |
# but the system doesn't support it. |
2226 |
|
|
2227 |
# Just print a warning and add the library to dependency_libs so |
# Just print a warning and add the library to dependency_libs so |
2228 |
# that the program can be linked against the static library. |
# that the program can be linked against the static library. |
2229 |
echo |
echo |
2231 |
echo "*** I have the capability to make that library automatically link in when" |
echo "*** I have the capability to make that library automatically link in when" |
2232 |
echo "*** you link to this library. But I can only do this if you have a" |
echo "*** you link to this library. But I can only do this if you have a" |
2233 |
echo "*** shared version of the library, which you do not appear to have." |
echo "*** shared version of the library, which you do not appear to have." |
2234 |
|
if test "$module" = yes; then |
2235 |
|
echo "*** Therefore, libtool will create a static module, that should work " |
2236 |
|
echo "*** as long as the dlopening application is linked with the -dlopen flag." |
2237 |
|
if test -z "$global_symbol_pipe"; then |
2238 |
|
echo |
2239 |
|
echo "*** However, this would only work if libtool was able to extract symbol" |
2240 |
|
echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
2241 |
|
echo "*** not find such a program. So, this module is probably useless." |
2242 |
|
echo "*** \`nm' from GNU binutils and a full rebuild may help." |
2243 |
|
fi |
2244 |
|
if test "$build_old_libs" = no; then |
2245 |
|
build_libtool_libs=module |
2246 |
|
build_old_libs=yes |
2247 |
|
else |
2248 |
|
build_libtool_libs=no |
2249 |
|
fi |
2250 |
|
fi |
2251 |
else |
else |
2252 |
convenience="$convenience $dir/$old_library" |
convenience="$convenience $dir/$old_library" |
2253 |
old_convenience="$old_convenience $dir/$old_library" |
old_convenience="$old_convenience $dir/$old_library" |
2254 |
deplibs="$dir/$old_library $deplibs" |
deplibs="$dir/$old_library $deplibs" |
2255 |
link_static=yes |
link_static=yes |
2256 |
fi |
fi |
2257 |
fi |
fi # link shared/static library? |
2258 |
|
|
2259 |
if test $linkmode = lib; then |
if test $linkmode = lib; then |
2260 |
if test -n "$dependency_libs" && |
if test -n "$dependency_libs" && |
2328 |
*) deplibs="$path $deplibs" ;; |
*) deplibs="$path $deplibs" ;; |
2329 |
esac |
esac |
2330 |
done |
done |
2331 |
fi |
fi # link_all_deplibs != no |
2332 |
fi |
fi # linkmode = lib |
2333 |
done |
done # for deplib in $libs |
|
dependency_libs="$newdependency_libs" |
|
2334 |
if test $pass = dlpreopen; then |
if test $pass = dlpreopen; then |
2335 |
# Link the dlpreopened libraries before other libraries |
# Link the dlpreopened libraries before other libraries |
2336 |
for deplib in $save_deplibs; do |
for deplib in $save_deplibs; do |
2338 |
done |
done |
2339 |
fi |
fi |
2340 |
if test $pass != dlopen; then |
if test $pass != dlopen; then |
2341 |
|
test $pass != scan && dependency_libs="$newdependency_libs" |
2342 |
if test $pass != conv; then |
if test $pass != conv; then |
2343 |
# Make sure lib_search_path contains only unique directories. |
# Make sure lib_search_path contains only unique directories. |
2344 |
lib_search_path= |
lib_search_path= |
2361 |
eval tmp_libs=\"\$$var\" |
eval tmp_libs=\"\$$var\" |
2362 |
new_libs= |
new_libs= |
2363 |
for deplib in $tmp_libs; do |
for deplib in $tmp_libs; do |
|
# FIXME: Pedantically, this is the right thing to do, so |
|
|
# that some nasty dependency loop isn't accidentally |
|
|
# broken: |
|
|
#new_libs="$deplib $new_libs" |
|
|
# Pragmatically, this seems to cause very few problems in |
|
|
# practice: |
|
2364 |
case $deplib in |
case $deplib in |
2365 |
-L*) new_libs="$deplib $new_libs" ;; |
-L*) new_libs="$deplib $new_libs" ;; |
2366 |
*) |
*) |
2367 |
# And here is the reason: when a library appears more |
case " $specialdeplibs " in |
2368 |
# than once as an explicit dependence of a library, or |
*" $deplib "*) new_libs="$deplib $new_libs" ;; |
2369 |
# is implicitly linked in more than once by the |
*) |
2370 |
# compiler, it is considered special, and multiple |
case " $new_libs " in |
2371 |
# occurrences thereof are not removed. Compare this |
*" $deplib "*) ;; |
2372 |
# with having the same library being listed as a |
*) new_libs="$deplib $new_libs" ;; |
2373 |
# dependency of multiple other libraries: in this case, |
esac |
2374 |
# we know (pedantically, we assume) the library does not |
;; |
2375 |
# need to be listed more than once, so we keep only the |
esac |
2376 |
# last copy. This is not always right, but it is rare |
;; |
2377 |
# enough that we require users that really mean to play |
esac |
|
# such unportable linking tricks to link the library |
|
|
# using -Wl,-lname, so that libtool does not consider it |
|
|
# for duplicate removal. |
|
|
case " $specialdeplibs " in |
|
|
*" $deplib "*) new_libs="$deplib $new_libs" ;; |
|
|
*) |
|
|
case " $new_libs " in |
|
|
*" $deplib "*) ;; |
|
|
*) new_libs="$deplib $new_libs" ;; |
|
|
esac |
|
|
;; |
|
|
esac |
|
|
;; |
|
|
esac |
|
2378 |
done |
done |
2379 |
tmp_libs= |
tmp_libs= |
2380 |
for deplib in $new_libs; do |
for deplib in $new_libs; do |
2389 |
esac |
esac |
2390 |
done |
done |
2391 |
eval $var=\"$tmp_libs\" |
eval $var=\"$tmp_libs\" |
2392 |
done |
done # for var |
2393 |
fi |
fi |
2394 |
done |
if test "$pass" = "conv" && |
2395 |
|
{ test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then |
2396 |
|
libs="$deplibs" # reset libs |
2397 |
|
deplibs= |
2398 |
|
fi |
2399 |
|
done # for pass |
2400 |
if test $linkmode = prog; then |
if test $linkmode = prog; then |
2401 |
dlfiles="$newdlfiles" |
dlfiles="$newdlfiles" |
2402 |
dlprefiles="$newdlprefiles" |
dlprefiles="$newdlprefiles" |
2404 |
|
|
2405 |
case $linkmode in |
case $linkmode in |
2406 |
oldlib) |
oldlib) |
|
if test -n "$deplibs"; then |
|
|
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 |
|
|
fi |
|
|
|
|
2407 |
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then |
2408 |
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 |
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 |
2409 |
fi |
fi |
2695 |
fi |
fi |
2696 |
|
|
2697 |
# Eliminate all temporary directories. |
# Eliminate all temporary directories. |
2698 |
for path in $uninst_path; do |
for path in $notinst_path; do |
2699 |
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` |
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` |
2700 |
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` |
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` |
2701 |
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` |
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` |
2746 |
# Rhapsody C library is in the System framework |
# Rhapsody C library is in the System framework |
2747 |
deplibs="$deplibs -framework System" |
deplibs="$deplibs -framework System" |
2748 |
;; |
;; |
2749 |
*-*-netbsd*) |
*-*-netbsd*) |
2750 |
# Don't link with libc until the a.out ld.so is fixed. |
# Don't link with libc until the a.out ld.so is fixed. |
2751 |
;; |
;; |
2752 |
*) |
*) |
2753 |
# Add libc to deplibs on all other systems if necessary. |
# Add libc to deplibs on all other systems if necessary. |
2754 |
if test $build_libtool_need_lc = "yes"; then |
if test $build_libtool_need_lc = "yes"; then |
2755 |
deplibs="$deplibs -lc" |
deplibs="$deplibs -lc" |
2756 |
fi |
fi |
2757 |
;; |
;; |
2758 |
esac |
esac |
2759 |
fi |
fi |
2797 |
for i in $deplibs; do |
for i in $deplibs; do |
2798 |
name="`expr $i : '-l\(.*\)'`" |
name="`expr $i : '-l\(.*\)'`" |
2799 |
# If $name is empty we are operating on a -L argument. |
# If $name is empty we are operating on a -L argument. |
2800 |
if test "$name" != "" -a "$name" != "0"; then |
if test -n "$name" && test "$name" != "0"; then |
2801 |
libname=`eval \\$echo \"$libname_spec\"` |
libname=`eval \\$echo \"$libname_spec\"` |
2802 |
deplib_matches=`eval \\$echo \"$library_names_spec\"` |
deplib_matches=`eval \\$echo \"$library_names_spec\"` |
2803 |
set dummy $deplib_matches |
set dummy $deplib_matches |
2822 |
for i in $deplibs; do |
for i in $deplibs; do |
2823 |
name="`expr $i : '-l\(.*\)'`" |
name="`expr $i : '-l\(.*\)'`" |
2824 |
# If $name is empty we are operating on a -L argument. |
# If $name is empty we are operating on a -L argument. |
2825 |
if test "$name" != "" -a "$name" != "0"; then |
if test -n "$name" && test "$name" != "0"; then |
2826 |
$rm conftest |
$rm conftest |
2827 |
$LTCC -o conftest conftest.c $i |
$LTCC -o conftest conftest.c $i |
2828 |
# Did it work? |
# Did it work? |
2862 |
for a_deplib in $deplibs; do |
for a_deplib in $deplibs; do |
2863 |
name="`expr $a_deplib : '-l\(.*\)'`" |
name="`expr $a_deplib : '-l\(.*\)'`" |
2864 |
# If $name is empty we are operating on a -L argument. |
# If $name is empty we are operating on a -L argument. |
2865 |
if test "$name" != "" -a "$name" != "0"; then |
if test -n "$name" && test "$name" != "0"; then |
2866 |
libname=`eval \\$echo \"$libname_spec\"` |
libname=`eval \\$echo \"$libname_spec\"` |
2867 |
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
2868 |
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
2914 |
for a_deplib in $deplibs; do |
for a_deplib in $deplibs; do |
2915 |
name="`expr $a_deplib : '-l\(.*\)'`" |
name="`expr $a_deplib : '-l\(.*\)'`" |
2916 |
# If $name is empty we are operating on a -L argument. |
# If $name is empty we are operating on a -L argument. |
2917 |
if test "$name" != "" -a "$name" != "0"; then |
if test -n "$name" && test "$name" != "0"; then |
2918 |
libname=`eval \\$echo \"$libname_spec\"` |
libname=`eval \\$echo \"$libname_spec\"` |
2919 |
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
2920 |
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
2964 |
libname=$libname_save |
libname=$libname_save |
2965 |
name=$name_save |
name=$name_save |
2966 |
|
|
2967 |
|
case $host in |
2968 |
|
*-*-rhapsody* | *-*-darwin1.[012]) |
2969 |
|
# On Rhapsody replace the C library is the System framework |
2970 |
|
newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` |
2971 |
|
;; |
2972 |
|
esac |
2973 |
|
|
2974 |
if test "$droppeddeps" = yes; then |
if test "$droppeddeps" = yes; then |
2975 |
if test "$module" = yes; then |
if test "$module" = yes; then |
2976 |
echo |
echo |
3090 |
else |
else |
3091 |
soname="$realname" |
soname="$realname" |
3092 |
fi |
fi |
3093 |
if test x$dlname = x; then |
test -z "$dlname" && dlname=$soname |
|
dlname=$soname |
|
|
fi |
|
3094 |
|
|
3095 |
lib="$output_objdir/$realname" |
lib="$output_objdir/$realname" |
3096 |
for link |
for link |
3501 |
|
|
3502 |
prog) |
prog) |
3503 |
case $host in |
case $host in |
3504 |
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; |
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; |
3505 |
esac |
esac |
3506 |
if test -n "$vinfo"; then |
if test -n "$vinfo"; then |
3507 |
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
3518 |
fi |
fi |
3519 |
fi |
fi |
3520 |
|
|
3521 |
|
case $host in |
3522 |
|
*-*-rhapsody* | *-*-darwin1.[012]) |
3523 |
|
# On Rhapsody replace the C library is the System framework |
3524 |
|
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
3525 |
|
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
3526 |
|
;; |
3527 |
|
esac |
3528 |
|
|
3529 |
compile_command="$compile_command $compile_deplibs" |
compile_command="$compile_command $compile_deplibs" |
3530 |
finalize_command="$finalize_command $finalize_deplibs" |
finalize_command="$finalize_command $finalize_deplibs" |
3531 |
|
|
3988 |
# This environment variable determines our operation mode. |
# This environment variable determines our operation mode. |
3989 |
if test \"\$libtool_install_magic\" = \"$magic\"; then |
if test \"\$libtool_install_magic\" = \"$magic\"; then |
3990 |
# install mode needs the following variable: |
# install mode needs the following variable: |
3991 |
uninst_deplibs='$uninst_deplibs' |
notinst_deplibs='$notinst_deplibs' |
3992 |
else |
else |
3993 |
# When we are sourced in execute mode, \$file and \$echo are already set. |
# When we are sourced in execute mode, \$file and \$echo are already set. |
3994 |
if test \"\$libtool_execute_magic\" != \"$magic\"; then |
if test \"\$libtool_execute_magic\" != \"$magic\"; then |
4709 |
|
|
4710 |
# Do a test to see if this is really a libtool program. |
# Do a test to see if this is really a libtool program. |
4711 |
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
4712 |
uninst_deplibs= |
notinst_deplibs= |
4713 |
relink_command= |
relink_command= |
4714 |
|
|
4715 |
# If there is no directory component, then add one. |
# If there is no directory component, then add one. |
4719 |
esac |
esac |
4720 |
|
|
4721 |
# Check the variables that should have been set. |
# Check the variables that should have been set. |
4722 |
if test -z "$uninst_deplibs"; then |
if test -z "$notinst_deplibs"; then |
4723 |
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 |
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 |
4724 |
exit 1 |
exit 1 |
4725 |
fi |
fi |
4726 |
|
|
4727 |
finalize=yes |
finalize=yes |
4728 |
for lib in $uninst_deplibs; do |
for lib in $notinst_deplibs; do |
4729 |
# Check to see that each library is installed. |
# Check to see that each library is installed. |
4730 |
libdir= |
libdir= |
4731 |
if test -f "$lib"; then |
if test -f "$lib"; then |
4882 |
fi |
fi |
4883 |
|
|
4884 |
# Exit here if they wanted silent mode. |
# Exit here if they wanted silent mode. |
4885 |
test "$show" = : && exit 0 |
test "$show" = ":" && exit 0 |
4886 |
|
|
4887 |
echo "----------------------------------------------------------------------" |
echo "----------------------------------------------------------------------" |
4888 |
echo "Libraries have been installed in:" |
echo "Libraries have been installed in:" |
5105 |
|
|
5106 |
# Remember objdir for removal later, being careful to avoid duplicates |
# Remember objdir for removal later, being careful to avoid duplicates |
5107 |
if test $mode = clean; then |
if test $mode = clean; then |
5108 |
case " $rmdirs " in |
case " $rmdirs " in |
5109 |
*" $objdir "*) ;; |
*" $objdir "*) ;; |
5110 |
*) rmdirs="$rmdirs $objdir" ;; |
*) rmdirs="$rmdirs $objdir" ;; |
5111 |
esac |
esac |
5112 |
fi |
fi |
5113 |
|
|
5114 |
# Don't error if the file doesn't exist and rm -f was used. |
# Don't error if the file doesn't exist and rm -f was used. |
5115 |
if (test -L "$file") >/dev/null 2>&1 \ |
if (test -L "$file") >/dev/null 2>&1 \ |
5116 |
|| (test -h "$file") >/dev/null 2>&1 \ |
|| (test -h "$file") >/dev/null 2>&1 \ |
5215 |
# Try to remove the ${objdir}s in the directories where we deleted files |
# Try to remove the ${objdir}s in the directories where we deleted files |
5216 |
for dir in $rmdirs; do |
for dir in $rmdirs; do |
5217 |
if test -d "$dir"; then |
if test -d "$dir"; then |
5218 |
$show "rmdir $dir" |
$show "rmdir $dir" |
5219 |
$run rmdir $dir >/dev/null 2>&1 |
$run rmdir $dir >/dev/null 2>&1 |
5220 |
fi |
fi |
5221 |
done |
done |
5222 |
|
|
5292 |
This mode accepts the following additional options: |
This mode accepts the following additional options: |
5293 |
|
|
5294 |
-o OUTPUT-FILE set the output file name to OUTPUT-FILE |
-o OUTPUT-FILE set the output file name to OUTPUT-FILE |
5295 |
|
-prefer-pic try to building PIC objects only |
5296 |
|
-prefer-non-pic try to building non-PIC objects only |
5297 |
-static always build a \`.o' file suitable for static linking |
-static always build a \`.o' file suitable for static linking |
5298 |
|
|
5299 |
COMPILE-COMMAND is a command to be used in creating a \`standard' object file |
COMPILE-COMMAND is a command to be used in creating a \`standard' object file |