1219820Sjeffdnl Process this file with autoconf to produce a configure script. 2219820Sjeff 3219820SjeffAC_PREREQ(2.57) 4219820SjeffAC_INIT(libibcm, 1.0.5, general@lists@openfabrics.org) 5219820SjeffAC_CONFIG_SRCDIR([src/cm.c]) 6219820SjeffAC_CONFIG_AUX_DIR(config) 7219820SjeffAM_CONFIG_HEADER(config.h) 8219820SjeffAM_INIT_AUTOMAKE(libibcm, 1.0.5) 9219820Sjeff 10219820SjeffAM_PROG_LIBTOOL 11219820Sjeff 12219820SjeffAC_ARG_WITH([valgrind], 13219820Sjeff AC_HELP_STRING([--with-valgrind], 14219820Sjeff [Enable valgrind annotations - default NO])) 15219820Sjeff 16219820Sjeffif test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then 17219820Sjeff AC_DEFINE([INCLUDE_VALGRIND], 1, 18219820Sjeff [Define to 1 to enable valgrind annotations]) 19219820Sjeff if test -d $with_valgrind; then 20219820Sjeff CPPFLAGS="$CPPLFAGS -I$with_valgrind/include" 21219820Sjeff fi 22219820Sjefffi 23219820Sjeff 24219820SjeffAC_ARG_ENABLE(libcheck, [ --disable-libcheck do not test for presence of ib libraries], 25219820Sjeff[ if test "$enableval" = "no"; then 26219820Sjeff disable_libcheck=yes 27219820Sjeff fi 28219820Sjeff]) 29219820Sjeff 30219820Sjeffdnl Checks for programs 31219820SjeffAC_PROG_CC 32219820Sjeff 33219820Sjeffdnl Checks for typedefs, structures, and compiler characteristics. 34219820SjeffAC_C_CONST 35219820SjeffAC_CHECK_SIZEOF(long) 36219820Sjeff 37219820Sjeffdnl Checks for libraries 38219820Sjeffif test "$disable_libcheck" != "yes"; then 39219820SjeffAC_CHECK_LIB(ibverbs, ibv_get_device_list, [], 40219820Sjeff AC_MSG_ERROR([ibv_get_device_list() not found. libibcm requires libibverbs.])) 41219820Sjeff#Need librdmacm for cmpost test program. 42219820Sjeff#AC_CHECK_LIB(rdmacm, rdma_create_id, [], 43219820Sjeff# AC_MSG_ERROR([rdma_create_id() not found. ucmpost requires librdmacm.])) 44219820Sjefffi 45219820Sjeff 46219820Sjeffdnl Checks for header files. 47219820SjeffAC_HEADER_STDC 48219820Sjeffif test "$disable_libcheck" != "yes"; then 49219820SjeffAC_CHECK_HEADER(infiniband/verbs.h, [], 50219820Sjeff AC_MSG_ERROR([<infiniband/verbs.h> not found. Is libibverbs installed?])) 51219820SjeffAC_CHECK_HEADER(infiniband/marshall.h, [], 52219820Sjeff AC_MSG_ERROR([<infiniband/marshall.h> not found. Is libibverbs installed?])) 53219820Sjeff 54219820Sjeffif test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then 55219820SjeffAC_CHECK_HEADER(valgrind/memcheck.h, [], 56219820Sjeff AC_MSG_ERROR([valgrind requested but <valgrind/memcheck.h> not found.])) 57219820Sjefffi 58219820Sjeff 59219820Sjefffi 60219820Sjeff 61219820SjeffAC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, 62219820Sjeff if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then 63219820Sjeff ac_cv_version_script=yes 64219820Sjeff else 65219820Sjeff ac_cv_version_script=no 66219820Sjeff fi) 67219820Sjeff 68219820SjeffAM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes") 69219820Sjeff 70219820SjeffAC_CONFIG_FILES([Makefile libibcm.spec]) 71219820SjeffAC_OUTPUT 72