diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-02-13 08:06:33 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-02-12 22:12:03 +0000 |
commit | 9fec3228fb5ad71a7eba5c9653e3ba4da964bcbb (patch) | |
tree | becc2605017a005354eb7728fb3a520f7a2d0860 /configure.ac | |
parent | 25cddcecd3e5c4797a42c64b68f606053ac68975 (diff) | |
download | libevdev-9fec3228fb5ad71a7eba5c9653e3ba4da964bcbb.tar.gz |
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 <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
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} ]) |