diff --git a/configure.ac b/configure.ac index 7f554623d..8b09a539c 100644 --- a/configure.ac +++ b/configure.ac @@ -892,11 +892,24 @@ AC_ARG_ENABLE( AS_IF([test "x$enable_wayland_egl_server" = "xyes"], [ NEED_EGL=yes - COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-server" + + PKG_CHECK_EXISTS([wayland-server], + [ + COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-server" + ], + [AC_MSG_ERROR([Unable to locate required wayland-server library])]) + + WAYLAND_SERVER_VERSION=`$PKG_CONFIG --modversion gbm` + WAYLAND_SERVER_MAJOR=`echo $WAYLAND_SERVER_VERSION | cut -d'.' -f1` + WAYLAND_SERVER_MINOR=`echo $WAYLAND_SERVER_VERSION | cut -d'.' -f2` + WAYLAND_SERVER_MICRO=`echo $WAYLAND_SERVER_VERSION | cut -d'.' -f3` + COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT" ]) AM_CONDITIONAL(SUPPORT_WAYLAND_EGL_SERVER, [test "x$enable_wayland_egl_server" = "xyes"]) +AM_CONDITIONAL(WAYLAND_0_85_X_SERVER, + [test "x$WAYLAND_SERVER_MAJOR" = "x1" -a "x$WAYLAND_SERVER_MINOR" = "x85"]) dnl Android EGL platform AC_ARG_ENABLE( diff --git a/examples/Makefile.am b/examples/Makefile.am index 3d9f56122..504602c78 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -50,10 +50,13 @@ cogl_x11_tfp_LDADD = $(common_ldadd) endif if SUPPORT_WAYLAND_EGL_SERVER +# Note: Cogland currently only builds for Wayland 0.85 +if WAYLAND_0_85_X_SERVER programs += cogland cogland_SOURCES = cogland.c cogland_LDADD = $(common_ldadd) endif +endif if SUPPORT_SDL programs += cogl-sdl-hello