summaryrefslogtreecommitdiff
blob: 3956004535a61fb985e2fdb0dcf2516f75331cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
From d723a752982e12b7a7fb7998c3e28efd9082abd9 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Mon, 8 Dec 2014 22:00:32 +0100
Subject: [PATCH] Make wayland support optional

---
 configure.ac | 58 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 43 insertions(+), 15 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0870afa..251f909 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,23 +200,49 @@ AC_SUBST(XWAYLAND_PATH)
 
 PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
 
-PKG_CHECK_MODULES(MUTTER_NATIVE_BACKEND, [clutter-egl-1.0 libdrm libsystemd libinput gbm >= 10.3], [have_native_backend=yes], [have_native_backend=no])
-if test $have_native_backend = yes; then
-   AC_DEFINE([HAVE_NATIVE_BACKEND],[1],[Define if you want to enable the native (KMS) backend based on systemd])
-fi
-AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test $have_native_backend = yes])
-
-PKG_CHECK_MODULES(MUTTER_WAYLAND, [clutter-wayland-1.0 clutter-wayland-compositor-1.0 wayland-server >= 1.5.90], [have_wayland=yes], [have_wayland=no])
-if test $have_wayland = yes; then
-   AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
-   AS_IF([test $WAYLAND_SCANNER = "no"],
-     AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
-   AC_SUBST([WAYLAND_SCANNER])
-
-   AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support])
-fi
+have_wayland=no
+AC_ARG_ENABLE(
+  [wayland],
+  AS_HELP_STRING([--disable-wayland], [disable mutter on wayland support]),
+  [],
+  enable_wayland=yes
+)
+AS_IF([test "$enable_wayland" != "no"],
+      [
+        PKG_CHECK_MODULES([MUTTER_WAYLAND],
+                          [clutter-wayland-1.0 clutter-wayland-compositor-1.0 wayland-server >= 1.5.90],
+                          [
+                            have_wayland=yes
+                            AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
+                            AS_IF([test $WAYLAND_SCANNER = "no"],
+                                  [AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])])
+                            AC_SUBST([WAYLAND_SCANNER])
+                            AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support])
+                          ],
+                          [have_wayland=no])
+])
 AM_CONDITIONAL([HAVE_WAYLAND],[test $have_wayland = yes])
 
+have_native_backend=no
+AC_ARG_ENABLE(
+  [native-backend],
+  AS_HELP_STRING([--disable-native-backend], [disable mutter native (KMS) backend]),
+  [],
+  enable_native_backend=yes
+)
+AS_IF([test "$enable_native_backend" != "no"],
+      [
+        PKG_CHECK_MODULES([MUTTER_NATIVE_BACKEND],
+                          [clutter-egl-1.0 libdrm libsystemd libinput gudev-1.0 gbm >= 10.3],
+                          [
+                            have_native_backend=yes
+                            AC_DEFINE([HAVE_NATIVE_BACKEND],[1],
+                                      [Define if you want to enable the native (KMS) backend based on systemd])
+                          ],
+                          [have_native_backend=no])
+])
+AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test $have_native_backend = yes])
+
 PKG_CHECK_EXISTS([xi >= 1.6.99.1],
                  AC_DEFINE([HAVE_XI23],[1],[Define if you have support for XInput 2.3 or greater]))
 
@@ -416,6 +442,8 @@ mutter-$VERSION
 	libcanberra:              ${have_libcanberra}
 	Introspection:            ${found_introspection}
 	Session management:       ${found_sm}
+	Wayland:                  ${have_wayland}
+	Native (KMS) backend:     ${have_native_backend}
 "
 
 
-- 
2.2.0