From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maarten Lankhorst Subject: [PATCH] configure: Unconditionally check for valgrind Date: Tue, 26 Mar 2013 14:48:27 +0100 Message-ID: <5151A72B.9030402@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 2639DE6021 for ; Tue, 26 Mar 2013 06:48:29 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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