Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame^] | 1 | From 498f230c9446fc7a1b4dc77ff6b84ee1a3b53bf4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Fabio Berton <fabio.berton@ossystems.com.br> |
| 3 | Date: Wed, 24 Apr 2019 17:01:24 -0300 |
| 4 | Subject: [PATCH] meson.build: check for all linux host_os combinations |
| 5 | Organization: O.S. Systems Software LTDA. |
| 6 | |
| 7 | Make sure that we are also looking for our host_os combinations like |
| 8 | linux-musl etc. when assuming support for DRM/KMS. |
| 9 | |
| 10 | Also delete a duplicate line. |
| 11 | |
| 12 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> |
| 13 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> |
| 14 | --- |
| 15 | meson.build | 6 +++--- |
| 16 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 17 | |
| 18 | diff --git a/meson.build b/meson.build |
| 19 | index 53d02e31097..c41f6b4e402 100644 |
| 20 | --- a/meson.build |
| 21 | +++ b/meson.build |
| 22 | @@ -34,6 +34,8 @@ cpp = meson.get_compiler('cpp') |
| 23 | |
| 24 | null_dep = dependency('', required : false) |
| 25 | |
| 26 | +system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') |
| 27 | + |
| 28 | # Arguments for the preprocessor, put these in a separate array from the C and |
| 29 | # C++ (cpp in meson terminology) arguments since they need to be added to the |
| 30 | # default arguments for both C and C++. |
| 31 | @@ -89,8 +91,6 @@ if (with_gles1 or with_gles2) and not with_opengl |
| 32 | error('building OpenGL ES without OpenGL is not supported.') |
| 33 | endif |
| 34 | |
| 35 | -system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system()) |
| 36 | - |
| 37 | _drivers = get_option('dri-drivers') |
| 38 | if _drivers.contains('auto') |
| 39 | if system_has_kms_drm |
| 40 | @@ -792,7 +792,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));', |
| 41 | endif |
| 42 | |
| 43 | # TODO: this is very incomplete |
| 44 | -if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) |
| 45 | +if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux') |
| 46 | pre_args += '-D_GNU_SOURCE' |
| 47 | endif |
| 48 | |
| 49 | -- |
| 50 | 2.21.0 |
| 51 | |