You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2017/10/16 09:22:38 UTC

svn commit: r1812263 - /httpd/httpd/trunk/configure.in

Author: rjung
Date: Mon Oct 16 09:22:38 2017
New Revision: 1812263

URL: http://svn.apache.org/viewvc?rev=1812263&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/configure.in

Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=1812263&r1=1812262&r2=1812263&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Mon Oct 16 09:22:38 2017
@@ -630,6 +630,10 @@ AC_ARG_ENABLE(maintainer-mode,APACHE_HEL
     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])