--- ltmain.in.orig 2008-02-01 17:12:00.000000000 +0100 +++ ltmain.in 2008-03-14 17:39:55.668379000 +0100 @@ -2801,7 +2801,10 @@ add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then + if test "$hardcode_direct" = yes && + { test -z "$inst_prefix_dir" || + test ! -f "$inst_prefix_dir$libdir/$linklib" + }; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir"