Add --enable-picky-developer
authorZach Loafman <zachary.loafman@isilon.com>
Thu, 3 Jul 2008 20:45:07 +0000 (13:45 -0700)
committerVolker Lendecke <vl@samba.org>
Tue, 22 Jul 2008 13:00:48 +0000 (15:00 +0200)
This adds an --enable-picky-developer option that will halt compilation
on warnings. Yes, this could be handled by a direct Makefile change, but
people should be encourage to do it!
(This used to be commit 10a2ab40771b7d0222f339a87a45630a23ce4788)

source3/Makefile.in
source3/configure.in
source3/m4/check_path.m4

index 72aa9a5149aed76f73a389521e2013c64bc88f66..aeff0571320912d3236830bdbd4aeb85bbf6d821 100644 (file)
@@ -34,8 +34,8 @@ SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@
 MODULE_EXPORTS=@MODULE_EXPORTS@
 
 # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler
-# (GCC) warnings. This is done automtically for --enable-developer
-# and --enable-krb5developer.
+# (GCC) warnings. This is done automtically for --enable-developer,
+# --enable-picky-developer and --enable-krb5developer.
 DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@
 CFLAGS=@CFLAGS@
 CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
index cb0e37e4a269da4304d1e3f50e9d5c57c2194209..0fe938764ad2544266ac7699666add72e6fbc6d3 100644 (file)
@@ -183,6 +183,10 @@ if test x"$ac_cv_prog_gcc" = x"yes" ; then
        if test x"$krb5_developer" != x"$yes" ; then
            DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Wstrict-prototypes"
        fi
+
+       if test x"$picky_developer" = x"yes"; then
+           DEVELOPER_CFLAGS="$DEVELOPER_CFLAGS -Werror"
+       fi
 fi
 
 AC_ARG_ENABLE(dmalloc, [AS_HELP_STRING([--enable-dmalloc], [Enable heap debugging [default=no]])])
@@ -6115,7 +6119,7 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
 
 dnl Merge in developer cflags from now on
 AC_SUBST(DEVELOPER_CFLAGS)
-if test x"$krb5_developer" = x"yes" -o x"$developer" = x"yes"; then
+if test x"$krb5_developer" = x"yes" -o x"$developer" = x"yes" -o x"$picky_developer" = x"yes"; then
     CFLAGS="${CFLAGS} \$(DEVELOPER_CFLAGS)"
 fi
 
index ccf21271c80400607186e915f39272a50c3a7337..0537b7a896bf502e34cdc693932e8b680fb1a902 100644 (file)
@@ -296,6 +296,14 @@ AC_ARG_ENABLE(krb5developer, [AS_HELP_STRING([--enable-krb5developer], [Turn on
        krb5_developer=yes
     fi])
 
+picky_developer=no
+AC_ARG_ENABLE(picky-developer, [AS_HELP_STRING([--enable-picky-developer], [Halt compilation on warnings])],
+    [if eval "test x$enable_picky_developer = xyes"; then
+        debug=yes
+        developer=yes
+        picky_developer=yes
+    fi])
+
 AC_ARG_WITH(cfenc,
 [AS_HELP_STRING([--with-cfenc=HEADERDIR], [Use internal CoreFoundation encoding API for optimization (Mac OS X/Darwin only)])],
 [