]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/librdmacm/configure.in
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / librdmacm / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ(2.57)
4 AC_INIT(librdmacm, 1.0.11, general@lists.openfabrics.org)
5 AC_CONFIG_SRCDIR([src/cma.c])
6 AC_CONFIG_AUX_DIR(config)
7 AM_CONFIG_HEADER(config.h)
8 AM_INIT_AUTOMAKE(librdmacm, 1.0.11)
9
10 AM_PROG_LIBTOOL
11
12 AC_ARG_WITH([valgrind],
13     AC_HELP_STRING([--with-valgrind],
14                    [Enable valgrind annotations - default NO]))
15
16 if 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
22 fi
23
24 AC_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
30 dnl Checks for programs
31 AC_PROG_CC
32
33 dnl Checks for typedefs, structures, and compiler characteristics.
34 AC_C_CONST
35 AC_CHECK_SIZEOF(long)
36
37 dnl Checks for libraries
38 if test "$disable_libcheck" != "yes"; then
39 AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
40     AC_MSG_ERROR([ibv_get_device_list() not found.  librdmacm requires libibverbs.]))
41 fi
42
43 dnl Checks for header files.
44 AC_HEADER_STDC
45 if test "$disable_libcheck" != "yes"; then
46 AC_CHECK_HEADER(infiniband/verbs.h, [],
47     AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
48
49 if test "$with_valgrind" != "" && test "$with_valgrind" != "no"; then
50 AC_CHECK_HEADER(valgrind/memcheck.h, [],
51     AC_MSG_ERROR([valgrind requested but <valgrind/memcheck.h> not found.]))
52 fi
53
54 fi
55
56 AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
57     if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
58         ac_cv_version_script=yes
59     else
60         ac_cv_version_script=no
61     fi)
62
63 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
64
65 AC_CONFIG_FILES([Makefile librdmacm.spec])
66 AC_OUTPUT