aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-04 19:06:40 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-04 19:06:40 +0300
commitf50153e5cfa0364d04f722e744a236afd45e69f9 (patch)
tree2302e93fb3ea1f911838a4883b3a7a70f9dd036f /configure.ac
parent26a99d18825719fbf01d03b39f6a4ae5959547ff (diff)
downloadlibmicrohttpd-f50153e5cfa0364d04f722e744a236afd45e69f9.tar.gz
libmicrohttpd-f50153e5cfa0364d04f722e744a236afd45e69f9.zip
configure: added 'debugger' build type
Suitable for walking the code with debugger.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 9 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index f8fcef35..30041fd8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ AC_ARG_ENABLE([build-type],
78 [AS_HELP_STRING([[--enable-build-type=TYPE]], 78 [AS_HELP_STRING([[--enable-build-type=TYPE]],
79 [enable build TYPE, a set of configuration parameters; individual settings ] 79 [enable build TYPE, a set of configuration parameters; individual settings ]
80 [(asserts, sanitizers, compiler and linker flags) can be overriden by ] 80 [(asserts, sanitizers, compiler and linker flags) can be overriden by ]
81 [additional configure parameters (debug, neutral, release, release-compact, ] 81 [additional configure parameters (debug, debugger, neutral, release, release-compact, ]
82 [release-hardened) [neutral]])], 82 [release-hardened) [neutral]])],
83 [], [enable_build_type=neutral]) 83 [], [enable_build_type=neutral])
84AS_IF([test "x${enable_build_type}" = "x"], [enable_build_type="neutral"]) 84AS_IF([test "x${enable_build_type}" = "x"], [enable_build_type="neutral"])
@@ -86,6 +86,7 @@ AS_VAR_IF([enable_build_type], ["no"], [enable_build_type="neutral"])
86AS_VAR_IF([enable_build_type], ["yes"], [AC_MSG_ERROR([[Missing TYPE for --enable-build-type=]])]) 86AS_VAR_IF([enable_build_type], ["yes"], [AC_MSG_ERROR([[Missing TYPE for --enable-build-type=]])])
87AS_CASE([${enable_build_type}], 87AS_CASE([${enable_build_type}],
88 [debug], [AC_MSG_RESULT([debug: enable asserts, sanitizers (if any supported), debug information, compiler optimisation for debugging])], 88 [debug], [AC_MSG_RESULT([debug: enable asserts, sanitizers (if any supported), debug information, compiler optimisation for debugging])],
89 [debugger], [AC_MSG_RESULT([debuger: enable asserts, disable sanitizers, debug information, no compiler optimisation])],
89 [neutral], [AC_MSG_RESULT([neutral: use only user-specified compiler and linker flags])], 90 [neutral], [AC_MSG_RESULT([neutral: use only user-specified compiler and linker flags])],
90 [release], [AC_MSG_RESULT([release: disable asserts, enable compiler optimisations])], 91 [release], [AC_MSG_RESULT([release: disable asserts, enable compiler optimisations])],
91 [release-compact], [AC_MSG_RESULT([release-compact: disable asserts, enable compiler optimisations for size, enable compact code])], 92 [release-compact], [AC_MSG_RESULT([release-compact: disable asserts, enable compiler optimisations for size, enable compact code])],
@@ -152,10 +153,13 @@ AS_VAR_IF([enable_build_type],["neutral"],[],
152 LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}" 153 LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
153 ] 154 ]
154) 155)
155AS_VAR_IF([enable_build_type],["debug"], 156AS_CASE([${enable_build_type}],[debug|debugger],
156 [ # Debug build 157 [ # Debug build or build for walking with debugger
157 CFLAGS="${user_CFLAGS}" 158 CFLAGS="${user_CFLAGS}"
158 MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Og], [-O0]) 159 AS_VAR_IF([enable_build_type],["debug"],
160 [MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Og], [-O0])],
161 [MHD_CHECK_ADD_CC_CFLAG([-O0], [CFLAGS_ac])]
162 )
159 MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-ggdb3], [-g3], [-ggdb], [-g]) 163 MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-ggdb3], [-g3], [-ggdb], [-g])
160 MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion], [CFLAGS_ac]) 164 MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion], [CFLAGS_ac])
161 MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wformat=2], [-Wformat]) 165 MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wformat=2], [-Wformat])
@@ -3060,7 +3064,7 @@ AC_ARG_ENABLE([[asserts]],
3060 [AS_HELP_STRING([[--enable-asserts]], 3064 [AS_HELP_STRING([[--enable-asserts]],
3061 [enable test build with debug asserts])], 3065 [enable test build with debug asserts])],
3062 [], 3066 [],
3063 [AS_CASE([${enable_build_type}],[debug], 3067 [AS_CASE([${enable_build_type}],[debug|debugger],
3064 [enable_asserts='yes'],[enable_asserts='no'])] 3068 [enable_asserts='yes'],[enable_asserts='no'])]
3065) 3069)
3066AS_CASE([[$enable_asserts]], [[yes]], [[:]], [[no]], [[:]], [[enable_asserts='no']]) 3070AS_CASE([[$enable_asserts]], [[yes]], [[:]], [[no]], [[:]], [[enable_asserts='no']])