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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
From d886c4cada68ed5bfdca72de846182be63f2619e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Mon, 19 Dec 2022 11:30:58 +0100
Subject: [PATCH] configure.in: Allow disabling Wayland support
---
This patch is not forwarded upstream since, AFAIK, the autoconf+bakefile build
system is currently in the process of being replaced.
This patch enables us to explicitly disable GDK wayland platform detection via
an enable flag. It doesn't implement failed detection logic since that
shouldn't happen in the scenario Portage is in. This patch also runs includes
patches for the configure script itself, because the configuration was
generated by a seemingly patched Autoconf 2.69.
configure | 53 +++++++++++++++++++++++++++++++++++++++++++---------
configure.in | 37 ++++++++++++++++++++----------------
2 files changed, 65 insertions(+), 25 deletions(-)
diff --git a/configure b/configure
index 54eb7a7..b6d5e52 100755
--- a/configure
+++ b/configure
@@ -1218,6 +1218,7 @@ enable_textfile
enable_timer
enable_variant
enable_zipstream
+enable_wayland
enable_url
enable_protocol
enable_protocol_http
@@ -2190,6 +2191,7 @@ Optional Features:
--enable-timer use wxTimer class
--enable-variant use wxVariant class
--enable-zipstream use wxZip streams
+ --enable-wayland allow using Wayland EGL backend
--enable-url use wxURL class
--enable-protocol use wxProtocol class
--enable-protocol-http HTTP support in wxProtocol
@@ -8228,6 +8230,35 @@ fi
eval "$wx_cv_use_zipstream"
+ enablestring=
+ defaultval=$wxUSE_ALL_FEATURES
+ if test -z "$defaultval"; then
+ if test x"$enablestring" = xdisable; then
+ defaultval=yes
+ else
+ defaultval=no
+ fi
+ fi
+
+ # Check whether --enable-wayland was given.
+if test "${enable_wayland+set}" = set; then :
+ enableval=$enable_wayland;
+ if test "$enableval" = yes; then
+ wx_cv_use_wayland='wxUSE_WAYLAND=yes'
+ else
+ wx_cv_use_wayland='wxUSE_WAYLAND=no'
+ fi
+
+else
+
+ wx_cv_use_wayland='wxUSE_WAYLAND=${'DEFAULT_wxUSE_WAYLAND":-$defaultval}"
+
+fi
+
+
+ eval "$wx_cv_use_wayland"
+
+
enablestring=
defaultval=$wxUSE_ALL_FEATURES
@@ -29335,26 +29366,27 @@ done
TOOLKIT=GTK
GUIDIST=GTK_DIST
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
+ if test x"$wxUSE_WAYLAND" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GDK Wayland backend" >&5
$as_echo_n "checking for GDK Wayland backend... " >&6; }
if ${wx_cv_gdk_wayland+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <gdk/gdk.h>
+ #include <gdk/gdk.h>
int
main ()
{
- #ifndef GDK_WINDOWING_WAYLAND
- Not GDK Windowing Wayland
- #endif
+ #ifndef GDK_WINDOWING_WAYLAND
+ Not GDK Windowing Wayland
+ #endif
;
return 0;
@@ -29367,11 +29399,14 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS=$save_CFLAGS
+ CFLAGS=$save_CFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_gdk_wayland" >&5
$as_echo "$wx_cv_gdk_wayland" >&6; }
+ else
+ wx_cv_gdk_wayland=no
+ fi
if test "$wxUSE_GPE" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpewidget library" >&5
diff --git a/configure.in b/configure.in
index c76c528..430cdff 100644
--- a/configure.in
+++ b/configure.in
@@ -779,6 +779,7 @@ WX_ARG_FEATURE(textfile, [ --enable-textfile use wxTextFile class],
WX_ARG_FEATURE(timer, [ --enable-timer use wxTimer class], wxUSE_TIMER)
WX_ARG_FEATURE(variant, [ --enable-variant use wxVariant class], wxUSE_VARIANT)
WX_ARG_FEATURE(zipstream, [ --enable-zipstream use wxZip streams], wxUSE_ZIPSTREAM)
+WX_ARG_FEATURE(wayland, [ --enable-wayland allow using Wayland EGL backend], wxUSE_WAYLAND)
dnl URL-related classes
WX_ARG_FEATURE(url, [ --enable-url use wxURL class], wxUSE_URL)
@@ -3292,22 +3293,26 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
TOOLKIT=GTK
GUIDIST=GTK_DIST
- AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
- AC_TRY_COMPILE([
- #include <gdk/gdk.h>
- ],
- [
- #ifndef GDK_WINDOWING_WAYLAND
- Not GDK Windowing Wayland
- #endif
- ],
- wx_cv_gdk_wayland=yes,
- wx_cv_gdk_wayland=no
- )
- CFLAGS=$save_CFLAGS
- ])
+ if test x"$wxUSE_WAYLAND" = xyes; then
+ AC_CACHE_CHECK([for GDK Wayland backend], wx_cv_gdk_wayland, [
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
+ AC_TRY_COMPILE([
+ #include <gdk/gdk.h>
+ ],
+ [
+ #ifndef GDK_WINDOWING_WAYLAND
+ Not GDK Windowing Wayland
+ #endif
+ ],
+ wx_cv_gdk_wayland=yes,
+ wx_cv_gdk_wayland=no
+ )
+ CFLAGS=$save_CFLAGS
+ ])
+ else
+ wx_cv_gdk_wayland=no
+ fi
dnl test for external libxpm if we're configured to use it
if test "$wxUSE_GPE" = "yes"; then
--
2.39.0
|