Mesa (master): meson: Use the check_header function

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 1 19:48:43 UTC 2020


Module: Mesa
Branch: master
Commit: a16e8bfb948d1aa6e84905d0ad47960bfb9fcfed
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a16e8bfb948d1aa6e84905d0ad47960bfb9fcfed

Author: Dylan Baker <dylan.c.baker at intel.com>
Date:   Fri Apr 24 12:28:39 2020 -0700

meson: Use the check_header function

Instead of open coding it. This was new in 0.47

Acked-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>

---

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 35cc4f30052..bebb900d10a 100644
--- a/meson.build
+++ b/meson.build
@@ -1155,7 +1155,7 @@ if (cc.has_header_symbol('sys/mkdev.h', 'major') and
 endif
 
 foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'execinfo.h', 'sys/shm.h', 'cet.h']
-  if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h))
+  if cc.check_header(h)
     pre_args += '-DHAVE_ at 0@'.format(h.to_upper().underscorify())
   endif
 endforeach



More information about the mesa-commit mailing list