1
1

Always defining OMPI_ENABLE_DYNAMIC_SL, not only when the feature enabled.

Also, refactoring some code - make all the checks only when relevant.

This commit was SVN r24900.
Этот коммит содержится в:
Yevgeny Kliteynik 2011-07-13 23:19:58 +00:00
родитель 1d65833980
Коммит 78ea8bcea2

Просмотреть файл

@ -160,9 +160,7 @@ dnl [enable_openib_ibcm="$enableval"], [enable_openib_ibc
# #
AC_ARG_ENABLE([openib-dynamic-sl], AC_ARG_ENABLE([openib-dynamic-sl],
[AC_HELP_STRING([--enable-openib-dynamic-sl], [AC_HELP_STRING([--enable-openib-dynamic-sl],
[Enable openib BTL to query Subnet Manager for IB SL (default: enabled)])], [Enable openib BTL to query Subnet Manager for IB SL (default: enabled)])])
[enable_openib_dynamic_sl="$enableval"],
[enable_openib_dynamic_sl="not_provided"])
# Set these up so that we can do an AC_DEFINE below # Set these up so that we can do an AC_DEFINE below
# (unconditionally) # (unconditionally)
@ -186,14 +184,28 @@ dnl [enable_openib_ibcm="$enableval"], [enable_openib_ibc
AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], [$1_have_xrc=1]) AC_CHECK_FUNCS([ibv_create_xrc_rcv_qp], [$1_have_xrc=1])
fi fi
# We need ib_types.h file, which is installed with opensm-devel if test "no" != "$enable_openib_dynamic_sl"; then
# package. However, ib_types.h has a bad include directive, # We need ib_types.h file, which is installed with opensm-devel
# which will cause AC_CHECK_HEADER to fail. # package. However, ib_types.h has a bad include directive,
# So instead, we will look for another file that is also # which will cause AC_CHECK_HEADER to fail.
# installed as part of opensm-devel package and included in # So instead, we will look for another file that is also
# ib_types.h, but it doesn't include any other IB-related files. # installed as part of opensm-devel package and included in
AC_CHECK_HEADER([infiniband/complib/cl_types_osd.h], # ib_types.h, but it doesn't include any other IB-related files.
[$1_have_opensm_devel=1], [], []) AC_CHECK_HEADER([infiniband/complib/cl_types_osd.h],
[$1_have_opensm_devel=1], [], [])
# Abort if dynamic SL support was explicitly requested but opensm-devel
# package wasn't found. Otherwise, OMPI will be built w/o dynamic SL.
AC_MSG_CHECKING([if can use dynamic SL support])
AS_IF([test "$$1_have_opensm_devel" = "1"],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AS_IF([test "$enable_openib_dynamic_sl" = "yes"],
[AC_MSG_WARN([--enable-openib-dynamic-sl was specified but the])
AC_MSG_WARN([appropriate header files could not be found])
AC_MSG_WARN([Please install opensm-devel if you need dynamic SL support])
AC_MSG_ERROR([Cannot continue])])])
fi
# Do we have a recent enough RDMA CM? Need to have the # Do we have a recent enough RDMA CM? Need to have the
# rdma_get_peer_addr (inline) function (originally appeared # rdma_get_peer_addr (inline) function (originally appeared
@ -264,18 +276,13 @@ dnl fi
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
if test "no" != "$enable_openib_dynamic_sl"; then AC_MSG_CHECKING([if dynamic SL is enabled])
# Abort if dynamic SL support was explicitly requested but opensm-devel AC_DEFINE_UNQUOTED([OMPI_ENABLE_DYNAMIC_SL], [$$1_have_opensm_devel],
# package wasn't found. Otherwise, OMPI will be built w/o dynamic SL. [Enable features required for dynamic SL support])
AC_MSG_CHECKING([if can use dynamic SL support]) if test "1" = "$$1_have_opensm_devel"; then
AS_IF([test "$$1_have_opensm_devel" = "1"], AC_MSG_RESULT([yes])
[AC_MSG_RESULT([yes])], else
[AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AS_IF([test "$enable_openib_dynamic_sl" = "yes"],
[AC_MSG_WARN([--enable-openib-dynamic-sl was specified but the])
AC_MSG_WARN([appropriate header files could not be found])
AC_MSG_WARN([Please install opensm-devel if you need dynamic SL support])
AC_MSG_ERROR([Cannot continue])])])
fi fi
AC_MSG_CHECKING([if OpenFabrics RDMACM support is enabled]) AC_MSG_CHECKING([if OpenFabrics RDMACM support is enabled])