build: add_headers flag to CHECK_HEADER()
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Mar 2010 02:56:40 +0000 (13:56 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:41 +0000 (20:26 +1000)
This allows you to ask the header not be added to the list of headers
for future configure checks

buildtools/wafsamba/samba_autoconf.py

index 898264e474469123e4af5c7bb200fd76ed0d09bb..808428b08c6786a7f8ec578bcc17b798166ab2c7 100644 (file)
@@ -18,14 +18,14 @@ def DEFINE(conf, d, v):
     conf.env.append_value('CCDEFINES', d + '=' + str(v))
 
 @runonce
-def CHECK_HEADER(conf, h):
-    if conf.check(header_name=h):
+def CHECK_HEADER(conf, h, add_headers=True):
+    if conf.check(header_name=h) and add_headers:
         conf.env.hlist.append(h)
 
 @conf
-def CHECK_HEADERS(conf, list):
+def CHECK_HEADERS(conf, list, add_headers=True):
     for hdr in list.split():
-        CHECK_HEADER(conf, hdr)
+        CHECK_HEADER(conf, hdr, add_header)
 
 @conf
 def CHECK_TYPES(conf, list):