summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_autoconf.py
diff options
context:
space:
mode:
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