summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_autoconf.py
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-04-24 18:10:37 +0200
committerStefan Metzmacher <metze@samba.org>2010-04-24 20:03:50 +0200
commit051535f196305f5ded4d786a2db977b0626ee0b9 (patch)
tree20a4050b8dbcae424158eb9ed9d7800428c57da9 /buildtools/wafsamba/samba_autoconf.py
parent1ed5f7182074768a84eefc00bd2af64933799b4d (diff)
downloadsamba-051535f196305f5ded4d786a2db977b0626ee0b9.tar.gz
samba-051535f196305f5ded4d786a2db977b0626ee0b9.tar.bz2
samba-051535f196305f5ded4d786a2db977b0626ee0b9.zip
buildtools/wafsamba: inline defines during configure into the tests
There 2 reasons for this change: - This is how autoconf tests work and it makes config.log much more useful - The waf c preprocessor ignored changes in bin/default/__confdefs.h when using waf configure -C, because is outside of the configure tests project path and handled like a system header. Many thanks to ita for pointing out the fix. metze
Diffstat (limited to 'buildtools/wafsamba/samba_autoconf.py')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index c35db9b45f..743f420d5d 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -345,19 +345,16 @@ def CHECK_CODE(conf, code, define,
else:
execute = 0
+ defs = conf.get_config_header()
+
if addmain:
- fragment='#include "__confdefs.h"\n%s\n int main(void) { %s; return 0; }\n' % (hdrs, code)
+ fragment='%s\n%s\n int main(void) { %s; return 0; }\n' % (defs, hdrs, code)
else:
- fragment='#include "__confdefs.h"\n%s\n%s\n' % (hdrs, code)
-
- conf.write_config_header('__confdefs.h', top=True)
+ fragment='%s\n%s\n%s\n' % (defs, hdrs, code)
if msg is None:
msg="Checking for %s" % define
- # include the directory containing __confdefs.h
- cflags += ' -I../../default'
-
if local_include:
cflags += ' -I%s' % conf.curdir