summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-04-06 15:42:23 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-04-06 15:42:23 +0100
commit5332d5a7e055042233e279385bfe1388adfe15fa (patch)
tree2a2a8f95dabc10d3427b1ccd6a53e91263cfa80f /configure.ac
parent091cf6f0477824c5826547c02394752b6dc944ce (diff)
configure: Allow valgrind support to be manually enabled
Irrespective of the DDX debug settings, some people wish to run Xorg under valgrind and so prefer to have the cleaner output by making the DDX valgrind aware. (Actually Maarten wants valgrind support enabled by default...) Suggested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8b12d01a..794b3833 100644
--- a/configure.ac
+++ b/configure.ac
@@ -353,6 +353,12 @@ AC_ARG_ENABLE(debug,
[Enables internal debugging [default=no]]),
[DEBUG="$enableval"],
[DEBUG=no])
+AC_ARG_ENABLE(valgrind,
+ AS_HELP_STRING([--enable-valgrind],
+ [Enables valgrindified ioctls for debugging [default=no]]),
+ [VG="$enableval"],
+ [VG=no])
+
# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
@@ -439,12 +445,22 @@ AM_CONDITIONAL(DEBUG, test x$DEBUG != xno)
AM_CONDITIONAL(FULL_DEBUG, test x$DEBUG = xfull)
if test "x$DEBUG" = xno; then
AC_DEFINE(NDEBUG,1,[Disable internal debugging])
+else
+ if test "x$VG" != xyes; then
+ VG=auto
+ fi
fi
-if test "x$DEBUG" != xno; then
+if test "x$VG" != xno; then
PKG_CHECK_MODULES(VALGRIND, [valgrind], have_valgrind=yes, have_valgrind=no)
+ AC_MSG_CHECKING([whether to include valgrind support])
if test x$have_valgrind = xyes; then
AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
+ else
+ if test "x$VG" = xyes; then
+ AC_MSG_ERROR([valgrind support requested, but valgrind-dev headers not found])
+ fi
fi
+ AC_MSG_RESULT([$have_valgrind ($VG)])
fi
if test "x$DEBUG" = xsync; then
AC_DEFINE(DEBUG_SYNC,1,[Enable synchronous rendering for debugging])