--- a/libltdl/config/ltmain.sh +++ b/libltdl/config/ltmain.sh @@ -5414,9 +5414,15 @@ func_mode_link () dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" + else + if test "x$CBUILD" != "x$CHOST" ; then + dir="$abs_ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else @@ -5771,7 +5777,7 @@ func_mode_link () test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" + add_dir="-L$ROOT/$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in @@ -5788,7 +5794,7 @@ func_mode_link () fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir="-L$ROOT/$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in