summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-20 19:38:35 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:58 +1000
commit8253fe0c727cdeb2b268be50be6dd6fb2729b313 (patch)
tree3fd4418a323ba54faea34294ad04c067e355d92b
parent54941c86e792820f047f47abfb41db2fe1d0d68b (diff)
downloadsamba-8253fe0c727cdeb2b268be50be6dd6fb2729b313.tar.gz
samba-8253fe0c727cdeb2b268be50be6dd6fb2729b313.tar.bz2
samba-8253fe0c727cdeb2b268be50be6dd6fb2729b313.zip
build: don't use gcc warnings during configure
-rw-r--r--buildtools/wafsamba/samba_autoconf.py9
-rw-r--r--lib/replace/wscript3
2 files changed, 8 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 01134cd26b..6f8985a521 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -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:
diff --git a/lib/replace/wscript b/lib/replace/wscript
index ef6b4237cc..fa0e40d21a 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -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()