summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2014-10-01 08:16:27 +0200
committerPetr Rockai <prockai@redhat.com>2015-02-05 13:50:34 +0100
commitd571eab3b2bbb9be80e75e633bf2e30834975552 (patch)
tree679196eca93f03ff7ff42fd88877f02393dac24b /configure.in
parent5d833fd4587ce30eb1fb4e20363ede07c40bc2f0 (diff)
downloadlvm2-d571eab3b2bbb9be80e75e633bf2e30834975552.tar.gz
configure: Look for valgrind.h independently of VALGRIND_POOLS.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index add6653e9..18e1c17a6 100644
--- a/configure.in
+++ b/configure.in
@@ -1023,12 +1023,18 @@ AC_ARG_ENABLE(valgrind_pool,
VALGRIND_POOL=$enableval, VALGRIND_POOL=no)
AC_MSG_RESULT($VALGRIND_POOL)
-if test "$VALGRIND_POOL" = yes; then
- pkg_config_init
- PKG_CHECK_MODULES(VALGRIND, valgrind, [], [AC_MSG_ERROR(bailing out)])
+pkg_config_init
+PKG_CHECK_MODULES(VALGRIND, valgrind, [HAVE_VALGRIND=yes], [if test x$VALGRIND_POOL = xyes; then AC_MSG_ERROR(bailing out); fi])
+AC_SUBST(VALGRIND_CFLAGS)
+
+if test x$HAVE_VALGRIND = xyes; then
+ AC_DEFINE([HAVE_VALGRIND], 1, [valgrind.h found])
+ AC_SUBST(HAVE_VALGRIND)
+fi
+
+if test x$VALGRIND_POOL = xyes; then
AC_DEFINE([VALGRIND_POOL], 1, [Enable a valgrind aware build of pool])
AC_SUBST(VALGRIND_POOL)
- AC_SUBST(VALGRIND_CFLAGS)
fi
################################################################################