[Openais] [PATCH] Fix configure tests for rdma

Angus Salkeld asalkeld at redhat.com
Tue Aug 24 17:42:00 PDT 2010


Infiniband libraries don't currently have .pc files so the configure always fails.
This uses more basic tests to determine it's presence.

-Angus

Signed-off-by: Angus Salkeld <asalkeld at redhat.com>
---
 configure.ac |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index fd0d998..3633a17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -377,8 +377,18 @@ if test "x${enable_testagents}" = xyes; then
 fi
 
 if test "x${enable_rdma}" = xyes; then
-	PKG_CHECK_MODULES([rdmacm],[rdmacm])
-	PKG_CHECK_MODULES([ibverbs],[ibverbs])
+    AC_CHECK_HEADERS(infiniband/verbs.h,
+                    AC_SUBST(ibverbs_CFLAGS, ),
+                    AC_MSG_ERROR([no ibverbs headers]))
+    AC_CHECK_HEADERS(rdma/rdma_cma.h,
+                    AC_SUBST(rdmacm_CFLAGS, ),
+                    AC_MSG_ERROR([no rdmacm headers]))
+    AC_CHECK_LIB([rdmacm], [rdma_destroy_event_channel],
+                 AC_SUBST([rdmacm_LIBS], -lrdmacm),
+                 AC_MSG_ERROR([no rdmacm lib]))
+    AC_CHECK_LIB([ibverbs], [ibv_fork_init],
+                 AC_SUBST([ibverbs_LIBS], -libverbs),
+                 AC_MSG_ERROR([no ibverbs lib]))
 	AC_DEFINE_UNQUOTED([HAVE_RDMA], 1, [have rdmacm])
 	PACKAGE_FEATURES="$PACKAGE_FEATURES rdma"
 fi
-- 
1.7.1



More information about the Openais mailing list