From: Vinson Lee Date: Wed, 5 Jul 2017 21:16:11 +0000 (-0700) Subject: scons: Check for xlocale.h before defining HAVE_XLOCALE_H. X-Git-Tag: upstream/18.1.0~8029 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5d0dc7fa5566941a49ede8c83a0cfe0a33a3d7f;p=platform%2Fupstream%2Fmesa.git scons: Check for xlocale.h before defining HAVE_XLOCALE_H. Don't assume the header is present on some platforms - use the more robust CheckHeader() instead. glibc 2.26 removed xlocale.h. https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 Fix this build error with glibc 2.26. Compiling src/util/strtod.c ... src/util/strtod.c:32:10: fatal error: xlocale.h: No such file or directory #include ^~~~~~~~~~~ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101657 Signed-off-by: Vinson Lee Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Emil Velikov Reviewed-by: Eric Engestrom Tested-by: Eric Engestrom --- diff --git a/scons/gallium.py b/scons/gallium.py index a411277..61643a6 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -325,8 +325,10 @@ def generate(env): 'GLX_INDIRECT_RENDERING', ] - if env['platform'] in ('linux', 'darwin'): + conf = SCons.Script.Configure(env) + if conf.CheckHeader('xlocale.h'): cppdefines += ['HAVE_XLOCALE_H'] + env = conf.Finish() if platform == 'windows': cppdefines += [