File: configure.in

package info (click to toggle)
libibmad 1.3.12-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,684 kB
  • ctags: 1,496
  • sloc: sh: 11,072; ansic: 4,556; makefile: 28
file content (66 lines) | stat: -rw-r--r-- 1,851 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
60
61
62
63
64
65
66
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(libibmad, 1.3.12, linux-rdma@vger.kernel.org)
AC_CONFIG_SRCDIR([src/sa.c])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([foreign])

AC_SUBST(RELEASE, ${RELEASE:-unknown})
AC_SUBST(TARBALL, ${TARBALL:-${PACKAGE}-${VERSION}.tar.gz})

dnl the library version info is available in the file: libibmad.ver
ibmad_api_version=`grep LIBVERSION $srcdir/libibmad.ver | sed 's/LIBVERSION=//'`
if test -z $ibmad_api_version; then
   ibmad_api_version=1:0:0
fi
AC_SUBST(ibmad_api_version)

AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
[       if test x$enableval = xno ; then
                disable_libcheck=yes
        fi
])

AM_PROG_LIBTOOL

dnl Checks for programs
AC_PROG_CC

dnl Checks for libraries
if test "$disable_libcheck" != "yes"
then
AC_CHECK_LIB(ibumad, umad_init, [],
	AC_MSG_ERROR([umad_init() not found. libibmad requires libibumad.]))
fi

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([netinet/in.h stdlib.h string.h sys/time.h unistd.h])
if test "$disable_libcheck" != "yes"
then
AC_CHECK_HEADER(infiniband/umad.h, [],
	AC_MSG_ERROR([<infiniband/umad.h> not found. libibmad requires libibumad.])
)
fi

dnl Checks for library functions
AC_CHECK_FUNCS([memset strrchr strtol])

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

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 libibmad.spec])
AC_OUTPUT