diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-29 12:04:09 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-29 12:06:59 +0000 |
commit | 8bd6a7149fcb5f9ed6580dc2aa0180874938a1ea (patch) | |
tree | 0e5995cb52a92a97dd6062c5eaa2798f108ed5a6 | |
parent | a5a1ab7bbc58ec884cd0b90fe7139f402291b92f (diff) |
Enable conditional compilation of asserts
With '--disable-debug' we define NDEBUG and so disable the asserts, that
is we continue to default to compiling asserts into the code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | configure.ac | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 529a2944..13a801a8 100644 --- a/configure.ac +++ b/configure.ac @@ -85,6 +85,12 @@ AC_ARG_ENABLE(kms-only, AS_HELP_STRING([--enable-kms-only], [KMS_ONLY="$enableval"], [KMS_ONLY=no]) +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Enables internal debugging [[default=yes]]]), + [DEBUG="$enableval"], + [DEBUG=yes]) + # Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) @@ -138,15 +144,19 @@ fi AC_MSG_CHECKING([whether to include XvMC support]) AC_MSG_RESULT([$XVMC]) AM_CONDITIONAL(XVMC, test x$XVMC = xyes) -if test "$XVMC" = yes; then +if test "x$XVMC" = xyes; then AC_DEFINE(ENABLE_XVMC,1,[Enable XvMC support]) fi AM_CONDITIONAL(KMS_ONLY, test x$KMS_ONLY = xyes) -if test "$KMS_ONLY" = yes; then +if test "x$KMS_ONLY" = xyes; then AC_DEFINE(KMS_ONLY,1,[Assume KMS support]) fi +if test "x$DEBUG" = xno; then + AC_DEFINE(NDEBUG,1,[Disable internal debugging]) +fi + DRIVER_NAME=intel AC_SUBST([DRIVER_NAME]) AC_SUBST([moduledir]) |