From a503bd53b7c270789ad7be754d9badd0e2433be1 Mon Sep 17 00:00:00 2001 From: Yevgeny Kliteynik Date: Tue, 11 Oct 2011 09:10:06 +0000 Subject: [PATCH] Fixing the librdmacm dependency for build process If a user specifically asks for rdmacm support in configure script and librdmacm (usual and devel) libraries are not found, configure script would abort. If a user didn't specify anything, and rdmacm libraries are not found, configure script will continue after issuing warning message: "Please install librdmacm and librdmacm-devel or disable rdmacm support" -- YK This commit was SVN r25253. --- ompi/config/ompi_check_openib.m4 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ompi/config/ompi_check_openib.m4 b/ompi/config/ompi_check_openib.m4 index 0831784322..5109ef84dd 100644 --- a/ompi/config/ompi_check_openib.m4 +++ b/ompi/config/ompi_check_openib.m4 @@ -81,8 +81,7 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[ # AC_ARG_ENABLE([openib-rdmacm], [AC_HELP_STRING([--enable-openib-rdmacm], - [Enable Open Fabrics RDMACM support in openib BTL (default: enabled)])], - [enable_openib_rdmacm="$enableval"], [enable_openib_rdmacm="yes"]) + [Enable Open Fabrics RDMACM support in openib BTL (default: enabled)])]) AS_IF([test ! -z "$with_openib" -a "$with_openib" != "yes"], [ompi_check_openib_dir="$with_openib"]) @@ -216,7 +215,7 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[ # Do we have a recent enough RDMA CM? Need to have the # rdma_get_peer_addr (inline) function (originally appeared # in OFED v1.3). - if test "$enable_openib_rdmacm" = "yes"; then + if test "$enable_openib_rdmacm" != "no"; then AC_CHECK_HEADERS([rdma/rdma_cma.h], [AC_CHECK_LIB([rdmacm], [rdma_create_id], [AC_MSG_CHECKING([for rdma_get_peer_addr]) @@ -228,7 +227,13 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[ AC_MSG_RESULT([$$1_msg])])]) if test "1" = "$$1_have_rdmacm"; then - $1_LIBS="-lrdmacm $$1_LIBS" + $1_LIBS="-lrdmacm $$1_LIBS" + else + AS_IF([test "$enable_openib_rdmacm" = "yes"], + [AC_MSG_WARN([--enable-openib-rdmacm was specified but the]) + AC_MSG_WARN([appropriate files could not be found]) + AC_MSG_WARN([Please install librdmacm and librdmacm-devel or disable rdmacm support]) + AC_MSG_ERROR([Cannot continue])]) fi fi