diff options
Diffstat (limited to 'scons/gallium.py')
-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 61643a6d4fc..450da8cc6ef 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -146,6 +146,19 @@ def check_cc(env, cc, expr, cpp_opt = '-E'): return result +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.""" @@ -330,6 +343,9 @@ def generate(env): cppdefines += ['HAVE_XLOCALE_H'] env = conf.Finish() + if check_functions(env, ['strtod_l', 'strtof_l']): + cppdefines += ['HAVE_STRTOD_L'] + if platform == 'windows': cppdefines += [ 'WIN32', |