[PATCH libdrm] configure: Add flag to disable valgrind support.

Matt Turner mattst88 at gmail.com
Mon Jun 22 09:56:33 PDT 2015


---
 configure.ac | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 78a0010..dd6c0ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -403,7 +403,15 @@ else
 fi
 AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], [test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"])
 
-PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+AC_ARG_ENABLE(valgrind,
+              AS_HELP_STRING([--disable-valgrind],
+                             [Disable valgrind support]),
+                             [use_valgrind=$enableval], [use_valgrind=yes])
+
+if test "x$use_valgrind" = "xyes"; then
+	PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+fi
+
 if test "x$have_valgrind" = "xyes"; then
 	AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
 fi
-- 
2.3.6



More information about the dri-devel mailing list