[PATCH xserver 08/10] meson: Make SHM extension optional
Laurent Carlier
lordheavym at gmail.com
Sun Feb 18 09:58:39 UTC 2018
Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
---
include/meson.build | 2 +-
meson.build | 8 +++++++-
meson_options.txt | 2 ++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/meson.build b/include/meson.build
index 4949174..e62d647 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -168,7 +168,7 @@ conf_data.set('DPMSExtension', build_dpms)
conf_data.set('DRI2', build_dri2)
conf_data.set('DRI3', build_dri3)
conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir'))
-conf_data.set('HAS_SHM', '1')
+conf_data.set('HAS_SHM', build_mitshm)
conf_data.set('MITSHM', build_mitshm)
conf_data.set('PANORAMIX', build_xinerama)
conf_data.set('PRESENT', '1')
diff --git a/meson.build b/meson.build
index 983604a..5ad432f 100644
--- a/meson.build
+++ b/meson.build
@@ -402,8 +402,14 @@ if (get_option('linux_acpi') == true and
endif
endif
+build_mitshm = false
+if get_option('mitshm') == 'auto'
+ build_mitshm = sysvipc_found
+elif get_option('mitshm') == 'true'
+ build_mitshm = true
+endif
+
# XXX: Allow configuration of these.
-build_mitshm = true
build_xselinux = false
build_xf86vidmode = xf86vidmodeproto_dep.found()
diff --git a/meson_options.txt b/meson_options.txt
index c674d75..d7af87d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -81,6 +81,8 @@ option('linux_apm', type: 'boolean', value: true,
description: 'APM support on Linux')
option('linux_acpi', type: 'boolean', value: true,
description: 'ACPI support on Linux')
+option('mitshm', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+ description: 'SHM extension')
option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')
--
2.16.2
More information about the xorg-devel
mailing list