@@ -33,47 +33,47 @@ if test "$PHP_MONGODB" != "no"; then
3333
3434 if test "$PHP_MONGODB_DEVELOPER_FLAGS" = "yes"; then
3535 dnl Warn about functions which might be candidates for format attributes
36- PHP_CHECK_GCC_ARG (-Wmissing-format-attribute, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wmissing-format-attribute")
36+ AX_CHECK_COMPILE_FLAG ( - Wmissing-format-attribute , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wmissing-format-attribute" ,, - Werror )
3737 dnl Avoid duplicating values for an enum
38- PHP_CHECK_GCC_ARG (-Wduplicate-enum, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wduplicate-enum")
38+ AX_CHECK_COMPILE_FLAG ( - Wduplicate-enum , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wduplicate-enum" ,, - Werror )
3939 dnl Warns on mismatches between #ifndef and #define header guards
40- PHP_CHECK_GCC_ARG (-Wheader-guard, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wheader-guard")
40+ AX_CHECK_COMPILE_FLAG ( - Wheader-guard , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wheader-guard" ,, - Werror )
4141 dnl logical not of a non-boolean expression
42- PHP_CHECK_GCC_ARG (-Wlogical-not-parentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-not-parentheses")
42+ AX_CHECK_COMPILE_FLAG ( - Wlogical-not-parentheses , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wlogical-not-parentheses" ,, - Werror )
4343 dnl Warn about suspicious uses of logical operators in expressions
44- PHP_CHECK_GCC_ARG (-Wlogical-op, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-op")
44+ AX_CHECK_COMPILE_FLAG ( - Wlogical-op , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wlogical-op" ,, - Werror ,, - Werror )
4545 dnl memory error detector.
46- dnl FIXME: -fsanitize=address,undefined for clang. The PHP_CHECK_GCC_ARG macro isn't happy about that string :(
47- PHP_CHECK_GCC_ARG (-fsanitize-address, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fsanitize-address")
46+ dnl FIXME: -fsanitize=address,undefined for clang. The AX_CHECK_COMPILE_FLAG macro isn't happy about that string :(
47+ AX_CHECK_COMPILE_FLAG ( - fsanitize-address , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - fsanitize-address" ,, - Werror )
4848 dnl Enable frame debugging
49- PHP_CHECK_GCC_ARG (-fno-omit-frame-pointer, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fno-omit-frame-pointer")
49+ AX_CHECK_COMPILE_FLAG ( - fno-omit-frame-pointer , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - fno-omit-frame-pointer" ,, - Werror )
5050 dnl Make sure we don't optimize calls
51- PHP_CHECK_GCC_ARG (-fno-optimize-sibling-calls, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fno-optimize-sibling-calls")
52- PHP_CHECK_GCC_ARG (-Wlogical-op-parentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wlogical-op-parentheses")
53- PHP_CHECK_GCC_ARG (-Wpointer-bool-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wpointer-bool-conversion")
54- PHP_CHECK_GCC_ARG (-Wbool-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wbool-conversion")
55- PHP_CHECK_GCC_ARG (-Wloop-analysis, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wloop-analysis")
56- PHP_CHECK_GCC_ARG (-Wsizeof-array-argument, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wsizeof-array-argument")
57- PHP_CHECK_GCC_ARG (-Wstring-conversion, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wstring-conversion")
58- PHP_CHECK_GCC_ARG (-Wno-variadic-macros, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-variadic-macros")
59- PHP_CHECK_GCC_ARG (-Wno-sign-compare, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-sign-compare")
60- PHP_CHECK_GCC_ARG (-fstack-protector, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fstack-protector")
61- PHP_CHECK_GCC_ARG (-fno-exceptions, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -fno-exceptions")
62- PHP_CHECK_GCC_ARG (-Wformat-security, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wformat-security")
63- PHP_CHECK_GCC_ARG (-Wformat-nonliteral, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wformat-nonliteral")
64- PHP_CHECK_GCC_ARG (-Winit-self, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Winit-self")
65- PHP_CHECK_GCC_ARG (-Wwrite-strings, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wwrite-strings")
66- PHP_CHECK_GCC_ARG (-Wenum-compare, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wenum-compare")
67- PHP_CHECK_GCC_ARG (-Wempty-body, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wempty-body")
68- PHP_CHECK_GCC_ARG (-Wparentheses, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wparentheses")
69- PHP_CHECK_GCC_ARG (-Wdeclaration-after-statement, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wdeclaration-after-statement")
70- PHP_CHECK_GCC_ARG (-Wmaybe-uninitialized, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wmaybe-uninitialized")
71- PHP_CHECK_GCC_ARG (-Wimplicit-fallthrough, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wimplicit-fallthrough")
72- PHP_CHECK_GCC_ARG (-Werror, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Werror")
73- PHP_CHECK_GCC_ARG (-Wextra, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wextra")
74- PHP_CHECK_GCC_ARG (-Wno-unused-parameter, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-parameter")
75- PHP_CHECK_GCC_ARG (-Wno-unused-but-set-variable, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-unused-but-set-variable")
76- PHP_CHECK_GCC_ARG (-Wno-missing-field-initializers, _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS -Wno-missing-field-initializers")
51+ AX_CHECK_COMPILE_FLAG ( - fno-optimize-sibling-calls , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - fno-optimize-sibling-calls" ,, - Werror )
52+ AX_CHECK_COMPILE_FLAG ( - Wlogical-op-parentheses , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wlogical-op-parentheses" ,, - Werror )
53+ AX_CHECK_COMPILE_FLAG ( - Wpointer-bool-conversion , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wpointer-bool-conversion" ,, - Werror )
54+ AX_CHECK_COMPILE_FLAG ( - Wbool-conversion , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wbool-conversion" ,, - Werror )
55+ AX_CHECK_COMPILE_FLAG ( - Wloop-analysis , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wloop-analysis" ,, - Werror )
56+ AX_CHECK_COMPILE_FLAG ( - Wsizeof-array-argument , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wsizeof-array-argument" ,, - Werror )
57+ AX_CHECK_COMPILE_FLAG ( - Wstring-conversion , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wstring-conversion" ,, - Werror )
58+ AX_CHECK_COMPILE_FLAG ( - Wno-variadic-macros , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wno-variadic-macros" ,, - Werror )
59+ AX_CHECK_COMPILE_FLAG ( - Wno-sign-compare , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wno-sign-compare" ,, - Werror )
60+ AX_CHECK_COMPILE_FLAG ( - fstack-protector , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - fstack-protector" ,, - Werror )
61+ AX_CHECK_COMPILE_FLAG ( - fno-exceptions , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - fno-exceptions" ,, - Werror )
62+ AX_CHECK_COMPILE_FLAG ( - Wformat-security , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wformat-security" ,, - Werror )
63+ AX_CHECK_COMPILE_FLAG ( - Wformat-nonliteral , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wformat-nonliteral" ,, - Werror )
64+ AX_CHECK_COMPILE_FLAG ( - Winit-self , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Winit-self" ,, - Werror )
65+ AX_CHECK_COMPILE_FLAG ( - Wwrite-strings , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wwrite-strings" ,, - Werror )
66+ AX_CHECK_COMPILE_FLAG ( - Wenum-compare , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wenum-compare" ,, - Werror )
67+ AX_CHECK_COMPILE_FLAG ( - Wempty-body , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wempty-body" ,, - Werror )
68+ AX_CHECK_COMPILE_FLAG ( - Wparentheses , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wparentheses" ,, - Werror )
69+ AX_CHECK_COMPILE_FLAG ( - Wdeclaration-after-statement , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wdeclaration-after-statement" ,, - Werror )
70+ AX_CHECK_COMPILE_FLAG ( - Wmaybe-uninitialized , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wmaybe-uninitialized" ,, - Werror )
71+ AX_CHECK_COMPILE_FLAG ( - Wimplicit-fallthrough , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wimplicit-fallthrough" ,, - Werror )
72+ AX_CHECK_COMPILE_FLAG ( - Werror , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Werror" ,, - Werror )
73+ AX_CHECK_COMPILE_FLAG ( - Wextra , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wextra" ,, - Werror )
74+ AX_CHECK_COMPILE_FLAG ( - Wno-unused-parameter , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wno-unused-parameter" ,, - Werror )
75+ AX_CHECK_COMPILE_FLAG ( - Wno-unused-but-set-variable , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wno-unused-but-set-variable" ,, - Werror )
76+ AX_CHECK_COMPILE_FLAG ( - Wno-missing-field-initializers , _MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS - Wno-missing-field-initializers" ,, - Werror )
7777
7878 MAINTAINER_CFLAGS="$_MAINTAINER_CFLAGS"
7979 STD_CFLAGS="-g -O0 -Wall"
0 commit comments