Commit bfa6e846 authored by Eric Anholt's avatar Eric Anholt

meson: Add configure option and autodetection of HAVE_INPUTTHREAD.

Signed-off-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent a56da0ff
Pipeline #4544 passed with stage
in 1 minute and 57 seconds
......@@ -53,7 +53,17 @@ conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
# XXX: BUNDLE_ID_PREFIX
conf_data.set_quoted('OSNAME', 'Linux') # XXX
conf_data.set('HAVE_INPUTTHREAD', '1') # XXX
if get_option('input_thread') == 'false'
enable_input_thread = false
else
enable_input_thread = cc.has_header_symbol('pthread.h',
'PTHREAD_MUTEX_RECURSIVE')
if not enable_input_thread and get_option('input_thread') == 'true'
error('Input thread enabled and PTHREAD_MUTEX_RECURSIVE not found')
endif
endif
conf_data.set('HAVE_INPUTTHREAD', enable_input_thread)
if cc.compiles('''
#define _GNU_SOURCE 1
......
......@@ -30,6 +30,7 @@ option('xdmcp', type: 'boolean', value: true)
option('xdm-auth-1', type: 'boolean', value: true)
option('secure-rpc', type: 'boolean', value: true)
option('ipv6', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
option('input_thread', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
option('xkb_dir', type: 'string')
option('xkb_output_dir', type: 'string')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment