[cogl/cogl-1.12] build: only build cogland with wayland-server 0.85



commit ab0085596739eec4d762cb7c7531d0510ee076bd
Author: Robert Bragg <robert linux intel com>
Date:   Fri Jan 4 17:21:22 2013 +0000

    build: only build cogland with wayland-server 0.85
    
    This ensures we only try to build cogland if we have wayland-server
    0.85.x since the api is incompatible with later versions.

 configure.ac         |   15 ++++++++++++++-
 examples/Makefile.am |    3 +++
 2 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 7f55462..8b09a53 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 3d9f561..504602c 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]