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