aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-04 18:32:33 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-04 18:32:33 +0300
commit5e45bedae5684ac71347fcb6b8d43740866417ed (patch)
treeac2b77ce938d29f81786fa93f7f4c421b3927de8 /configure.ac
parentd32975f45bd8af4cbb4722d5c29a7eea5582efe4 (diff)
downloadlibmicrohttpd-5e45bedae5684ac71347fcb6b8d43740866417ed.tar.gz
libmicrohttpd-5e45bedae5684ac71347fcb6b8d43740866417ed.zip
configure: use CPPFLAGS for _DEBUG macro
MHD_config.h is not used by some source files. CPPFLAGS force usage of required assert() mode.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 663b100e..dabe94bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3068,7 +3068,8 @@ AC_MSG_RESULT([[$enable_asserts]])
3068 3068
3069AS_VAR_IF([[enable_asserts]], [["yes"]], 3069AS_VAR_IF([[enable_asserts]], [["yes"]],
3070 [ 3070 [
3071 AC_DEFINE([[_DEBUG]], [[1]], [Define to use debug asserts.]) 3071 MHD_PREPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-D_DEBUG=1])
3072 CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
3072 [mhd_assert_test_prg="#include <assert.h> 3073 [mhd_assert_test_prg="#include <assert.h>
3073 int pos_val(void) {return 5;} 3074 int pos_val(void) {return 5;}
3074 int neg_val(void) {return -5;} 3075 int neg_val(void) {return -5;}
@@ -3089,7 +3090,10 @@ AS_VAR_IF([[enable_asserts]], [["yes"]],
3089 [AC_DEFINE([[HAVE_ASSERT]], [[1]], [Define if you have usable assert() and assert.h])]) 3090 [AC_DEFINE([[HAVE_ASSERT]], [[1]], [Define if you have usable assert() and assert.h])])
3090 AS_UNSET([mhd_assert_test_prg]) 3091 AS_UNSET([mhd_assert_test_prg])
3091 ], 3092 ],
3092 [AC_DEFINE([[NDEBUG]], [[1]], [Define to disable usage of debug asserts.])] 3093 [
3094 MHD_PREPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-DNDEBUG=1])
3095 CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
3096 ])]
3093) 3097)
3094 3098
3095AS_UNSET([enabled_sanitizers]) 3099AS_UNSET([enabled_sanitizers])