diff options
author | Zach Loafman <zachary.loafman@isilon.com> | 2008-07-03 13:45:07 -0700 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-22 15:00:48 +0200 |
commit | 45bbad9ca03621e67b4fe1db3299da0557fcf812 (patch) | |
tree | cb9434c6c3b58494af512f1f233220830ab58134 | |
parent | 2d7660dcc3df2148be07152cf2337336ae54de85 (diff) | |
download | samba-45bbad9ca03621e67b4fe1db3299da0557fcf812.tar.gz samba-45bbad9ca03621e67b4fe1db3299da0557fcf812.tar.bz2 samba-45bbad9ca03621e67b4fe1db3299da0557fcf812.zip |
Add --enable-picky-developer
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)
-rw-r--r-- | source3/Makefile.in | 4 | ||||
-rw-r--r-- | source3/configure.in | 6 | ||||
-rw-r--r-- | source3/m4/check_path.m4 | 8 |
3 files changed, 15 insertions, 3 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index 72aa9a5149..aeff057132 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -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@ diff --git a/source3/configure.in b/source3/configure.in index cb0e37e4a2..0fe938764a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -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 diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4 index ccf21271c8..0537b7a896 100644 --- a/source3/m4/check_path.m4 +++ b/source3/m4/check_path.m4 @@ -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)])], [ |