cvs: ZendEngine2 / Zend.m4

"Arnaud Le Blanc" <[email protected]> Tue, 19 May 2009 11:40:05 -0000
Newsgroups gmane.comp.php.cvs.zend
Message-ID <cvslbarnaud1242733205@cvsserver>
lbarnaud		Tue May 19 11:40:05 2009 UTC

  Modified files:              
    /ZendEngine2	Zend.m4 
  Log:
  Add GCC warnings in debug cflags for things likely to break VC builds
  (-Wpointer-arith -Wdeclaration-after-statement)
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/Zend.m4?r1=1.68&r2=1.69&diff_format=u
Index: ZendEngine2/Zend.m4
diff -u ZendEngine2/Zend.m4:1.68 ZendEngine2/Zend.m4:1.69
--- ZendEngine2/Zend.m4:1.68	Tue Dec  2 16:03:30 2008
+++ ZendEngine2/Zend.m4	Tue May 19 11:40:05 2009
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: Zend.m4,v 1.68 2008/12/02 16:03:30 cseiler Exp $
+dnl $Id: Zend.m4,v 1.69 2009/05/19 11:40:05 lbarnaud Exp $
 dnl
 dnl This file contains Zend specific autoconf functions.
 dnl
@@ -187,9 +187,20 @@
   if test "$CFLAGS" = "-g -O2"; then
   	CFLAGS=-g
   fi
-  test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
-  test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
-    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
+  changequote({,})
+  if test -n "$GCC"; then
+
+    DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
+
+    "$CC" --help=warnings|grep -q -- '-Wpointer-arith[ \t]' && \
+      DEBUG_CFLAGS="$DEBUG_CFLAGS -Wpointer-arith"
+    "$CC" --help=warnings|grep -q -- '-Wdeclaration-after-statement[ \t]' && \
+      DEBUG_CFLAGS="$DEBUG_CFLAGS -Wdeclaration-after-statement"
+
+    test "$USE_MAINTAINER_MODE" = "yes" && \
+      DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
+  fi
+  changequote([,])
 else
   AC_DEFINE(ZEND_DEBUG,0,[ ])
 fi



-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php