[tools] libtool: extend all ltmain.m4sh patches to cover ltmain.sh as well, prevent...
[openwrt/svn-archive/archive.git] / tools / libtool / patches / 150-trailingslash.patch
index 14aa27be860944dce474d9bcb464ade832f2e265..a01f9be77b1594f908a78ece71d6091f70189ce0 100644 (file)
@@ -28,3 +28,22 @@ Nitin A Kamble <nitin.a.kamble@intel.com>
  
          # Don't allow the user to place us outside of our expected
          # location b/c this prevents finding dependent libraries that
  
          # Don't allow the user to place us outside of our expected
          # location b/c this prevents finding dependent libraries that
+--- a/libltdl/config/ltmain.sh
++++ b/libltdl/config/ltmain.sh
+@@ -2953,8 +2953,15 @@ func_mode_install ()
+       func_append dir "$objdir"
+       if test -n "$relink_command"; then
++      # Strip any trailing slash from the destination.
++      func_stripname '' '/' "$libdir"
++      destlibdir=$func_stripname_result
++
++      func_stripname '' '/' "$destdir"
++      s_destdir=$func_stripname_result
++
+         # Determine the prefix the user has applied to our future dir.
+-        inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
++        inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that