meson: Add configure option and autodetection of HAVE_INPUTTHREAD.
Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
a56da0ff28
commit
bfa6e84641
|
@ -53,7 +53,17 @@ conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
|
||||||
|
|
||||||
# XXX: BUNDLE_ID_PREFIX
|
# XXX: BUNDLE_ID_PREFIX
|
||||||
conf_data.set_quoted('OSNAME', 'Linux') # XXX
|
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('''
|
if cc.compiles('''
|
||||||
#define _GNU_SOURCE 1
|
#define _GNU_SOURCE 1
|
||||||
|
|
|
@ -30,6 +30,7 @@ option('xdmcp', type: 'boolean', value: true)
|
||||||
option('xdm-auth-1', type: 'boolean', value: true)
|
option('xdm-auth-1', type: 'boolean', value: true)
|
||||||
option('secure-rpc', type: 'boolean', value: true)
|
option('secure-rpc', type: 'boolean', value: true)
|
||||||
option('ipv6', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto')
|
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_dir', type: 'string')
|
||||||
option('xkb_output_dir', type: 'string')
|
option('xkb_output_dir', type: 'string')
|
||||||
|
|
Loading…
Reference in New Issue