diff options
author | Maria Matejka <mq@ucw.cz> | 2019-08-14 16:22:39 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2020-05-01 15:19:12 +0200 |
commit | a0d0a71a1828cce725c3132f8c243bf0c537786f (patch) | |
tree | 8a879a5265bf3b3bd435c45d049daad297796387 /configure.ac | |
parent | a1b61a271af40a9d6ef0837424ab2c98d29f1575 (diff) |
Expensive check declaration
Intended to be run at every operation with complex data structures
to check their consistency and validity.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index da8546a6..96f66644 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,12 @@ AC_ARG_ENABLE([debug-generated], [enable_debug_generated=no] ) +AC_ARG_ENABLE([debug-expensive], + [AS_HELP_STRING([--enable-debug-expensive], [enable expensive consistency checks (implies --enable-debug) @<:@no@:>@])], + [], + [enable_debug_expensive=no] +) + AC_ARG_ENABLE([memcheck], [AS_HELP_STRING([--enable-memcheck], [check memory allocations when debugging @<:@yes@:>@])], [], @@ -72,6 +78,9 @@ AC_ARG_VAR([FLEX], [location of the Flex program]) AC_ARG_VAR([BISON], [location of the Bison program]) AC_ARG_VAR([M4], [location of the M4 program]) +if test "$enable_debug_expensive" = yes; then + enable_debug = yes +fi if test "$srcdir" = . ; then # Building in current directory => create obj directory holding all objects @@ -388,6 +397,10 @@ if test "$enable_debug" = yes ; then AC_CHECK_LIB([efence], [malloc]) fi fi + + if test "enable_debug_expensive" = yes ; then + AC_DEFINE([ENABLE_EXPENSIVE_CHECKS], [1], [Define to 1 if you want to run expensive consistency checks.]) + fi fi CLIENT=birdcl |