[Intel-gfx] [PATCH] configure: Unconditionally check for valgrind

Maarten Lankhorst maarten.lankhorst at canonical.com
Tue Mar 26 14:48:27 CET 2013


For those who want to run valgrind, but do not necessarily want to debug intel. :-)
---
diff --git a/configure.ac b/configure.ac
index de3990d..e084e84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -440,12 +440,12 @@ AM_CONDITIONAL(FULL_DEBUG, test x$DEBUG = xfull)
 if test "x$DEBUG" = xno; then
 	AC_DEFINE(NDEBUG,1,[Disable internal debugging])
 fi
-if test "x$DEBUG" != xno; then
-	PKG_CHECK_MODULES(VALGRIND, [valgrind], have_valgrind=yes, have_valgrind=no)
-	if test x$have_valgrind = xyes; then
-		AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
-	fi
+
+PKG_CHECK_MODULES(VALGRIND, [valgrind], have_valgrind=yes, have_valgrind=no)
+if test x$have_valgrind = xyes; then
+	AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
 fi
+
 if test "x$DEBUG" = xsync; then
 	AC_DEFINE(DEBUG_SYNC,1,[Enable synchronous rendering for debugging])
 fi
diff --git a/src/sna/Makefile.am b/src/sna/Makefile.am
index 0fbd19d..d170a9a 100644
--- a/src/sna/Makefile.am
+++ b/src/sna/Makefile.am
@@ -27,12 +27,9 @@ AM_CFLAGS = \
 	@XORG_CFLAGS@ \
 	@UDEV_CFLAGS@ \
 	@DRM_CFLAGS@ \
+	@VALGRIND_CFLAGS@ \
 	$(NULL)
 
-if DEBUG
-AM_CFLAGS += @VALGRIND_CFLAGS@
-endif
-
 noinst_LTLIBRARIES = libsna.la
 libsna_la_LDFLAGS = -pthread
 libsna_la_LIBADD = @UDEV_LIBS@ -lm @DRM_LIBS@ brw/libbrw.la fb/libfb.la




More information about the Intel-gfx mailing list