Blame SOURCES/0017-xwayland-Introduce-an-auto-mode-for-enable-wayland.patch

d64d53
From 70bf99f09cac43a9016039f762e5186c6ca2b6c6 Mon Sep 17 00:00:00 2001
70130e
From: Daniel Stone <daniel@fooishbar.org>
70130e
Date: Tue, 16 Oct 2012 17:14:01 +1100
d64d53
Subject: [PATCH 17/38] xwayland: Introduce an auto mode for --enable-wayland
70130e
70130e
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
70130e
---
d64d53
 configure.ac | 10 +++++++---
d64d53
 1 file changed, 7 insertions(+), 3 deletions(-)
70130e
70130e
diff --git a/configure.ac b/configure.ac
d64d53
index 8078846..c60fd44 100644
70130e
--- a/configure.ac
70130e
+++ b/configure.ac
d64d53
@@ -629,7 +629,7 @@ AC_ARG_ENABLE(clientids,      AS_HELP_STRING([--disable-clientids], [Build Xorg
70130e
 AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes])
70130e
 AC_ARG_ENABLE(linux_acpi, AC_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes])
70130e
 AC_ARG_ENABLE(linux_apm, AC_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes])
70130e
-AC_ARG_ENABLE(wayland,      AS_HELP_STRING([--disable-wayland], [Build Wayland extension (default: enabled)]), [WAYLAND=$enableval], [WAYLAND=yes])
70130e
+AC_ARG_ENABLE(wayland,      AS_HELP_STRING([--disable-wayland], [Build Wayland extension (default: auto)]), [WAYLAND=$enableval], [WAYLAND=auto])
70130e
 
70130e
 dnl DDXes.
70130e
 AC_ARG_ENABLE(xorg,    	      AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
d64d53
@@ -1020,12 +1020,16 @@ if test "x$MITSHM" = xauto; then
70130e
 	MITSHM="$ac_cv_sysv_ipc"
70130e
 fi
70130e
 
70130e
-AM_CONDITIONAL(WAYLAND, [test "x$WAYLAND" = xyes])
70130e
+WAYLAND_MODULES="wayland-client libdrm"
70130e
+if test "x$WAYLAND" = xauto; then
70130e
+        PKG_CHECK_MODULES(XWAYLAND, $WAYLAND_MODULES, [WAYLAND=yes], [WAYLAND=no])
70130e
+fi
70130e
 if test "x$WAYLAND" = xyes; then
70130e
+        PKG_CHECK_MODULES(XWAYLAND, $WAYLAND_MODULES)
70130e
 	AC_DEFINE(XORG_WAYLAND, 1, [Support wayland mode])
70130e
-	REQUIRED_MODULES="$REQUIRED_MODULES wayland-client"
70130e
 	WAYLAND_SCANNER_RULES(['$(top_srcdir)/hw/xfree86/xwayland'])
70130e
 fi
70130e
+AM_CONDITIONAL(WAYLAND, [test "x$WAYLAND" = xyes])
70130e
 
70130e
 AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes])
70130e
 if test "x$MITSHM" = xyes; then
70130e
-- 
d64d53
1.8.4.2
70130e