blob: 8fabafcb35f8abeba0b79a03caaeeee289ecdf13 [file] [log] [blame]
From 48318f1a5c9042a8e1bb4456c2584362b25c4a59 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 15 May 2019 17:21:51 +0200
Subject: [PATCH] meson.build: make TLS GLX optional again
This was optional with autotools, and needs to be disabled
when using musl C library, for instance.
Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
meson.build | 4 +++-
meson_options.txt | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index c41f6b4..8843f3c 100644
--- a/meson.build
+++ b/meson.build
@@ -336,7 +336,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless)
endif
endif
-pre_args += '-DGLX_USE_TLS'
+if get_option('glx-tls')
+ pre_args += '-DGLX_USE_TLS'
+endif
if with_glx != 'disabled'
if not (with_platform_x11 and with_any_opengl)
error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
diff --git a/meson_options.txt b/meson_options.txt
index ccf7065..0f1e800 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -324,3 +324,9 @@ option(
value : true,
description : 'Enable direct rendering in GLX and EGL for DRI',
)
+option(
+ 'glx-tls',
+ type : 'boolean',
+ value : true,
+ description : 'Enable TLS support in GLX',
+)