Description: honor --without-rpath whithin LDFLAGS when hwloc is enable
  Even when --without-rpath flag was given to configure, the autotools macro
  which set LDFLAGS when hwloc library is enable were using rpath parameter.
  This is considered harmfull by lintian. This patch makes the macro honor
  the --without-rpath flag.
Author: Rémi Palancher <remi@rezib.org>
Forwarded: http://thread.gmane.org/gmane.comp.distributed.slurm.devel/6149
Applied-Upstream: 14.03.11-rc2
Last-Update: 2014-10-22

--- a/auxdir/x_ac_hwloc.m4
+++ b/auxdir/x_ac_hwloc.m4
@@ -52,7 +52,11 @@ AC_DEFUN([X_AC_HWLOC],
     AC_MSG_WARN([unable to locate hwloc installation])
   else
     HWLOC_CPPFLAGS="-I$x_ac_cv_hwloc_dir/include"
-    HWLOC_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_hwloc_dir/$bit -L$x_ac_cv_hwloc_dir/$bit"
+    if test "$ac_with_rpath" = "yes"; then
+      HWLOC_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_hwloc_dir/$bit -L$x_ac_cv_hwloc_dir/$bit"
+    else
+      HWLOC_LDFLAGS="-L$x_ac_cv_hwloc_dir/$bit"
+    fi
     HWLOC_LIBS="-lhwloc"
     AC_DEFINE(HAVE_HWLOC, 1, [Define to 1 if hwloc library found])
     if test "$x_ac_cv_hwloc_pci" = "yes"; then
