summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_conftests.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-05-05 15:16:26 +0200
committerAndrew Tridgell <tridge@samba.org>2010-05-05 16:14:13 +0200
commited2941ba3d59ca7f043583a36582e2d5cdee65fe (patch)
tree7fb87c46d6c2fdfcd7757378a5a28a00bdca2012 /buildtools/wafsamba/samba_conftests.py
parent20d77705cece08ae5bebeca77db1f467d436748e (diff)
downloadsamba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.tar.gz
samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.tar.bz2
samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.zip
build: added configure test for inline
Diffstat (limited to 'buildtools/wafsamba/samba_conftests.py')
-rw-r--r--buildtools/wafsamba/samba_conftests.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index e709929ba9..a5c1b389ae 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -279,3 +279,27 @@ def CHECK_UNAME(conf):
msg="Checking uname %s type" % v):
ret = False
return ret
+
+@conf
+def CHECK_INLINE(conf):
+ '''check for the right value for inline'''
+ conf.COMPOUND_START('Checking for inline')
+ for i in ['inline', '__inline__', '__inline']:
+ ret = conf.CHECK_CODE('''
+ typedef int foo_t;
+ static %s foo_t static_foo () {return 0; }
+ %s foo_t foo () {return 0; }''' % (i, i),
+ define='INLINE_MACRO',
+ addmain=False,
+ link=False)
+ if ret:
+ if i != 'inline':
+ conf.DEFINE('inline', i, quote=False)
+ break
+ if not ret:
+ conf.COMPOUND_END(ret)
+ else:
+ conf.COMPOUND_END(i)
+ return ret
+
+