atspi = shared_library('atspi', atspi_sources + atspi_enums,
include_directories: [ root_inc, registryd_inc ],
- dependencies: [ libdbus_dep, gobject_dep, dbind_dep ],
+ dependencies: [ libdbus_dep, gobject_dep, dbind_dep, x11_deps ],
install: true)
atspi_dep = declare_dependency(link_with: atspi,
executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c',
include_directories: [ root_inc, include_directories('.') ],
- dependencies: [ gio_dep ],
+ dependencies: [ gio_dep, x11_deps ],
c_args: [
'-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir),
'-DDATADIR="@0@"'.format(atspi_datadir),
gobject_dep = dependency('gobject-2.0', version: gobject_req_version)
gio_dep = dependency('gio-2.0', version: gio_req_version)
dl_dep = cc.find_library('dl', required: false)
-x11_dep = dependency('x11', required: false)
x11_deps = []
-if x11_dep.found()
- x11_deps += x11_dep
-
- xtest_dep = dependency('xtst')
- x11_deps += xtest_dep
-
- if cc.has_function('XkbGetMap', dependencies: x11_deps)
- at_spi_conf.set('HAVE_XKB', 1)
+x11_option = get_option('enable-x11')
+if x11_option != 'no'
+ x11_dep = dependency('x11', required: false)
+
+ if x11_dep.found()
+ x11_deps += x11_dep
+ at_spi_conf.set('HAVE_X11', 1)
+ xtest_dep = dependency('xtst')
+ x11_deps += xtest_dep
+
+ if cc.has_function('XkbGetMap', dependencies: x11_deps)
+ at_spi_conf.set('HAVE_XKB', 1)
+ endif
+
+ xinput_dep = dependency('xi')
+ x11_deps += xinput_dep
endif
-
- xinput_dep = dependency('xi')
- x11_deps += xinput_dep
endif
# Alignments
value: false)
option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable GObject Introspection (depends on GObject)')
+
+option('enable-x11', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable X11 support')
dl_dep,
]
-if x11_dep.found()
- registryd_sources += [
- 'deviceeventcontroller-x11.c',
- 'display.c',
- 'event-source.c',
- 'ucs2keysym.c',
- ]
+x11_option = get_option('enable-x11')
+if x11_option != 'no'
+ if x11_dep.found()
+ registryd_sources += [
+ 'deviceeventcontroller-x11.c',
+ 'display.c',
+ 'event-source.c',
+ 'ucs2keysym.c',
+ ]
- registryd_deps += x11_deps
+ registryd_deps += x11_deps
+ endif
endif
executable('at-spi2-registryd', registryd_sources,