[PATCH 1/7] meson: Fix build if Xdmcp is missing

Thierry Reding thierry.reding at gmail.com
Wed Mar 28 12:04:32 UTC 2018


From: Thierry Reding <treding at nvidia.com>

Xdmcp is an optional dependency, so make sure the build succeeds if it
is missing.

Signed-off-by: Thierry Reding <treding at nvidia.com>
---
 include/meson.build | 4 ++--
 meson.build         | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/include/meson.build b/include/meson.build
index c64af59f5ccf..4a2798514500 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -91,7 +91,7 @@ conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path)
 
 conf_data.set('XORG_VERSION_CURRENT', release)
 
-conf_data.set('HASXDMAUTH', get_option('xdm-auth-1'))
+conf_data.set('HASXDMAUTH', has_xdm_auth)
 conf_data.set('SECURE_RPC', get_option('secure-rpc'))
 
 conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h'))
@@ -182,7 +182,7 @@ conf_data.set('SHAPE', '1')
 conf_data.set('XACE', build_xace)
 conf_data.set('XCMISC', '1')
 conf_data.set('XCSECURITY', build_xsecurity)
-conf_data.set('XDMCP', get_option('xdmcp'))
+conf_data.set('XDMCP', xdmcp_dep.found())
 conf_data.set('XF86BIGFONT', build_xf86bigfont)
 conf_data.set('XF86DRI', build_dri1)
 conf_data.set('XF86VIDMODE', build_xf86vidmode)
diff --git a/meson.build b/meson.build
index 46803892be23..b1af0a3debc5 100644
--- a/meson.build
+++ b/meson.build
@@ -288,11 +288,17 @@ endif
 # XXX: Add more sha1 options, because Linux is about choice
 sha1_dep = nettle_dep
 
-xdmcp_dep = []
+xdmcp_dep = dependency('', required : false)
 if get_option('xdmcp')
     xdmcp_dep = dependency('xdmcp')
 endif
 
+has_xdm_auth = get_option('xdm-auth-1')
+
+if not xdmcp_dep.found()
+  has_xdm_auth = false
+endif
+
 build_glx = get_option('glx')
 
 libdrm_dep = dependency('libdrm', version: '>= 2.4.89', required: false)
-- 
2.16.3



More information about the xorg-devel mailing list