From ed2941ba3d59ca7f043583a36582e2d5cdee65fe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 May 2010 15:16:26 +0200 Subject: build: added configure test for inline --- buildtools/wafsamba/samba_conftests.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'buildtools/wafsamba/samba_conftests.py') 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 + + -- cgit