[PATCH xserver 10/10] meson: Make XF86VidMode extension optional

Laurent Carlier lordheavym at gmail.com
Sun Feb 18 09:58:41 UTC 2018


Signed-off-by: Laurent Carlier <lordheavym at gmail.com>
---
 meson.build       | 13 +++++++++++--
 meson_options.txt |  2 ++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index ef32d92..6888365 100644
--- a/meson.build
+++ b/meson.build
@@ -419,8 +419,17 @@ if (get_option('xselinux') == true and
     selinux_dep = dependency('libselinux', version: '>= 2.0.86', required: true)
 endif
 
-# XXX: Allow configuration of these.
-build_xf86vidmode = xf86vidmodeproto_dep.found()
+build_xf86vidmode = false
+if get_option('xf86vidmode') == 'auto'
+    build_xf86vidmode = xf86vidmodeproto_dep.found()
+elif get_option('xf86vidmode') == 'true'
+    build_xf86vidmode = true
+endif
+if (build_xf86vidmode and
+   (host_machine.system() == 'cygwin' or
+   build_xquartz)) ## mingw ??
+    build_xf86vidmode = false
+endif
 
 m_dep = cc.find_library('m', required : false)
 dl_dep = cc.find_library('dl', required : false)
diff --git a/meson_options.txt b/meson_options.txt
index 4d62da2..4e9b976 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -85,6 +85,8 @@ option('mitshm', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto
        description: 'SHM extension')
 option('xselinux', type: 'boolean', value: false,
        description: 'SELinux extension')
+option('xf86vidmode', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
+       description: 'XF86VidMode 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