Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
configure | 17 ++
meson.build | 25 +++
meson_options.txt | 2 +
qapi/ui.json | 19 ++-
ui/meson.build | 52 ++++++
ui/wayland.c | 402 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 516 insertions(+), 1 deletion(-)
create mode 100644 ui/wayland.c
diff --git a/configure b/configure
index 8dcb9965b2..f6caaa6329 100755
--- a/configure
+++ b/configure
@@ -403,6 +403,7 @@ cfi_debug="false"
seccomp="auto"
glusterfs="auto"
gtk="auto"
+wayland="auto"
tls_priority="NORMAL"
gnutls="$default_feature"
nettle="$default_feature"
@@ -1372,6 +1373,10 @@ for opt do
;;
--enable-gtk) gtk="enabled"
;;
+ --disable-wayland) wayland="disabled"
+ ;;
+ --enable-wayland) wayland="enabled"
+ ;;
--tls-priority=*) tls_priority="$optarg"
;;
--disable-gnutls) gnutls="no"
@@ -1845,6 +1850,7 @@ disabled with --disable-FEATURE, default is enabled if
available
sdl SDL UI
sdl-image SDL Image support for icons
gtk gtk UI
+ wayland Wayland UI
vte vte support for the gtk UI
curses curses UI
iconv font glyph conversion support
@@ -3616,6 +3622,11 @@ if $pkg_config gbm; then
gbm="yes"
fi
+if $pkg_config wayland-client; then
+ wayland_cflags="$($pkg_config --cflags wayland-client)"
+ wayland_libs="$($pkg_config --libs wayland-client)"
+fi
+
if test "$opengl" != "no" ; then
epoxy=no
if $pkg_config epoxy; then
@@ -5870,6 +5881,11 @@ if test "$gbm" = "yes" ; then
echo "GBM_CFLAGS=$gbm_cflags" >> $config_host_mak
fi
+if test "$wayland" = "enabled" ; then
+ echo "CONFIG_WAYLAND=y" >> $config_host_mak
+ echo "WAYLAND_LIBS=$wayland_libs" >> $config_host_mak
+ echo "WAYLAND_CFLAGS=$wayland_cflags" >> $config_host_mak
+fi