aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-10 18:39:47 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-10 18:39:47 +0300
commitab406a9e6a0568bcb607ff737397bdc5b0cf533b (patch)
tree8becfe89878b6ea1e51c22fe65535b36363ec578
parent4a4e93fb5a5243c2208a87cd3485bd2979dac2a5 (diff)
downloadlibmicrohttpd-ab406a9e6a0568bcb607ff737397bdc5b0cf533b.tar.gz
libmicrohttpd-ab406a9e6a0568bcb607ff737397bdc5b0cf533b.zip
configure: better test for "-Werror=attributes"
-rw-r--r--configure.ac16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b00e7885..fabcde9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,7 +182,21 @@ AS_VAR_IF([[mhd_cv_macro_true_false_valid]], [["yes"]], [[:]],
182 182
183 183
184AX_CHECK_COMPILE_FLAG([[-Werror=attributes]], 184AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
185 [[errattr_CFLAGS="-Werror=attributes"]], 185 [
186 save_CFLAGS="$CFLAGS"
187 CFLAGS="$CFLAGS -Werror=attributes"
188 AC_MSG_CHECKING([[whether -Werror=attributes actually works]])
189 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
190 [[__attribute__((non_existing_attrb_dummy)) int SimpleFunc(void) {return 3;}]], [[int r = SimpleFunc(); if (r) return r;]])],
191 [
192 AC_MSG_RESULT([[no]])
193 errattr_CFLAGS=""
194 ], [
195 AC_MSG_RESULT([[yes]])
196 errattr_CFLAGS="-Werror=attributes"
197 ])
198 CFLAGS="$save_CFLAGS"
199 ],
186 [[errattr_CFLAGS=""]], [], []) 200 [[errattr_CFLAGS=""]], [], [])
187AC_MSG_CHECKING([[for function inline keywords suppoted by $CC]]) 201AC_MSG_CHECKING([[for function inline keywords suppoted by $CC]])
188save_CFLAGS="$CFLAGS" 202save_CFLAGS="$CFLAGS"