---
libltdl/config/ltmain.m4sh | 18 ++++++++++++++----
tests/sysroot.at | 6 ++++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 4251bb3..1a8041f 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1282,6 +1282,9 @@ func_mode_execute ()
dir=
case $file in
*.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
|| func_fatal_help "\`$lib' is not a valid libtool archive"
@@ -1634,6 +1637,9 @@ func_mode_install ()
;;
*.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
# Check to see that this really is a libtool archive.
func_lalib_unsafe_p "$file" \
|| func_fatal_help "\`$file' is not a valid libtool archive"
@@ -4498,16 +4504,17 @@ func_mode_link ()
*.la)
# A libtool-controlled library.
+ func_resolve_sysroot "$arg"
if test "$prev" = dlfiles; then
# This library was specified with -dlopen.
- dlfiles="$dlfiles $arg"
+ dlfiles="$dlfiles $func_resolve_sysroot_result"
prev=
elif test "$prev" = dlprefiles; then
# The library was specified with -dlpreopen.
- dlprefiles="$dlprefiles $arg"
+ dlprefiles="$dlprefiles $func_resolve_sysroot_result"
prev=
else
- deplibs="$deplibs $arg"
+ deplibs="$deplibs $func_resolve_sysroot_result"
fi
continue
;;
@@ -4833,7 +4840,10 @@ func_mode_link ()
deplibs="$deplib $deplibs"
continue
;;
- *.la) lib="$deplib" ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
*.$libext)
if test "$pass" = conv; then
deplibs="$deplib $deplibs"
diff --git a/tests/sysroot.at b/tests/sysroot.at
index 5fabc25..896f6e8 100644
--- a/tests/sysroot.at
+++ b/tests/sysroot.at
@@ -175,6 +175,12 @@ LT_AT_BOOTSTRAP([], [-I $abs_top_srcdir/libltdl/m4],
[ignore],
AT_CHECK([$MAKE install DESTDIR=$sysroot], [0], [ignore], [ignore])
AT_CHECK([test -f $sysroot/$prefix/bin/prog$EXEEXT])
AT_CHECK([grep -F "$sysroot" "$sysroot/$prefix/bin/prog$EXEEXT"], [1])
+
+# missing tests
+# 1) pass absolute .la files
+# 2) pass absolute -L
+# 2) pass relative .la files
+
cd ..
AT_CLEANUP
])
--
1.7.1