]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/management/libibumad/configure.in
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / management / libibumad / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ(2.57)
4 AC_INIT(libibumad, 1.3.0, general@lists.openfabrics.org)
5 AC_CONFIG_SRCDIR([src/umad.c])
6 AC_CONFIG_AUX_DIR(config)
7 AM_CONFIG_HEADER(config.h)
8 AM_INIT_AUTOMAKE
9
10 AC_SUBST(RELEASE, ${RELEASE:-unknown})
11 AC_SUBST(TARBALL, ${TARBALL:-${PACKAGE}-${VERSION}.tar.gz})
12
13 dnl the library version info is available in the file: libibumad.ver
14 ibumad_api_version=`grep LIBVERSION $srcdir/libibumad.ver | sed 's/LIBVERSION=//'`
15 if test -z $ibumad_api_version; then
16     ibumad_api_version=1:0:0
17 fi
18 AC_SUBST(ibumad_api_version)
19
20 AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
21 [       if test x$enableval = xno ; then
22                 disable_libcheck=yes
23         fi
24 ])
25
26 AC_ARG_WITH([valgrind],
27     AC_HELP_STRING([--with-valgrind],
28         [Enable Valgrind annotations (small runtime overhead, default NO)]))
29 if test x$with_valgrind = x || test x$with_valgrind = xno; then
30     want_valgrind=no
31     AC_DEFINE([NVALGRIND], 1, [Define to 1 to disable Valgrind annotations.])
32 else
33     want_valgrind=yes
34     if test -d $with_valgrind; then
35         CPPFLAGS="$CPPFLAGS -I$with_valgrind/include"
36     fi
37 fi
38
39 dnl Checks for programs
40 AC_PROG_CC
41 AC_PROG_CPP
42 AC_PROG_INSTALL
43 AC_PROG_LN_S
44 AC_PROG_MAKE_SET
45 AM_PROG_LIBTOOL
46
47 if test "$disable_libcheck" != "yes"
48 then
49 dnl Checks for libraries
50 AC_CHECK_LIB(ibcommon, sys_read_string, [],
51         AC_MSG_ERROR([sys_read_string() not found. libibumad requires libibcommon.]))
52 fi
53
54 dnl Checks for header files.
55 AC_HEADER_DIRENT
56 AC_HEADER_STDC
57 AC_CHECK_HEADERS([fcntl.h netinet/in.h stdlib.h string.h sys/ioctl.h unistd.h])
58 if test "$disable_libcheck" != "yes"
59 then
60 AC_CHECK_HEADER(infiniband/common.h, [],
61         AC_MSG_ERROR([<infiniband/common.h> not found. libibumad requires libibcommon.])
62 )
63 fi
64
65 dnl Checks for library functions
66 AC_PROG_GCC_TRADITIONAL
67 AC_FUNC_MALLOC
68 AC_CHECK_FUNCS([memset])
69
70 dnl Checks for typedefs, structures, and compiler characteristics.
71 AC_C_INLINE
72
73 AC_CHECK_HEADER(valgrind/memcheck.h,
74     [AC_DEFINE(HAVE_VALGRIND_MEMCHECK_H, 1,
75         [Define to 1 if you have the <valgrind/memcheck.h> header file.])],
76     [if test $want_valgrind = yes; then
77         AC_MSG_ERROR([Valgrind memcheck support requested, but <valgrind/memcheck.h> not found.])
78     fi])
79
80 AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
81     if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
82         ac_cv_version_script=yes
83     else
84         ac_cv_version_script=no
85     fi)
86
87 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
88
89 AC_CONFIG_FILES([Makefile libibumad.spec])
90 AC_OUTPUT