1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

configure: Look for valgrind.h independently of VALGRIND_POOLS.

This commit is contained in:
Petr Rockai 2014-10-01 08:16:27 +02:00
parent 5d833fd458
commit d571eab3b2
4 changed files with 13 additions and 9 deletions

View File

@ -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
################################################################################

View File

@ -222,7 +222,7 @@ CFLOW_LIST_TARGET = $(LIB_NAME).cflow
include $(top_builddir)/make.tmpl
CFLAGS += $(BLKID_CFLAGS) $(UDEV_CFLAGS)
CFLAGS += $(BLKID_CFLAGS) $(UDEV_CFLAGS) $(VALGRIND_CFLAGS)
$(SUBDIRS): $(LIB_STATIC)

View File

@ -34,10 +34,7 @@ SOURCES =\
$(interface)/libdm-iface.c
INCLUDES = -I$(srcdir)/$(interface) -I$(srcdir)
ifeq ("@VALGRIND_POOL@", "yes")
INCLUDES += @VALGRIND_CFLAGS@
endif
CFLAGS += $(UDEV_CFLAGS)
CFLAGS += $(UDEV_CFLAGS) $(VALGRIND_CFLAGS)
ifeq ("@STATIC_LINK@", "yes")
LIB_STATIC = $(interface)/libdevmapper.a

View File

@ -61,6 +61,7 @@ UDEV_CFLAGS = @UDEV_CFLAGS@
UDEV_LIBS = @UDEV_LIBS@
BLKID_CFLAGS = @BLKID_CFLAGS@
BLKID_LIBS = @BLKID_LIBS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
TESTING = @TESTING@
# Setup directory variables