diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 6a13f469..4f9b3f45 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -325,7 +325,7 @@ AS_CASE([${enable_build_type}],[debug|debugger], | |||
325 | MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion], [CFLAGS_ac]) | 325 | MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion], [CFLAGS_ac]) |
326 | MHD_FIND_ADD_CC_CFLAG_IFELSE( | 326 | MHD_FIND_ADD_CC_CFLAG_IFELSE( |
327 | [ | 327 | [ |
328 | # clang produce warning when string pointer is used as a formar for v*printf() function | 328 | # clang produce warning when string pointer is used as a format specifier for v*printf() function |
329 | AS_VAR_IF([mhd_cv_cc_clang_based],["yes"],[MHD_CHECK_ADD_CC_CFLAG([-Wno-format-nonliteral], [CFLAGS_ac])]) | 329 | AS_VAR_IF([mhd_cv_cc_clang_based],["yes"],[MHD_CHECK_ADD_CC_CFLAG([-Wno-format-nonliteral], [CFLAGS_ac])]) |
330 | ],[], | 330 | ],[], |
331 | [CFLAGS_ac], [-Wformat=2], [-Wformat] | 331 | [CFLAGS_ac], [-Wformat=2], [-Wformat] |
@@ -359,7 +359,39 @@ AS_CASE([${enable_build_type}],[debug|debugger], | |||
359 | MHD_CHECK_ADD_CC_CFLAGS([-Wmissing-noreturn -Wmissing-variable-declarations -Wnested-anon-types], [CFLAGS_ac]) | 359 | MHD_CHECK_ADD_CC_CFLAGS([-Wmissing-noreturn -Wmissing-variable-declarations -Wnested-anon-types], [CFLAGS_ac]) |
360 | MHD_CHECK_ADD_CC_CFLAGS([-Wnewline-eof -Wover-aligned -Wredundant-parens], [CFLAGS_ac]) | 360 | MHD_CHECK_ADD_CC_CFLAGS([-Wnewline-eof -Wover-aligned -Wredundant-parens], [CFLAGS_ac]) |
361 | MHD_CHECK_ADD_CC_CFLAGS([-Wshift-sign-overflow -Wtautological-compare -Wunaligned-access], [CFLAGS_ac]) | 361 | MHD_CHECK_ADD_CC_CFLAGS([-Wshift-sign-overflow -Wtautological-compare -Wunaligned-access], [CFLAGS_ac]) |
362 | MHD_CHECK_ADD_CC_CFLAGS([-Wunused -Wused-but-marked-unused -Wzero-as-null-pointer-constant -Wzero-length-array], [CFLAGS_ac]) | 362 | MHD_CHECK_ADD_CC_CFLAGS([-Wunused -Wzero-as-null-pointer-constant -Wzero-length-array], [CFLAGS_ac]) |
363 | MHD_CHECK_CC_CFLAG([-Wused-but-marked-unused],[CFLAGS_ac], | ||
364 | [ | ||
365 | AC_CACHE_CHECK([whether $[]CC -Wused-but-marked-unused works with system headers], | ||
366 | [mhd_cv_wused_but_marked_unused_sys_header], | ||
367 | [ | ||
368 | SAVE_ac_c_werror_flag="$ac_c_werror_flag" | ||
369 | ac_c_werror_flag="yes" | ||
370 | CFLAGS="${CFLAGS_ac} -Wused-but-marked-unused ${user_CFLAGS}" | ||
371 | AC_COMPILE_IFELSE( | ||
372 | [ | ||
373 | AC_LANG_SOURCE([[ | ||
374 | #include <stdio.h> | ||
375 | |||
376 | int main(void) | ||
377 | { | ||
378 | char buf[16]; | ||
379 | return (int) snprintf(buf, 16, "test"); | ||
380 | } | ||
381 | ]] | ||
382 | ) | ||
383 | ], | ||
384 | [mhd_cv_wused_but_marked_unused_sys_header="yes"], | ||
385 | [mhd_cv_wused_but_marked_unused_sys_header="no"] | ||
386 | ) | ||
387 | ac_c_werror_flag="$SAVE_ac_c_werror_flag" | ||
388 | ] | ||
389 | ) | ||
390 | AS_VAR_IF([mhd_cv_wused_but_marked_unused_sys_header],["yes"], | ||
391 | [MHD_APPEND_FLAG_TO_VAR([CFLAGS_ac],[-Wused-but-marked-unused])] | ||
392 | ) | ||
393 | ] | ||
394 | ) | ||
363 | # | 395 | # |
364 | # Removed flags: | 396 | # Removed flags: |
365 | # | 397 | # |