1 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT(libibmad, 1.3.0, general@lists.openfabrics.org)
5 AC_CONFIG_SRCDIR([src/sa.c])
6 AC_CONFIG_AUX_DIR(config)
7 AM_CONFIG_HEADER(config.h)
10 AC_SUBST(RELEASE, ${RELEASE:-unknown})
11 AC_SUBST(TARBALL, ${TARBALL:-${PACKAGE}-${VERSION}.tar.gz})
13 dnl the library version info is available in the file: libibmad.ver
14 ibmad_api_version=`grep LIBVERSION $srcdir/libibmad.ver | sed 's/LIBVERSION=//'`
15 if test -z $ibmad_api_version; then
16 ibmad_api_version=1:0:0
18 AC_SUBST(ibmad_api_version)
20 AC_ARG_ENABLE(libcheck, [ --disable-libcheck do not test for presence of ib libraries],
21 [ if test x$enableval = xno ; then
28 dnl Checks for programs
31 dnl Checks for libraries
32 if test "$disable_libcheck" != "yes"
34 AC_CHECK_LIB(ibcommon, sys_read_string, [],
35 AC_MSG_ERROR([sys_read_string() not found. libibmad requires libibcommon.]))
36 AC_CHECK_LIB(ibumad, umad_init, [],
37 AC_MSG_ERROR([umad_init() not found. libibmad requires libibumad.]))
40 dnl Checks for header files.
42 AC_CHECK_HEADERS([netinet/in.h stdlib.h string.h sys/time.h unistd.h])
43 if test "$disable_libcheck" != "yes"
45 AC_CHECK_HEADER(infiniband/common.h, [],
46 AC_MSG_ERROR([<infiniband/common.h> not found. libibmad requires libibcommon.])
48 AC_CHECK_HEADER(infiniband/umad.h, [],
49 AC_MSG_ERROR([<infiniband/umad.h> not found. libibmad requires libibumad.])
53 dnl Checks for library functions
54 AC_CHECK_FUNCS([memset strrchr strtol])
56 dnl Checks for typedefs, structures, and compiler characteristics.
60 AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
61 if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
62 ac_cv_version_script=yes
64 ac_cv_version_script=no
67 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
69 AC_CONFIG_FILES([Makefile libibmad.spec])