File: configure.in

package info (click to toggle)
libibverbs 1.0.4-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,776 kB
  • ctags: 1,581
  • sloc: sh: 8,688; ansic: 6,414; makefile: 53
file content (59 lines) | stat: -rw-r--r-- 1,951 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(libibverbs, 1.0.4, openib-general@openib.org)
AC_CONFIG_SRCDIR([src/ibverbs.h])
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(libibverbs, 1.0.4)

AM_PROG_LIBTOOL

AC_ARG_WITH([valgrind],
    AC_HELP_STRING([--with-valgrind],
        [Enable Valgrind annotations (small runtime overhead, default NO)]))
if test x$with_valgrind = x || test x$with_valgrind = xno; then
    want_valgrind=no
    AC_DEFINE([NVALGRIND], 1, [disable Valgrind annotations])
else
    want_valgrind=yes
    if test -d $with_valgrind; then
        CPPFLAGS="$CPPFLAGS -I$with_valgrind/include"
    fi
fi

dnl Checks for programs
AC_PROG_CC

dnl Checks for libraries
AC_CHECK_LIB(dl, dlsym, [],
    AC_MSG_ERROR([dlsym() not found.  libibverbs requires libdl.]))
AC_CHECK_LIB(pthread, pthread_mutex_init, [],
    AC_MSG_ERROR([pthread_mutex_init() not found.  libibverbs requires libpthread.]))
AC_CHECK_LIB(sysfs, sysfs_open_class, [],
    AC_MSG_ERROR([sysfs_open_class() not found.  libibverbs requires libsysfs.]))

dnl Checks for header files.
AC_CHECK_HEADER(sysfs/libsysfs.h, [],
    AC_MSG_ERROR([<sysfs/libsysfs.h> not found.  libibverbs requires libsysfs.]))
AC_HEADER_STDC
AC_CHECK_HEADER(valgrind/memcheck.h, memcheck_ok=yes, memcheck_ok=no)

if test $want_valgrind = yes && test $memcheck_ok = no; then
    AC_MSG_ERROR([Valgrind memcheck support requested, but <valgrind/memcheck.h> not found.])
fi

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
    if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
        ac_cv_version_script=yes
    else
        ac_cv_version_script=no
    fi)

AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")

AC_CONFIG_FILES([Makefile libibverbs.spec])
AC_OUTPUT