summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-03-24 11:34:49 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-04-28 23:12:52 +0100
commit2354ddd6091a265fce67cc3d489002daa6f45f56 (patch)
tree7e4326ded434fa605a36a19dba49170dbd70894c
parentc0c2d5527486965e82ff84339dd200f23936bab8 (diff)
downloadgtk+-2354ddd6091a265fce67cc3d489002daa6f45f56.tar.gz
meson: check for xinerama
-rw-r--r--gdk/x11/meson.build1
-rw-r--r--meson.build20
-rw-r--r--meson_options.txt2
3 files changed, 19 insertions, 4 deletions
diff --git a/gdk/x11/meson.build b/gdk/x11/meson.build
index 298c5929e2..82e75d5f3d 100644
--- a/gdk/x11/meson.build
+++ b/gdk/x11/meson.build
@@ -64,6 +64,7 @@ gdk_x11_deps = [
xfixes_dep,
xcomposite_dep,
xrandr_dep,
+ xinerama_dep,
]
libgdk_x11 = static_library('libgdk-x11',
diff --git a/meson.build b/meson.build
index 96d1fdf484..5158c8b1cc 100644
--- a/meson.build
+++ b/meson.build
@@ -122,8 +122,6 @@ endforeach
# Maths functions might be implemented in libm
libm = cc.find_library('m', required : false)
-# FIXME: HAVE_XFREE_XINERAMA
-
check_functions = [
'dcgettext',
'getpagesize',
@@ -231,8 +229,6 @@ if x11_enabled
fontconfig_dep = dependency('fontconfig')
atkbridge_dep = dependency('atk-bridge-2.0', version: atk_req)
- # FIXME: check for xinerama + add to x11_pkgs
-
x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr']
if xcursor_dep.found()
@@ -281,6 +277,20 @@ if x11_enabled
endif
endif
+ enable_xinerama = get_option('enable-xinerama')
+ if enable_xinerama != 'no'
+ want_xinerama = enable_xinerama == 'yes'
+ xinerama_dep = dependency('xinerama', required : want_xinerama)
+ if xinerama_dep.found() and cc.has_header_symbol('X11/extensions/Xinerama.h', 'XineramaQueryExtension', dependencies : xinerama_dep)
+ cdata.set('HAVE_XFREE_XINERAMA', 1)
+ x11_pkgs += ['xinerama']
+ elif want_xinerama
+ error('No function XineramaQueryExtension in xinerama dependency which was explicitly requested.')
+ endif
+ else
+ xinerama_dep = []
+ endif
+
cdata.set('HAVE_RANDR', xrandr_dep.found())
cdata.set('HAVE_RANDR15', xrandr15_dep.found())
endif
@@ -329,6 +339,8 @@ if enable_vulkan != 'no'
if vulkan_lib.found() and cc.has_function('vkCreateInstance', dependencies : vulkan_lib) and cc.has_header('vulkan/vulkan.h')
have_vulkan = true
pc_gdk_extra_libs += ['-lvulkan']
+ elif enable_vulkan == 'yes'
+ error('Vulkan support not found, but was explicitly requested.')
endif
else
message('Vulkan support explicitly disabled')
diff --git a/meson_options.txt b/meson_options.txt
index 7ccabfd602..bf80420ceb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -18,3 +18,5 @@ option('enable-papi-print-backend', type: 'combo', choices : ['yes', 'no', 'auto
description : 'Enable the papi print backend')
option('enable-cloudprint-print-backend', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
description : 'Enable the cloudprint print backend')
+option('enable-xinerama', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+ description : 'Enable support for the Xinerama extension')