summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-03-24 11:03:56 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-03 15:10:55 +0100
commit25cdd19bb040740bd7cdc4359b867f4307b45814 (patch)
treedd2b993e4be04729ab1ad0aa6df33b6a277e072d /meson.build
parent2f3c9750582e444757ac16b1cdb5ecc2a04c157e (diff)
downloadgtk+-25cdd19bb040740bd7cdc4359b867f4307b45814.tar.gz
meson: fix XIAllowTouchEvents check
Need to link against dep/lib to check for function in it. Also misc fixes to surrounding xi-related checks.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 6 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 0c28c7c875..96d1fdf484 100644
--- a/meson.build
+++ b/meson.build
@@ -266,15 +266,17 @@ if x11_enabled
cdata.set('HAVE_XSYNC', 1)
endif
- if cc.has_function('XGetEventData', dependencies : x11_dep,
- prefix : '#include <X11/Xlib.h>')
+ if cc.has_function('XGetEventData', dependencies : x11_dep)
cdata.set('HAVE_XGENERICEVENTS', 1)
endif
- if xi_dep.found() and cc.has_header('X11/extensions/XInput2.h')
+ if xi_dep.found() and cc.has_header('X11/extensions/XInput2.h', dependencies : xi_dep)
cdata.set('XINPUT_2', 1)
+ # Note that we also check that the XIScrollClassInfo struct is defined,
+ # because at least Ubuntu Oneiric seems to have XIAllowTouchEvents(),
+ # but not the XIScrollClassInfo struct
prefix = '#include<X11/Xlib.h>\n#include<X11/extensions/XInput2.h>'
- if cc.has_function('XIAllowTouchEvents', prefix: prefix) and cc.has_member('XIScrollClassInfo', 'number', prefix: prefix)
+ if cc.has_function('XIAllowTouchEvents', dependencies : xi_dep) and cc.has_member('XIScrollClassInfo', 'number', prefix: prefix, dependencies : xi_dep)
cdata.set('XINPUT_2_2', 1)
endif
endif