diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build index 514999ff6..3e617dc36 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 52fb837b9..13ca1f8f8 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 3453b8df5..8c600f398 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')