summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
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
parent20d77705cece08ae5bebeca77db1f467d436748e (diff)
downloadsamba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.tar.gz
samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.tar.bz2
samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.zip
build: added configure test for inline
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_conftests.py24
-rw-r--r--buildtools/wafsamba/wscript2
2 files changed, 26 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
+
+
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 0413bb4b0e..c8872eb795 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -220,6 +220,8 @@ def configure(conf):
# we should use the PIC options in waf instead
conf.ADD_CFLAGS('-fPIC', testflags=True)
+ conf.CHECK_INLINE()
+
# check for pkgconfig
conf.check_cfg(atleast_pkgconfig_version='0.0.0')