components/net-snmp/patches/009.ltmain.sh.patch
author gowtham thommandra - Sun Microsystems - Bangalore India <Gowtham.Thommandra@Sun.COM>
Fri, 20 May 2011 12:17:45 +0530
changeset 252 ee0fb1eabcbf
child 1301 636f7c363f41
permissions -rw-r--r--
7041085 move net-snmp to userland

--- net-snmp-5.4.2.1/ltmain.sh	Fri Jun  6 02:34:34 2008
+++ net-snmp-5.4.2.1/ltmain.mod.sh	Tue Feb  3 11:02:05 2009
@@ -1425,7 +1425,9 @@
 	  if test "$prev" = rpath; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
+	    *) rpath="$rpath $arg"
+        # This is make sure only $libdir path is encoded in RUNPATH
+        sma_rpath="$rpath" ;;
 	    esac
 	  else
 	    case "$xrpath " in
@@ -3915,7 +3917,7 @@
 	if test "$hardcode_into_libs" = yes; then
 	  # Hardcode the library paths
 	  hardcode_libdirs=
-	  dep_rpath=
+	  dep_rpath="-R $sma_rpath"
 	  rpath="$finalize_rpath"
 	  test "$mode" != relink && rpath="$compile_rpath$rpath"
 	  for libdir in $rpath; do
@@ -3935,7 +3937,7 @@
 		fi
 	      else
 		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
+		#dep_rpath="$dep_rpath $flag"
 	      fi
 	    elif test -n "$runpath_var"; then
 	      case "$perm_rpath " in