1dnl Process this file with autoconf to produce a configure script. 2 3AC_PREREQ(2.57) 4AC_INIT(libibcm, 1.0.5, general@lists@openfabrics.org) 5AC_CONFIG_SRCDIR([src/cm.c]) 6AC_CONFIG_AUX_DIR(config) 7AM_CONFIG_HEADER(config.h) 8AM_INIT_AUTOMAKE(libibcm, 1.0.5) 9 10AM_PROG_LIBTOOL 11 12AC_ARG_WITH([valgrind], 13 AC_HELP_STRING([--with-valgrind], 14 [Enable valgrind annotations - default NO])) 15 16if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then 17 AC_DEFINE([INCLUDE_VALGRIND], 1, 18 [Define to 1 to enable valgrind annotations]) 19 if test -d $with_valgrind; then 20 CPPFLAGS="$CPPLFAGS -I$with_valgrind/include" 21 fi 22fi 23 24AC_ARG_ENABLE(libcheck, [ --disable-libcheck do not test for presence of ib libraries], 25[ if test "$enableval" = "no"; then 26 disable_libcheck=yes 27 fi 28]) 29 30dnl Checks for programs 31AC_PROG_CC 32 33dnl Checks for typedefs, structures, and compiler characteristics. 34AC_C_CONST 35AC_CHECK_SIZEOF(long) 36 37dnl Checks for libraries 38if test "$disable_libcheck" != "yes"; then 39AC_CHECK_LIB(ibverbs, ibv_get_device_list, [], 40 AC_MSG_ERROR([ibv_get_device_list() not found. libibcm requires libibverbs.])) 41#Need librdmacm for cmpost test program. 42#AC_CHECK_LIB(rdmacm, rdma_create_id, [], 43# AC_MSG_ERROR([rdma_create_id() not found. ucmpost requires librdmacm.])) 44fi 45 46dnl Checks for header files. 47AC_HEADER_STDC 48if test "$disable_libcheck" != "yes"; then 49AC_CHECK_HEADER(infiniband/verbs.h, [], 50 AC_MSG_ERROR([<infiniband/verbs.h> not found. Is libibverbs installed?])) 51AC_CHECK_HEADER(infiniband/marshall.h, [], 52 AC_MSG_ERROR([<infiniband/marshall.h> not found. Is libibverbs installed?])) 53 54if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then 55AC_CHECK_HEADER(valgrind/memcheck.h, [], 56 AC_MSG_ERROR([valgrind requested but <valgrind/memcheck.h> not found.])) 57fi 58 59fi 60 61AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, 62 if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then 63 ac_cv_version_script=yes 64 else 65 ac_cv_version_script=no 66 fi) 67 68AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes") 69 70AC_CONFIG_FILES([Makefile libibcm.spec]) 71AC_OUTPUT 72