diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0e853a8..9c1d5b0 100644 --- a/configure.ac +++ b/configure.ac @@ -2044,6 +2044,8 @@ AC_ARG_ENABLE([using-memchecker], library. Enabling this causes the library to be more picky about it's memory operations and also disables the library's free space manager code. + This option is orthogonal to the + --enable-memory-alloc-sanity-check option. Default=no.])], [USINGMEMCHECKER=$enableval]) @@ -2062,6 +2064,35 @@ case "X-$USINGMEMCHECKER" in ;; esac +## ---------------------------------------------------------------------- +## Check if they would like to enable the internal memory allocation sanity +## checking code. +## +AC_SUBST([MEMORYALLOCSANITYCHECK]) +AC_MSG_CHECKING([whether internal memory allocation sanity checking is used]) +AC_ARG_ENABLE([memory-alloc-sanity-check], + [AS_HELP_STRING([--enable-memory-alloc-sanity-check], + [Enable this option to turn on internal memory + allocation sanity checking. This could cause + more memory use and somewhat slower allocation. + This option is orthogonal to the + --enable-using-memchecker option. + Default=no.])], + [MEMORYALLOCSANITYCHECK=$enableval]) + +case "X-$MEMORYALLOCSANITYCHECK" in + X-yes) + MEMORYALLOCSANITYCHECK=yes + AC_MSG_RESULT([yes]) + AC_DEFINE([MEMORY_ALLOC_SANITY_CHECK], [1], + [Define to enable internal memory allocation sanity checking.]) + ;; + *) + MEMORYALLOCSANITYCHECK=no + AC_MSG_RESULT([no]) + ;; +esac + ## Checkpoint the cache AC_CACHE_SAVE |