Don't search host directory during "relink" if $inst_prefix is provided Index: libtool-2.4/libltdl/config/ltmain.m4sh =================================================================== --- libtool-2.4.orig/libltdl/config/ltmain.m4sh +++ libtool-2.4/libltdl/config/ltmain.m4sh @@ -6122,12 +6122,14 @@ func_mode_link () fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. + + # Default if $libdir is not relative to the prefix: + add_dir="-L$libdir" + if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" + add_dir="-L$inst_prefix_dir$libdir" ;; esac fi