summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-22 14:30:49 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-22 14:30:49 +0200
commitd293df0ebdd5bd6c5e9519f0b45a5d4141f5e0fa (patch)
treebee74efd7c3a409ab91737eee8fb5e842ffe2110
parentcbe7bdfd7c0fe474161e2d141d4dd5948e50c3da (diff)
Explicit --with-valgrind, to not accidentally miss Valgrind support
Change-Id: If4de6e4cdebb082cbe8faa9392fceb61c3f8fb9e
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c71a9469d821..10abbcc157c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1178,6 +1178,10 @@ libo_FUZZ_ARG_ENABLE(runtime-optimizations,
CC contains "-fsanitize=*". (For Valgrind, those runtime optimizations
are typically disabled dynamically via RUNNING_ON_VALGRIND.)]))
+AC_ARG_WITH(valgrind,
+ AS_HELP_STRING([--with-valgrind],
+ [Make availability of Valgrind headers a hard requirement.]))
+
libo_FUZZ_ARG_ENABLE(compiler-plugins,
AS_HELP_STRING([--enable-compiler-plugins],
[Enable compiler plugins that will perform additional checks during
@@ -5746,7 +5750,7 @@ dnl ===================================================================
dnl Check if valgrind headers are available
dnl ===================================================================
ENABLE_VALGRIND=
-if test "$cross_compiling" != yes; then
+if test "$cross_compiling" != yes -a "$with_valgrind" != no; then
prev_cppflags=$CPPFLAGS
# Is VALGRIND_CFLAGS something one is supposed to have in the environment,
# or where does it come from?
@@ -5757,6 +5761,9 @@ if test "$cross_compiling" != yes; then
fi
AC_SUBST([ENABLE_VALGRIND])
if test -z "$ENABLE_VALGRIND"; then
+ if test "$with_valgrind" = yes; then
+ AC_MSG_ERROR([--with-valgrind specified but no Valgrind headers found])
+ fi
VALGRIND_CFLAGS=
fi
AC_SUBST([VALGRIND_CFLAGS])