[PATCH xserver 03/10] meson: Add HAVE_LIBDISPATCH define to xquartz build.

Eric Anholt eric at anholt.net
Tue Aug 7 23:23:12 UTC 2018


Signed-off-by: Eric Anholt <eric at anholt.net>
---
 hw/xquartz/meson.build | 20 +++++++++++++-------
 include/meson.build    |  1 -
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/hw/xquartz/meson.build b/hw/xquartz/meson.build
index f92fbc960145..ebb24132c3f7 100644
--- a/hw/xquartz/meson.build
+++ b/hw/xquartz/meson.build
@@ -17,6 +17,18 @@ srcs = [
     '../../mi/miinitext.c',
 ]
 
+xquartz_c_args = [
+    '-DXFree86Server',
+    # XXXX: BUILD_DATE
+    '-DXSERVER_VERSION="' + meson_project.version() + '"',
+    '-DINXQUARTZ',
+    '-DUSE_NEW_CLUT',
+]
+
+if cc.has_function('dispatch_async')
+    xquartz_c_args += '-DHAVE_LIBDISPATCH'
+endif
+
 executable(
     'Xquartz',
     srcs,
@@ -29,12 +41,6 @@ executable(
         libxserver_glx,
         libxserver_pseudoramix,
     ],
-    c_args: [
-        '-DXFree86Server',
-        # XXXX: BUILD_DATE
-        '-DXSERVER_VERSION="' + meson_project.version() + '"',
-        '-DINXQUARTZ',
-        '-DUSE_NEW_CLUT',
-    ],
+    c_args: xquartz_c_args,
     install: true,
 )
diff --git a/include/meson.build b/include/meson.build
index 3548ac3c9b46..43139fa97d15 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -54,7 +54,6 @@ conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd')
 
 # XXX: FALLBACK_INPUT_DRIVER
 # XXX: BUNDLE_ID_PREFIX
-# XXX: HAVE_LIBDISPATCH
 conf_data.set_quoted('OSNAME', 'Linux') # XXX
 conf_data.set('HAVE_INPUTTHREAD', '1') # XXX
 
-- 
2.18.0



More information about the xorg-devel mailing list