chiark / gitweb /
cryptsetup: Add tcrypt support
[elogind.git] / configure.ac
index 802009efcda6428f4979f4921787be92687fc6db..6f5fee5fcfe82fb8d79aed377c6db55abb785501 100644 (file)
@@ -133,7 +133,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -ffast-math \
         -fno-common \
         -fdiagnostics-show-option \
-        -fdiagnostics-color=auto \
+        -fdiagnostics-color \
         -fno-strict-aliasing \
         -fvisibility=hidden \
         -ffunction-sections \
@@ -214,6 +214,29 @@ m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-conf
 
 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
 
+# ------------------------------------------------------------------------------
+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
+                        CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
+                        -fprofile-arcs \
+                        -ftest-coverage])
+                        AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
+                fi
+        fi
+fi
+AM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
+
 # ------------------------------------------------------------------------------
 have_kmod=no
 AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
@@ -553,7 +576,7 @@ AC_SUBST(AUDIT_LIBS)
 have_libcryptsetup=no
 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
 if test "x$enable_libcryptsetup" != "xno"; then
-        PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.4.2 ],
+        PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
                 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
         if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
                 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
@@ -1000,6 +1023,7 @@ AC_MSG_RESULT([
         Python Headers:          ${have_python_devel}
         man pages:               ${have_manpages}
         gtk-doc:                 ${enable_gtk_doc}
+        test coverage:           ${have_coverage}
         Split /usr:              ${enable_split_usr}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}