diff options
author | Rainer Jung <rjung@apache.org> | 2017-10-16 11:22:38 +0200 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2017-10-16 11:22:38 +0200 |
commit | 0da02415a578512570aaee6598e1dfc07ce42e4d (patch) | |
tree | e7e10cec97916baf06b73404497f229e56796867 /configure.in | |
parent | GCC/Clang strict-prototypes handling in configure: (diff) | |
download | apache2-0da02415a578512570aaee6598e1dfc07ce42e4d.tar.xz apache2-0da02415a578512570aaee6598e1dfc07ce42e4d.zip |
Fix maintainer mode with GCC/Clang.
Setting -Wstrict-prototypes in combination
with -Werror leads to compiler errors during
configure checks (autoconf generates incomplete
prototypes).
Adding -Wno-error=strict-prototypes lets the
compiler tolerate those.
Possible future enhancement: remember such
"configure time only" flags and remove them
from CFLAGS before generating our build time
files (Makefile, config_vars.mk etc.), so that
the full -Werror is in place during building.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1812263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.in b/configure.in index ef7bd02482..2f328cc2a8 100644 --- a/configure.in +++ b/configure.in @@ -630,6 +630,10 @@ AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn o APR_ADDTO(CPPFLAGS, -DAP_DEBUG) if test "$GCC" = "yes"; then APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith]) + # Next flag needed, because -Wstrict-prototypes in combination with + # -Werror leads to compiler errors during configure checks (autoconf + # generates incomplete prototypes). + APACHE_ADD_GCC_CFLAG([-Wno-error=strict-prototypes]) APACHE_ADD_GCC_CFLAG([-std=c89]) APACHE_ADD_GCC_CFLAG([-Werror]) APACHE_ADD_GCC_CFLAG([-Wdeclaration-after-statement]) |