From 051535f196305f5ded4d786a2db977b0626ee0b9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 24 Apr 2010 18:10:37 +0200 Subject: 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 --- buildtools/wafsamba/samba_autoconf.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'buildtools/wafsamba/samba_autoconf.py') 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 -- cgit