forked from intel/libnica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
58 lines (49 loc) · 1.89 KB
/
configure.ac
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
AC_INIT([libnica], 2, [[email protected]], [libnica], [https://github.com/ikeydoherty/libnica])
AM_INIT_AUTOMAKE([-Wno-portability no-dist-gzip dist-xz foreign subdir-objects])
AC_PROG_CC
AC_PROG_CC_STDC
AC_CONFIG_HEADERS([config.h])
AC_PREFIX_DEFAULT(/usr/local)
AM_SILENT_RULES([yes])
AC_CONFIG_MACRO_DIR([m4])
AX_VALGRIND_CHECK
LT_INIT
# Unit tests
PKG_CHECK_MODULES([CHECK], [check >= 0.9])
have_coverage=no
AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
if test "x$enable_coverage" = "xyes" ; then
AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
if test "x$lcov_found" = xno ; then
AC_MSG_ERROR([*** lcov support requested but the program was not found])
else
lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
else
have_coverage=yes
AC_DEFINE([COVERAGE], [1], [Coverage enabled])
fi
fi
fi
AM_CONDITIONAL([COVERAGE], [test "$have_coverage" = "yes"])
# Disable submodule support
AM_CONDITIONAL([NICA_SUBMODULE], false)
AC_CONFIG_FILES([data/nica.pc
Makefile])
AC_OUTPUT
AC_MSG_RESULT([
libnica $VERSION
========
prefix: ${prefix}
libdir: ${libdir}
sysconfdir: ${sysconfdir}
exec_prefix: ${exec_prefix}
bindir: ${bindir}
datarootdir: ${datarootdir}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
coverage: ${have_coverage}
])