--- libtool-2.4.6/build-aux/ltmain.sh.orig	2015-02-15 17:15:12 +0100
+++ libtool-2.4.6/build-aux/ltmain.sh	2016-08-04 17:00:18 +0200
@@ -9572,6 +9572,15 @@
 	    libdir=$hardcode_libdirs
 	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
 	  fi
+          # If dep_rpath is empty, set it to the hardcoded libdir
+          # to ensure the relink is performed even if the library has
+          # no dependencies to an uninstalled lib.
+          # This prevents keeping the build dir in the library rpath.
+          if test -z "$dep_rpath"; then
+              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+              # removes the empty path after blibpath
+              dep_rpath=`echo $dep_rpath | /usr/bin/sed -e "s/::/:/"`
+          fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 	    # We should set the runpath_var.
 	    rpath=
