diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2019-08-16 17:00:38 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2019-08-20 14:33:59 +0300 |
commit | a891fc391967841e472d06437fa613a64ad3b08a (patch) | |
tree | 256e58bbdb7cd18e5fc05b2471f969fb092c484c /configure.ac | |
parent | 667dbac196c3d015ed70780c793cd1854adf9d7f (diff) |
configure: add enable-helper-debug option
Test application code needs also debug code (asserts) that
can be turned off/on. Added new preprocessor define (ODPH_DEBUG)
and a configure option to control it. All debug options are
enabled when --enable-debug=full is used.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a90993e41..1e11b4bac 100644 --- a/configure.ac +++ b/configure.ac @@ -362,6 +362,14 @@ AS_IF([test "x$enable_debug" != "xno"], [ODP_DEBUG=1], AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG], [Define to 1 to include additional debug code]) +AC_ARG_ENABLE([helper-debug], + [AS_HELP_STRING([--enable-helper-debug], [helpers include additional debugging code])], + [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug=yes], + [enable_helper_debug=no])]) +AS_IF([test "x$enable_helper_debug" != "xno"], [ODPH_DEBUG=1], [ODPH_DEBUG=0]) +AC_DEFINE_UNQUOTED([ODPH_DEBUG], [$ODPH_DEBUG], + [Define to 1 to include additional helper debug code]) + ########################################################################## # Enable/disable ODP_DEBUG_PRINT ########################################################################## @@ -383,6 +391,9 @@ AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1], AC_DEFINE_UNQUOTED([ODPH_DEBUG_PRINT], [$ODPH_DEBUG_PRINT], [Define to 1 to display helper debug information]) +debug_settings="ODP_DEBUG=${ODP_DEBUG}, ODP_DEBUG_PRINT=${ODP_DEBUG_PRINT}, \ +ODPH_DEBUG=${ODPH_DEBUG}, ODPH_DEBUG_PRINT=${ODPH_DEBUG_PRINT}" + ########################################################################## # Enable/disable deprecated API definitions ########################################################################## @@ -457,7 +468,7 @@ AC_MSG_RESULT([ ABI compatible: ${abi_compat} link time optimization: ${lto_enabled} deprecated APIs: ${deprecated} - debug: ${enable_debug} + debug: ${debug_settings} cunit: ${cunit_support} static tests linkage: ${enable_static_applications} with_examples: ${with_examples} |