mirror of
https://github.com/X11Libre/xf86-video-intel.git
synced 2026-03-24 01:24:12 +00:00
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>
This commit is contained in:
18
configure.ac
18
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])
|
||||
|
||||
Reference in New Issue
Block a user