add a machinereadable version of ctdb stats/statistics
[metze/ctdb/wip.git] / ib / config.m4
1 AC_ARG_ENABLE(--enable-infiniband, 
2 [  --enable-infiniband         Turn on infiniband support (default=no)])
3
4 HAVE_INFINIBAND=no
5
6 if eval "test x$enable_infiniband = xyes"; then
7         AC_DEFINE(USE_INFINIBAND,1,[Use infiniband])
8         HAVE_INFINIBAND=yes
9
10         INFINIBAND_WRAPPER_OBJ="ib/ibwrapper.o ib/ibw_ctdb.o ib/ibw_ctdb_init.o"
11         INFINIBAND_LIBS="-lrdmacm -libverbs"
12         INFINIBAND_BINS="tests/bin/ibwrapper_test"
13
14         AC_CHECK_HEADERS(infiniband/verbs.h, [], [
15                 echo "ERROR: you need infiniband/verbs.h when ib enabled!"
16                 exit -1])
17         AC_CHECK_HEADERS(rdma/rdma_cma.h, [], [
18                 echo "ERROR: you need rdma/rdma_cma.h when ib enabled!"
19                 exit -1])
20         AC_CHECK_LIB(ibverbs, ibv_create_qp, [], [
21                 echo "ERROR: you need libibverbs when ib enabled!"
22                 exit -1])
23         AC_CHECK_LIB(rdmacm, rdma_connect, [], [
24                 echo "ERROR: you need librdmacm when ib enabled!"
25                 exit -1])
26 fi
27
28 AC_SUBST(HAVE_INFINIBAND)
29 AC_SUBST(INFINIBAND_WRAPPER_OBJ)
30 AC_SUBST(INFINIBAND_LIBS)
31 AC_SUBST(INFINIBAND_BINS)