--- libtool.orig	2019-06-24 08:06:14 +0000
+++ libtool	2019-06-24 08:07:49 +0000
@@ -299,6 +299,12 @@
 # resulting binary.
 hardcode_direct=yes
 
+# Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting $shlibpath_var if the
+# library is relocated.
+hardcode_direct_absolute=yes
+
 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 # resulting binary.
 hardcode_minus_L=no
@@ -3155,7 +3161,7 @@
 	    add_dir=
 	    add=
 	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes; then
+	    if test "$hardcode_direct" = yes && test no = "$hardcode_direct_absolute"; then
 	      add="$libdir/$linklib"
 	    elif test "$hardcode_minus_L" = yes; then
 	      add_dir="-L$libdir"
