mirror of
https://github.com/clearlinux/cve-check-tool.git
synced 2026-10-03 23:48:24 +00:00
71 lines
2.3 KiB
Plaintext
71 lines
2.3 KiB
Plaintext
AC_INIT([cve-check-tool], 3, [michael.i.doherty@intel.com], [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}
|
|
])
|