Hi developers,
You can find attached a patch that make hwloc, freeipmi, ofed and
rrdtool autoconf macros honor the --without-rpath flag when set, like
munge and bluegene macros already do.
Sorry, I didn't run autogen.sh in the patch since the version of
autotools on my laptop is older than yours.
Hope you're gonna like it!
Regards,
--
R�mi Palancher
<[email protected]>
diff --git a/auxdir/x_ac_freeipmi.m4 b/auxdir/x_ac_freeipmi.m4
index 348d703..e3f9c91 100644
--- a/auxdir/x_ac_freeipmi.m4
+++ b/auxdir/x_ac_freeipmi.m4
@@ -51,7 +51,11 @@ AS_VAR_SET(x_ac_cv_freeipmi_dir, $d), [])
AC_MSG_WARN([unable to locate freeipmi installation])
else
FREEIPMI_CPPFLAGS="-I$x_ac_cv_freeipmi_dir/include"
- FREEIPMI_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_freeipmi_dir/$bit -L$x_ac_cv_freeipmi_dir/$bit"
+ if test "$ac_with_rpath" = "yes"; then
+ FREEIPMI_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_freeipmi_dir/$bit -L$x_ac_cv_freeipmi_dir/$bit"
+ else
+ FREEIPMI_LDFLAGS="-L$x_ac_cv_freeipmi_dir/$bit"
+ fi
FREEIPMI_LIBS="-lipmimonitoring"
AC_DEFINE(HAVE_FREEIPMI, 1, [Define to 1 if freeipmi library found])
fi
diff --git a/auxdir/x_ac_hwloc.m4 b/auxdir/x_ac_hwloc.m4
index 72117d4..f50f65f 100644
--- 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
diff --git a/auxdir/x_ac_ofed.m4 b/auxdir/x_ac_ofed.m4
index 8b7975b..9d53e66 100644
--- a/auxdir/x_ac_ofed.m4
+++ b/auxdir/x_ac_ofed.m4
@@ -52,7 +52,11 @@ AC_DEFUN([X_AC_OFED],
AC_MSG_WARN([unable to locate ofed installation])
else
OFED_CPPFLAGS="-I$x_ac_cv_ofed_dir/include/infiniband"
- OFED_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_ofed_dir/$bit -L$x_ac_cv_ofed_dir/$bit"
+ if test "$ac_with_rpath" = "yes"; then
+ OFED_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_ofed_dir/$bit -L$x_ac_cv_ofed_dir/$bit"
+ else
+ OFED_LDFLAGS="-L$x_ac_cv_ofed_dir/$bit"
+ fi
OFED_LIBS="-libmad -libumad"
AC_DEFINE(HAVE_OFED, 1, [Define to 1 if ofed library found])
if test ! -z "$have_pma_query_via" ; then
diff --git a/auxdir/x_ac_rrdtool.m4 b/auxdir/x_ac_rrdtool.m4
index bda6340..d88414b 100644
--- a/auxdir/x_ac_rrdtool.m4
+++ b/auxdir/x_ac_rrdtool.m4
@@ -55,7 +55,11 @@ AC_DEFUN([X_AC_RRDTOOL],
AC_MSG_WARN([unable to locate rrdtool installation])
else
RRDTOOL_CPPFLAGS="-I$x_ac_cv_rrdtool_dir/include"
- RRDTOOL_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_rrdtool_dir/$bit -L$x_ac_cv_rrdtool_dir/$bit"
+ if test "$ac_with_rpath" = "yes"; then
+ RRDTOOL_LDFLAGS="-Wl,-rpath -Wl,$x_ac_cv_rrdtool_dir/$bit -L$x_ac_cv_rrdtool_dir/$bit"
+ else
+ RRDTOOL_LDFLAGS="-L$x_ac_cv_rrdtool_dir/$bit"
+ fi
RRDTOOL_LIBS="-lrrd"
fi