clutter: Add back support for non-wayland builds

Wayland support is only available on Linux, so keep it optional for
now.

https://bugzilla.gnome.org/show_bug.cgi?id=760439
This commit is contained in:
Florian Müllner 2016-04-28 22:50:17 +02:00
parent 28c9b6e1d7
commit 3856622ff7
2 changed files with 27 additions and 11 deletions

View File

@ -466,6 +466,7 @@ evdev_h_priv = \
$(NULL)
evdev_h = evdev/clutter-evdev.h
if SUPPORT_WAYLAND
backend_source_c_priv += $(evdev_c_priv)
backend_source_h_priv += $(evdev_h_priv)
backend_source_h += $(evdev_h)
@ -501,6 +502,7 @@ backend_source_h_priv += $(egl_source_h_priv)
clutteregl_includedir = $(clutter_includedir)/egl
clutteregl_include_HEADERS = $(egl_source_h)
endif # SUPPORT_WAYLAND
# cally
cally_sources_h = \

View File

@ -222,19 +222,33 @@ PKG_CHECK_EXISTS([pangoft2],
],
[])
AC_ARG_ENABLE(
[wayland-egl-server],
[AC_HELP_STRING([--enable-wayland-egl-server=@<:@no/yes@:>@], [Enable server side wayland support @<:@default=no@:>@])],
[],
enable_wayland_egl_server=yes
)
AS_IF([test "x$enable_wayland_egl_server" = "xyes"],
[
CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
SUPPORT_EGL=1
AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-egl wayland-server libdrm gbm"
SUPPORT_WAYLAND_COMPOSITOR=1
CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
CLUTTER_INPUT_BACKENDS="$CLUTTER_INPUT_BACKENDS evdev"
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE libudev >= $LIBUDEV_REQ_VERSION libinput >= $LIBINPUT_REQ_VERSION xkbcommon"
SUPPORT_EVDEV=1
BACKEND_PC_FILES_PRIVATE="$BACKEND_PC_FILES_PRIVATE libudev >= $LIBUDEV_REQ_VERSION libinput >= $LIBINPUT_REQ_VERSION xkbcommon"
AC_DEFINE([HAVE_EVDEV], [1], [Have evdev support for input handling])
])
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$enable_wayland_egl_server" = "xyes"])
dnl Instead of using AM_CFLAGS to ensure
dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter