http://lists.gnu.org/archive/html/bug-libtool/2008-03/msg00124.html

but this patch disables hardcoding independent of inst_prefix_dir at all,
for both hardcode_direct=yes and hardcode_minus_L=yes.

If you update this patch, please also update libtool/files/libtool-1.3d-hardcode.patch

--- ltmain.in.orig	2008-04-16 15:54:04.000000000 +0200
+++ ltmain.in	2008-04-16 16:21:04.000000000 +0200
@@ -1900,9 +1900,9 @@
 	    add_dir=
 	    add=
 	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes; then
+	    if false && test "$hardcode_direct" = yes; then
 	      add="$libdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
+	    elif false && test "$hardcode_minus_L" = yes; then
 	      add_dir="-L$libdir"
 	      add="-l$name"
 	    elif test "$hardcode_shlibpath_var" = yes; then