blob: ec263ce479b6b9143df009e3899f3915d61e2438 [file] [log] [blame]
Andrew Geissler87f5cff2022-09-30 13:13:31 -05001From d092a9000da62dfccca5b58fca56b94eb9989c48 Mon Sep 17 00:00:00 2001
Andrew Geissler82c905d2020-04-13 13:39:40 -05002From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:04:49 -0800
Brad Bishopa34c0302019-09-23 22:34:48 -04004Subject: [PATCH] meson.build: check for all linux host_os combinations
Brad Bishop393846f2019-05-20 12:24:11 -04005
6Make sure that we are also looking for our host_os combinations like
7linux-musl etc. when assuming support for DRM/KMS.
8
9Also delete a duplicate line.
10
Brad Bishop15ae2502019-06-18 21:44:24 -040011Upstream-Status: Pending
12
Brad Bishop393846f2019-05-20 12:24:11 -040013Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Brad Bishopa34c0302019-09-23 22:34:48 -040015Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Andrew Geissler82c905d2020-04-13 13:39:40 -050016Signed-off-by: Alistair Francis <alistair@alistair23.me>
Brad Bishop6dbb3162019-11-25 09:41:34 -050017
Brad Bishop393846f2019-05-20 12:24:11 -040018---
Brad Bishopa34c0302019-09-23 22:34:48 -040019 meson.build | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
Brad Bishop393846f2019-05-20 12:24:11 -040021
22diff --git a/meson.build b/meson.build
Andrew Geissler87f5cff2022-09-30 13:13:31 -050023index 250b528..b5c98f8 100644
Brad Bishop393846f2019-05-20 12:24:11 -040024--- a/meson.build
25+++ b/meson.build
Andrew Geissler87f5cff2022-09-30 13:13:31 -050026@@ -173,7 +173,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
Brad Bishop15ae2502019-06-18 21:44:24 -040027 # Only build shared_glapi if at least one OpenGL API is enabled
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 with_shared_glapi = with_shared_glapi and with_any_opengl
Brad Bishop393846f2019-05-20 12:24:11 -040029
Brad Bishop6dbb3162019-11-25 09:41:34 -050030-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
Brad Bishopa34c0302019-09-23 22:34:48 -040031+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
32
Brad Bishop15ae2502019-06-18 21:44:24 -040033 dri_drivers = get_option('dri-drivers')
Andrew Geissler9aee5002022-03-30 16:27:02 +000034 if dri_drivers.length() != 0
Andrew Geissler87f5cff2022-09-30 13:13:31 -050035@@ -1091,7 +1091,7 @@ if cc.has_function('reallocarray')
Brad Bishop393846f2019-05-20 12:24:11 -040036 endif
37
38 # TODO: this is very incomplete
Andrew Geissler87f5cff2022-09-30 13:13:31 -050039-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system())
Andrew Geissler95ac1b82021-03-31 14:34:31 -050040+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux')
Brad Bishop393846f2019-05-20 12:24:11 -040041 pre_args += '-D_GNU_SOURCE'
Brad Bishop6dbb3162019-11-25 09:41:34 -050042 elif host_machine.system() == 'sunos'
43 pre_args += '-D__EXTENSIONS__'