[Mesa-dev] [PATCH 2/2] configure.ac: add --enable-assertions
Marek Olšák
maraeo at gmail.com
Mon Apr 13 13:06:50 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
---
configure.ac | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 6ccf3b4..f5eeb7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,6 +402,13 @@ AC_ARG_ENABLE([debug],
[enable_debug="$enableval"],
[enable_debug=no]
)
+AC_ARG_ENABLE([assertions],
+ [AS_HELP_STRING([--enable-assertions],
+ [add debug definitions to enable assertions and other debug checks @<:@default=disabled@:>@])],
+ [enable_assertions="$enableval"],
+ [enable_assertions=no]
+)
+
if test "x$enable_debug" = xyes; then
DEFINES="$DEFINES -DDEBUG"
if test "x$GCC" = xyes; then
@@ -420,8 +427,10 @@ if test "x$enable_debug" = xyes; then
CXXFLAGS="$CXXFLAGS -O0"
fi
fi
+elif test "x$enable_assertions" = xyes; then
+ DEFINES="$DEFINES -DDEBUG"
else
- DEFINES="$DEFINES -DNDEBUG"
+ DEFINES="$DEFINES -DNDEBUG"
fi
dnl
--
2.1.0
More information about the mesa-dev
mailing list