aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>2017-08-30 14:44:02 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-09-04 18:35:43 +0300
commit60105f079350405920462a4b0d59c7e78d9a8492 (patch)
tree3aefa2ad8e8bdc367d6914a443c45e3beced2e5e /configure.ac
parent6e02ad50626de86804cbd62ae467104ae7850220 (diff)
configure: provide a way to enable all debugging options at once
Adding --enable-debug=full to configure will enable all debugging options. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 23 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index dcf146297..df0a0f617 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,39 +239,40 @@ DX_INIT_DOXYGEN($PACKAGE_NAME,
${builddir}/doc/driver-api-guide/output)
##########################################################################
+# Enable/disable ODP_DEBUG
+##########################################################################
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [include additional debugging code ]
+ [(set to 'full' to enable all --enable-*-debug-* options)])])
+
+AS_IF([test "x$enable_debug" != "xno"], [ODP_DEBUG=1],
+ [ODP_DEBUG=0])
+AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG],
+ [Define to 1 to include additional debug code])
+
+##########################################################################
# Enable/disable ODP_DEBUG_PRINT
##########################################################################
-ODP_DEBUG_PRINT=0
AC_ARG_ENABLE([debug-print],
- [ --enable-debug-print display debugging information],
- [if test "x$enableval" = "xyes"; then
- ODP_DEBUG_PRINT=1
- fi])
+ [AS_HELP_STRING([--enable-debug-print], [display debugging information])],
+ [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_debug_print=yes],
+ [enable_debug_print=no])])
+AS_IF([test "x$enable_debug_print" != "xno"], [ODP_DEBUG_PRINT=1],
+ [ODP_DEBUG_PRINT=0])
AC_DEFINE_UNQUOTED([ODP_DEBUG_PRINT], [$ODP_DEBUG_PRINT],
[Define to 1 to display debug information])
-ODPH_DEBUG_PRINT=0
AC_ARG_ENABLE([helper-debug-print],
- [ --enable-helper-debug-print display helper debugging information],
- [if test "x$enableval" = "xyes"; then
- ODPH_DEBUG_PRINT=1
- fi])
+ [AS_HELP_STRING([--enable-helper-debug-print], [display helper debugging information])],
+ [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug_print=yes],
+ [enable_helper_debug_print=no])])
+AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1],
+ [ODPH_DEBUG_PRINT=0])
AC_DEFINE_UNQUOTED([ODPH_DEBUG_PRINT], [$ODPH_DEBUG_PRINT],
[Define to 1 to display helper debug information])
##########################################################################
-# Enable/disable ODP_DEBUG
-##########################################################################
-ODP_DEBUG=0
-AC_ARG_ENABLE([debug],
- [ --enable-debug include additional code],
- [if test "x$enableval" = "xyes"; then
- ODP_DEBUG=1
- fi])
-AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG],
- [Define to 1 to include additional debug code])
-
-##########################################################################
# Enable/disable ABI compatible build
##########################################################################
ODP_ABI_COMPAT=1