blob: 8fabafcb35f8abeba0b79a03caaeeee289ecdf13 [file] [log] [blame]
Brad Bishop393846f2019-05-20 12:24:11 -04001From 48318f1a5c9042a8e1bb4456c2584362b25c4a59 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 15 May 2019 17:21:51 +0200
4Subject: [PATCH] meson.build: make TLS GLX optional again
5
6This was optional with autotools, and needs to be disabled
7when using musl C library, for instance.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 meson.build | 4 +++-
13 meson_options.txt | 6 ++++++
14 2 files changed, 9 insertions(+), 1 deletion(-)
15
16diff --git a/meson.build b/meson.build
17index c41f6b4..8843f3c 100644
18--- a/meson.build
19+++ b/meson.build
20@@ -336,7 +336,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless)
21 endif
22 endif
23
24-pre_args += '-DGLX_USE_TLS'
25+if get_option('glx-tls')
26+ pre_args += '-DGLX_USE_TLS'
27+endif
28 if with_glx != 'disabled'
29 if not (with_platform_x11 and with_any_opengl)
30 error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
31diff --git a/meson_options.txt b/meson_options.txt
32index ccf7065..0f1e800 100644
33--- a/meson_options.txt
34+++ b/meson_options.txt
35@@ -324,3 +324,9 @@ option(
36 value : true,
37 description : 'Enable direct rendering in GLX and EGL for DRI',
38 )
39+option(
40+ 'glx-tls',
41+ type : 'boolean',
42+ value : true,
43+ description : 'Enable TLS support in GLX',
44+)