commit 5e45bedae5684ac71347fcb6b8d43740866417ed
parent d32975f45bd8af4cbb4722d5c29a7eea5582efe4
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 4 May 2022 18:32:33 +0300
configure: use CPPFLAGS for _DEBUG macro
MHD_config.h is not used by some source files. CPPFLAGS force usage of
required assert() mode.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -3068,7 +3068,8 @@ AC_MSG_RESULT([[$enable_asserts]])
AS_VAR_IF([[enable_asserts]], [["yes"]],
[
- AC_DEFINE([[_DEBUG]], [[1]], [Define to use debug asserts.])
+ MHD_PREPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-D_DEBUG=1])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
[mhd_assert_test_prg="#include <assert.h>
int pos_val(void) {return 5;}
int neg_val(void) {return -5;}
@@ -3089,7 +3090,10 @@ AS_VAR_IF([[enable_asserts]], [["yes"]],
[AC_DEFINE([[HAVE_ASSERT]], [[1]], [Define if you have usable assert() and assert.h])])
AS_UNSET([mhd_assert_test_prg])
],
- [AC_DEFINE([[NDEBUG]], [[1]], [Define to disable usage of debug asserts.])]
+ [
+ MHD_PREPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-DNDEBUG=1])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ ])]
)
AS_UNSET([enabled_sanitizers])