summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-08 00:06:39 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:46 +1000
commitfdd2f416ebd3f9d6150970ccfb3153e6809ff9de (patch)
treeb78c592243deda78002b933c8676cb71738acce9 /buildtools
parent6a8c43672bc5d33ea7edbe7879a4284cbc6df12f (diff)
downloadsamba-fdd2f416ebd3f9d6150970ccfb3153e6809ff9de.tar.gz
samba-fdd2f416ebd3f9d6150970ccfb3153e6809ff9de.tar.bz2
samba-fdd2f416ebd3f9d6150970ccfb3153e6809ff9de.zip
build: added local_include option to CHECK_CODE()
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 36bc2484ec..297d8d1921 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -173,7 +173,8 @@ def CHECK_SIZEOF(conf, vars, headers=None, define=None):
@conf
def CHECK_CODE(conf, code, define,
always=False, execute=False, addmain=True, mandatory=False,
- headers=None, msg=None, cflags=''):
+ headers=None, msg=None, cflags='', includes='# . ../default',
+ local_include=True):
'''check if some code compiles and/or runs'''
hdrs=''
if headers is not None:
@@ -198,14 +199,15 @@ def CHECK_CODE(conf, code, define,
if msg is None:
msg="Checking for %s" % define
- cflags = cflags + ' -I%s' % conf.curdir
+ if local_include:
+ cflags = cflags + ' -I%s' % conf.curdir
if conf.check(fragment=fragment,
execute=execute,
define_name = define,
mandatory = mandatory,
ccflags=to_list(cflags),
- includes='# . ../default',
+ includes=includes,
msg=msg):
conf.DEFINE(define, 1)
return True