[PATCH xserver 07/10] meson: Make FALLBACK_INPUT_DRIVER configurable in meson.
Eric Anholt
eric at anholt.net
Tue Aug 7 23:23:16 UTC 2018
This makes us match the featureset of autotools, and also fixes the
non-Linux default value to match.
Signed-off-by: Eric Anholt <eric at anholt.net>
---
hw/xfree86/common/meson.build | 14 +++++++++++++-
include/meson.build | 2 --
meson_options.txt | 2 ++
3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build
index 514999ff6ad2..3e617dc369f7 100644
--- a/hw/xfree86/common/meson.build
+++ b/hw/xfree86/common/meson.build
@@ -47,6 +47,15 @@ xorg_sdk_headers = [
'xaarop.h',
]
+fallback_driver = get_option('fallback_input_driver')
+if fallback_driver == 'auto'
+ if host_machine.system() == 'linux'
+ fallback_driver = 'libinput'
+ else
+ fallback_driver = ''
+ endif
+endif
+
if build_dga
srcs_xorg_common += 'xf86DGA.c'
xorg_sdk_headers += 'dgaproc.h'
@@ -87,7 +96,10 @@ xorg_common = static_library('xorg_common',
pciaccess_dep,
libdrm_dep,
],
- c_args: xorg_c_args,
+ c_args: [
+ xorg_c_args,
+ '-DFALLBACK_INPUT_DRIVER="@0@"'.format(fallback_driver)
+ ],
)
install_data(xorg_sdk_headers, install_dir: xorgsdkdir)
diff --git a/include/meson.build b/include/meson.build
index 52fb837b9d12..13ca1f8f8d34 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -52,7 +52,6 @@ conf_data.set('_GNU_SOURCE', '1')
# ifdef for openbsd?
conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
-# XXX: FALLBACK_INPUT_DRIVER
# XXX: BUNDLE_ID_PREFIX
conf_data.set_quoted('OSNAME', 'Linux') # XXX
conf_data.set('HAVE_INPUTTHREAD', '1') # XXX
@@ -329,7 +328,6 @@ xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share')
xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg')
xorg_data.set_quoted('DEFAULT_LOGDIR', log_dir)
xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.')
-xorg_data.set_quoted('FALLBACK_INPUT_DRIVER', 'libinput')
xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir))
xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', join_paths(get_option('prefix'), get_option('libdir')))
xorg_data.set_quoted('__XSERVERNAME__', 'Xorg')
diff --git a/meson_options.txt b/meson_options.txt
index 5560dd55e952..ed0c849aa305 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -40,6 +40,8 @@ option('xkb_default_layout', type: 'string', value: 'us')
option('xkb_default_variant', type: 'string')
option('xkb_default_options', type: 'string')
+option('fallback_input_driver', type: 'string', value: 'auto')
+
option('vendor_name', type: 'string', value: 'The X.Org Foundation')
option('vendor_name_short', type: 'string', value: 'X.Org')
option('vendor_web', type: 'string', value: 'http://wiki.x.org')
--
2.18.0
More information about the xorg-devel
mailing list