Skip to content

Commit

Permalink
Updating m4 script for IB
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Shamis (Pasha) committed Nov 14, 2014
1 parent 4a0c35a commit 72e9465
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 29 deletions.
49 changes: 21 additions & 28 deletions config/m4/ib.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,67 +5,60 @@
# $HEADER$
#


#
# Select IB transports
#
with_ib=no


#
# Check basic IB support: User wanted at least one IB transport, and we found
# verbs header file and library.
#
AS_IF([test "x$with_ib" != xno],
[AC_CHECK_HEADER([infiniband/verbs.h], [],
[AC_MSG_WARN([ibverbs header files not found]);with_ib=no])
save_LDFLAGS="$LDFLAGS"
AC_CHECK_LIB([ibverbs], [ibv_get_device_list],
[AC_SUBST(IBVERBS_LDFLAGS, [-libverbs])],
[AC_MSG_WARN([libibverbs not found]);with_ib=no])
LDFLAGS="$save_LDFLAGS"
])
AS_IF([test "x$with_ib" != xno],
[AC_DEFINE([HAVE_IB], 1, [IB support])])
#
# RC Support
#
AC_ARG_WITH([rc],
[AC_HELP_STRING([--with-rc], [Compile with IB Reliable Connection support])],
[],
[with_rc=yes])
AS_IF([test "x$with_rc" != xno],
AS_IF([test "x$with_rc" != xno -a "x$with_ib" != xno],
[AC_DEFINE([HAVE_TL_RC], 1, [RC transport support])
with_ib=yes
transports="${transports},rc"])


AC_ARG_WITH([ud],
[AC_HELP_STRING([--with-ud], [Compile with IB Unreliable Datagram support])],
[],
[with_ud=yes;with_ib=yes])
AS_IF([test "x$with_ud" != xno],
[with_ud=yes])
AS_IF([test "x$with_ud" != xno -a "x$with_ib" != xno],
[AC_DEFINE([HAVE_TL_UD], 1, [UD transport support])
with_ib=yes
transports="${transports},ud"])


AC_ARG_WITH([dc],
[AC_HELP_STRING([--with-dc], [Compile with IB Dynamic Connection support])],
[],
[with_dc=yes;with_ib=yes])
AS_IF([test "x$with_dc" != xno],
[with_dc=yes])
AS_IF([test "x$with_dc" != xno -a "x$with_ib" != xno],
[AC_CHECK_DECLS(IBV_EXP_QPT_DC_INI, [], [with_dc=no], [[#include <infiniband/verbs.h>]])
AC_CHECK_MEMBERS([struct ibv_exp_dct_init_attr.inline_size], [] , [with_dc=no], [[#include <infiniband/verbs.h>]])
])
AS_IF([test "x$with_dc" != xno],
AS_IF([test "x$with_dc" != xno -a "x$with_ib" != xno],
[AC_DEFINE([HAVE_TL_DC], 1, [DC transport support])
with_ib=yes
transports="${transports},dc"])


#
# Check basic IB support: User wanted at least one IB transport, and we found
# verbs header file and library.
#
AS_IF([test "x$with_ib" != xno],
[AC_CHECK_HEADER([infiniband/verbs.h], [],
[AC_MSG_WARN([ibverbs header files not found]);with_ib=no])
save_LDFLAGS="$LDFLAGS"
AC_CHECK_LIB([ibverbs], [ibv_get_device_list],
[AC_SUBST(IBVERBS_LDFLAGS, [-libverbs])],
[AC_MSG_WARN([libibverbs not found]);with_ib=no])
LDFLAGS="$save_LDFLAGS"
])
AS_IF([test "x$with_ib" != xno],
[AC_DEFINE([HAVE_IB], 1, [IB support])])


#
# Check for experimental verbs support
#
Expand Down
1 change: 0 additions & 1 deletion src/uct/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ libuct_la_SOURCES += \
ib/mlx5/ib_mlx5.c
endif
endif

0 comments on commit 72e9465

Please sign in to comment.