diff options
Diffstat (limited to 'scons')
-rwxr-xr-x | scons/gallium.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index c8e47a39db1..1e35ef434a3 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -157,6 +157,19 @@ def check_header(env, header): env = conf.Finish() return have_header +def check_functions(env, functions): + '''Check if all of the functions exist''' + + conf = SCons.Script.Configure(env) + have_functions = True + + for function in functions: + if not conf.CheckFunc(function): + have_functions = False + + env = conf.Finish() + return have_functions + def check_prog(env, prog): """Check whether this program exists.""" @@ -339,6 +352,9 @@ def generate(env): if check_header(env, 'xlocale.h'): cppdefines += ['HAVE_XLOCALE_H'] + if check_functions(env, ['strtod_l', 'strtof_l']): + cppdefines += ['HAVE_STRTOD_L'] + if platform == 'windows': cppdefines += [ 'WIN32', |