From: Peter Hutterer Date: Wed, 12 Feb 2020 22:06:33 +0000 (+1000) Subject: configure.ac: add a toggle to enable the special coverity options X-Git-Tag: libevdev-1.8.901~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fec3228fb5ad71a7eba5c9653e3ba4da964bcbb;p=platform%2Fupstream%2Flibevdev.git configure.ac: add a toggle to enable the special coverity options Coverity tries to supply system headers and fails badly at it. A bunch of _Float... sizes are pulled in by math.h but not provided anywhere. So as a workaround, let's add an option to explicitly enable coverity support that simply #defines those types to ones we do know about and let's go on hoping it'll eventually work. See the equivalent addition to libinput in commit 8178339b5baa717. Signed-off-by: Peter Hutterer --- diff --git a/configure.ac b/configure.ac index b284acb..d4cc1a8 100644 --- a/configure.ac +++ b/configure.ac @@ -126,6 +126,26 @@ AC_SUBST([GCOV_CFLAGS]) AC_SUBST([GCOV_LDFLAGS]) AC_MSG_RESULT([$enable_gcov]) +AC_MSG_CHECKING([whether to build with coverity support]) +AC_ARG_ENABLE([coverity], + [AS_HELP_STRING([--enable-coverity], + [Whether to build with coverity support (default: disabled)])], + [], + [enable_coverity=no], + ) +AS_IF([test "x$enable_coverity" != "xno"], + [ + AC_DEFINE([_Float128], [__uint128_t], [Override for coverity]) + AC_DEFINE([_Float32], [int], [Override for coverity]) + AC_DEFINE([_Float32x], [int], [Override for coverity]) + AC_DEFINE([_Float64], [long], [Override for coverity]) + AC_DEFINE([_Float64x], [long], [Override for coverity]) + enable_coverity=yes + ], +) +AC_MSG_RESULT([$enable_coverity]) + + AM_PATH_PYTHON([2.6]) # nm to check for leaking symbols in the static library @@ -163,5 +183,6 @@ AC_MSG_RESULT([ Build documentation ${have_doxygen} Enable unit-tests ${HAVE_CHECK} Enable profiling ${enable_gcov} + Enable coverity support ${enable_coverity} Static library symbol check ${static_symbol_leaks_test} ])