xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 19 21:28:32 UTC 2018


 include/meson.build |   12 +++++++++++-
 meson_options.txt   |    1 +
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit bfa6e84641fc7473fc2eb7e0e872e6b9fc339c2a
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Sep 19 13:07:16 2018 -0700

    meson: Add configure option and autodetection of HAVE_INPUTTHREAD.
    
    Signed-off-by: Eric Anholt <eric at anholt.net>

diff --git a/include/meson.build b/include/meson.build
index 9a7547c47..5864ced5c 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -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
diff --git a/meson_options.txt b/meson_options.txt
index 3f02d5066..6b9641756 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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')


More information about the xorg-commit mailing list