xorg-x11-server/0019-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch
2013-09-23 11:10:24 -07:00

46 lines
2.1 KiB
Diff

From ee97e732bcb1b2eafdaa6339a177ec2bbb6bd574 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniel@fooishbar.org>
Date: Tue, 16 Oct 2012 17:14:01 +1100
Subject: [PATCH 19/30] xwayland: Introduce an auto mode for --enable-wayland
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
---
configure.ac | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index c65e1a7..4637c41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -635,7 +635,7 @@ AC_ARG_ENABLE(windowswm, AS_HELP_STRING([--enable-windowswm], [Build XWin w
AC_ARG_ENABLE(libdrm, AS_HELP_STRING([--enable-libdrm], [Build Xorg with libdrm support (default: enabled)]), [DRM=$enableval],[DRM=yes])
AC_ARG_ENABLE(clientids, AS_HELP_STRING([--disable-clientids], [Build Xorg with client ID tracking (default: enabled)]), [CLIENTIDS=$enableval], [CLIENTIDS=yes])
AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
-AC_ARG_ENABLE(wayland, AS_HELP_STRING([--disable-wayland], [Build Wayland extension (default: enabled)]), [WAYLAND=$enableval], [WAYLAND=yes])
+AC_ARG_ENABLE(wayland, AS_HELP_STRING([--disable-wayland], [Build Wayland extension (default: auto)]), [WAYLAND=$enableval], [WAYLAND=auto])
dnl DDXes.
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -1020,12 +1020,16 @@ if test "x$MITSHM" = xauto; then
MITSHM="$ac_cv_sysv_ipc"
fi
-AM_CONDITIONAL(WAYLAND, [test "x$WAYLAND" = xyes])
+WAYLAND_MODULES="wayland-client libdrm"
+if test "x$WAYLAND" = xauto; then
+ PKG_CHECK_MODULES(XWAYLAND, $WAYLAND_MODULES, [WAYLAND=yes], [WAYLAND=no])
+fi
if test "x$WAYLAND" = xyes; then
+ PKG_CHECK_MODULES(XWAYLAND, $WAYLAND_MODULES)
AC_DEFINE(XORG_WAYLAND, 1, [Support wayland mode])
- REQUIRED_MODULES="$REQUIRED_MODULES wayland-client"
WAYLAND_SCANNER_RULES(['$(top_srcdir)/hw/xfree86/xwayland'])
fi
+AM_CONDITIONAL(WAYLAND, [test "x$WAYLAND" = xyes])
AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes])
if test "x$MITSHM" = xyes; then
--
1.8.3.1