diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-05-05 15:16:26 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-05-05 16:14:13 +0200 |
commit | ed2941ba3d59ca7f043583a36582e2d5cdee65fe (patch) | |
tree | 7fb87c46d6c2fdfcd7757378a5a28a00bdca2012 /buildtools | |
parent | 20d77705cece08ae5bebeca77db1f467d436748e (diff) | |
download | samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.tar.gz samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.tar.xz samba-ed2941ba3d59ca7f043583a36582e2d5cdee65fe.zip |
build: added configure test for inline
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_conftests.py | 24 | ||||
-rw-r--r-- | buildtools/wafsamba/wscript | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py index e709929ba96..a5c1b389aed 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 0413bb4b0e2..c8872eb7955 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') |