build: don't use gcc warnings during configure
authorAndrew Tridgell <tridge@samba.org>
Sat, 20 Mar 2010 08:38:35 +0000 (19:38 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:58 +0000 (20:26 +1000)
buildtools/wafsamba/samba_autoconf.py
lib/replace/wscript

index 01134cd26b9aeb2861b1c9d06b1caa077377d5c2..6f8985a521f1e03a146bcf4bcd484baddd595c10 100644 (file)
@@ -139,7 +139,9 @@ def CHECK_FUNC(conf, f, checklink=False, header=''):
     if CONFIG_SET(conf, define):
         return True
     if checklink:
-        return CHECK_CODE(conf, 'void *x = (void *)%s' % f, execute=False, define=define)
+        return CHECK_CODE(conf, 'void *x = (void *)%s' % f,
+                          execute=False, define=define,
+                          msg='Checking for %s' % f)
 
     return conf.check_cc(function_name=f, header_name=hlist)
 
@@ -365,6 +367,11 @@ def SAMBA_CONFIG_H(conf, path=None):
     # when we are building projects that depend on lib/replace
     if os.path.realpath(conf.curdir) != os.path.realpath(Options.launch_dir):
         return
+
+    if Options.options.developer:
+        # we add these here to ensure that -Wstrict-prototypes is not set during configure
+        conf.ADD_CFLAGS('-Wall -g -Wfatal-errors -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k')
+
     if path is None:
         conf.write_config_header('config.h', top=True)
     else:
index ef6b4237cc7c22b7e13a34aecb2fc5de16ec7513..fa0e40d21a4a34570d721edc63827d700bff1952 100644 (file)
@@ -242,9 +242,6 @@ def configure(conf):
     if Options.options.pedantic:
        conf.ADD_CFLAGS('-W')
 
-    if Options.options.developer:
-        conf.ADD_CFLAGS('-Wall -g -Wfatal-errors -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k')
-
     conf.SAMBA_CONFIG_H()
     conf.SAMBA_BUILD_ENV()