You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/01/11 22:13:20 UTC
svn commit: r1057868 - /httpd/httpd/trunk/configure.in
Author: sf
Date: Tue Jan 11 21:13:20 2011
New Revision: 1057868
URL: http://svn.apache.org/viewvc?rev=1057868&view=rev
Log:
Use -Wdeclaration-after-statement in maintainer mode if we use a recent
enough gcc.
Modified:
httpd/httpd/trunk/configure.in
Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=1057868&r1=1057867&r2=1057868&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Tue Jan 11 21:13:20 2011
@@ -530,6 +530,16 @@ 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])
+ AC_CACHE_CHECK([whether gcc accepts -Wdeclaration-after-statement], [ap_cv_cc_Wdas], [
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ AC_COMPILE_IFELSE([int foo() { return 0; }],
+ [ap_cv_cc_Wdas=yes], [ap_cv_cc_Wdas=no])
+ CFLAGS=$save_CFLAGS
+ ])
+ if test "$ap_cv_cc_Wdas" = "yes"; then
+ APR_ADDTO(CFLAGS,[-Wdeclaration-after-statement])
+ fi
elif test "$AIX_XLC" = "yes"; then
APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro)
fi