Signed-off-by: Charles Wilson <...> --- 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 e0a37ee..4aa8b45 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -1259,6 +1259,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" @@ -1610,6 +1613,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" @@ -4776,16 +4782,17 @@ func_mode_link () *.la) # A libtool-controlled library. + func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. - func_append dlfiles " $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. - func_append dlprefiles " $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - func_append deplibs " $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -5111,7 +5118,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 bf65999..be9fa58 100644 --- a/tests/sysroot.at +++ b/tests/sysroot.at @@ -182,6 +182,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