forked from clearlinux/cve-check-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
70 lines (58 loc) · 2.29 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
59
60
61
62
63
64
65
66
67
68
69
70
AC_INIT([cve-check-tool], 2, [[email protected]], [cve-check-tool], [https://github.com/ikeydoherty/cve-check-tool])
AM_INIT_AUTOMAKE([-Wno-portability no-dist-gzip dist-xz foreign subdir-objects])
AC_PROG_CC
AC_PROG_CC_STDC
LT_PREREQ(2.2)
AC_CONFIG_HEADERS([config.h])
AC_PREFIX_DEFAULT(/usr/local)
AM_SILENT_RULES([yes])
LT_INIT([disable-static])
AC_CONFIG_MACRO_DIR([m4])
AX_VALGRIND_CHECK
# Package requirements
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.36.0])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.36.0])
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.9.1])
PKG_CHECK_MODULES([LIBCURL], [libcurl >= 7.29.0])
# Jira plugin
PKG_CHECK_MODULES([LIBJSON_GLIB], [json-glib-1.0 >= 0.16.0])
PKG_CHECK_MODULES([LIBGOBJECT], [gobject-2.0 >= 2.0.0])
# 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"])
AC_CONFIG_FILES([Makefile
data/Makefile
docs/Makefile
src/Makefile])
AC_OUTPUT
AC_MSG_RESULT([
cve-check-tool $VERSION
========
prefix: ${prefix}
libdir: ${libdir}
sysconfdir: ${sysconfdir}
exec_prefix: ${exec_prefix}
bindir: ${bindir}
datarootdir: ${datarootdir}
coverage: ${have_coverage}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
])