From 4d6d4f46b0f0007597cf05f136de3bb0b60bf526 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 12 Aug 2014 21:30:06 +0000 Subject: [PATCH] switch udreg config macro to use pkg-config This commit was SVN r32516. --- contrib/platform/lanl/cray_xe6/cray-common | 4 +++- opal/mca/mpool/udreg/configure.m4 | 25 ++++++++++------------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/contrib/platform/lanl/cray_xe6/cray-common b/contrib/platform/lanl/cray_xe6/cray-common index fd1177f298..c237625a20 100644 --- a/contrib/platform/lanl/cray_xe6/cray-common +++ b/contrib/platform/lanl/cray_xe6/cray-common @@ -17,7 +17,9 @@ with_ugni=/opt/cray/ugni/4.0-1.0401.5928.9.5.gem with_ugni_includedir=/opt/cray/gni-headers/default/include # enable the udreg mpool -with_udreg=/opt/cray/udreg/2.3.2-1.0401.5929.3.3.gem +# deprecated, no longer needed (non-default udreg can be selected via PKG_CONFIG_PATH env variable). +# +#with_udreg=/opt/cray/udreg/2.3.2-1.0401.5929.3.3.gem if test -e /opt/cray/alps/default ; then # use default location for CLE4 diff --git a/opal/mca/mpool/udreg/configure.m4 b/opal/mca/mpool/udreg/configure.m4 index 0a1f208dab..ba5c62016e 100644 --- a/opal/mca/mpool/udreg/configure.m4 +++ b/opal/mca/mpool/udreg/configure.m4 @@ -24,26 +24,23 @@ AC_DEFUN([MCA_opal_mpool_udreg_CONFIG],[ AC_CONFIG_FILES([opal/mca/mpool/udreg/Makefile]) - AC_ARG_WITH([udreg], [AC_HELP_STRING([--with-udreg(=DIR)], - [Build support for Cray udreg support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])]) - OPAL_CHECK_WITHDIR([udreg], [$with_udreg], [.]) + AC_ARG_WITH([udreg], [AC_HELP_STRING([--with-udreg], + [Build support for Cray udreg support. Set PKG_CONFIG_PATH env. variable to specify alternate path.])]) mpool_udreg_happy="no" - if test "$with_udreg" != "no" ; then - if test -n "$with_udreg" -a "$with_udreg" != "yes" ; then - opal_check_udreg_dir="$with_udreg" - else - opal_check_udreg_dir="" - fi - - OPAL_CHECK_PACKAGE([mpool_udreg], [udreg_pub.h], [udreg], [UDREG_CacheCreate], - [], [$opal_check_udreg_dir], ["$opal_check_udreg_dir/lib64"], - [mpool_udreg_happy="yes"], [mpool_udreg_happy="no"]) - fi + AS_IF([test "$with_udreg" = "no"], + [mpool_udreg_happy="no"], + [PKG_CHECK_MODULES([CRAY_UDREG], [cray-udreg], + [mpool_udreg_LDFLAGS="$CRAY_UDREG_LIBS" + mpool_udreg_CPPFLAGS="$CRAY_UDREG_CFLAGS" + mpool_udreg_happy="yes"], + [AC_MSG_RESULT([no]) + mpool_udreg_happ="no"])]) AS_IF([test "$mpool_udreg_happy" = "yes"], [$1], [$2]) + # substitute in the things needed to build ugni AC_SUBST([mpool_udreg_CPPFLAGS]) AC_SUBST([mpool_udreg_LDFLAGS])