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

70130e
From 4950f4b3973a9391a674fedd02dc364abe0f121e Mon Sep 17 00:00:00 2001
70130e
From: Daniel Stone <daniel@fooishbar.org>
70130e
Date: Tue, 16 Oct 2012 17:14:01 +1100
70130e
Subject: [PATCH 19/39] xwayland: Introduce an auto mode for --enable-wayland
70130e
70130e
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
70130e
---
70130e
 configure.ac | 16 ++++++++--------
70130e
 1 file changed, 8 insertions(+), 8 deletions(-)
70130e
70130e
diff --git a/configure.ac b/configure.ac
70130e
index c146b7b..5cb4f5d 100644
70130e
--- a/configure.ac
70130e
+++ b/configure.ac
70130e
@@ -635,7 +635,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])
70130e
@@ -1025,12 +1025,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
@@ -1127,7 +1131,6 @@ case "$DRI2,$HAVE_DRI2PROTO" in
70130e
 esac
70130e
 AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
70130e
 
70130e
-<<<<<<< HEAD
70130e
 PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO,
70130e
                   [HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no])
70130e
 
70130e
@@ -1186,10 +1189,7 @@ esac
70130e
 
70130e
 AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes)
70130e
 
70130e
-if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
70130e
-=======
70130e
-if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$CONFIG_UDEV_KMS" = xyes || test "x$WAYLAND" = xyes ; then
70130e
->>>>>>> Add xwayland module
70130e
+if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes || test "x$WAYLAND" = xyes ; then
70130e
 	if test "x$DRM" = xyes; then
70130e
 		AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
70130e
 		PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
70130e
-- 
70130e
1.8.3.1
70130e