[Cogl] [PATCH 2/4] configure: Add a minimum required version for the wayland package
Neil Roberts
neil at linux.intel.com
Thu Mar 21 11:58:45 PDT 2013
Previously Cogl would accept any version of Wayland when building the
Wayland backend. Seeing as there is now a stable API we might as well
specify that we require at least version 1.0.0. This is now also
mentioned in the README. This patch also changes it to use
PKG_CHECK_MODULES instead of PKG_CHECK_EXISTS because it does need to
abort if it fails and it shouldn't be checking it silently.
---
README.in | 3 +++
configure.ac | 20 +++++++++-----------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/README.in b/README.in
index 4fbf8e3..935ab84 100644
--- a/README.in
+++ b/README.in
@@ -52,6 +52,9 @@ On X11, Cogl depends on the following extensions
• XExt
• XFixes ≥ @XFIXES_REQ_VERSION@
+For the Wayland backend, Cogl requires:
+ • Wayland ≥ @WAYLAND_REQ_VERSION@
+
When running with OpenGL, Cogl requires at least version 1.3
or 1.2 with the multitexturing extension. However to build Cogl
you will need the latest GL headers which can be obtained from:
diff --git a/configure.ac b/configure.ac
index ee49c94..e7bf1f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,7 @@ m4_define([xfixes_req_version], [3])
m4_define([xcomposite_req_version], [0.4])
m4_define([xrandr_req_version], [1.2])
m4_define([cairo_req_version], [1.10])
+m4_define([wayland_req_version], [1.0.0])
dnl These variables get copied into the generated README
AC_SUBST([GLIB_REQ_VERSION], [glib_req_version])
@@ -97,6 +98,7 @@ AC_SUBST([XFIXES_REQ_VERSION], [xfixes_req_version])
AC_SUBST([GTK_DOC_REQ_VERSION], [gtk_doc_req_version])
AC_SUBST([GI_REQ_VERSION], [gi_req_version])
AC_SUBST([UPROF_REQ_VERSION], [uprof_req_version])
+AC_SUBST([WAYLAND_REQ_VERSION], [wayland_req_version])
# Save this value here, since automake will set cflags later and we
# want to know if the user specified custom cflags or not.
@@ -939,12 +941,10 @@ AS_IF([test "x$enable_wayland_egl_platform" = "xyes"],
NEED_EGL=yes
EGL_PLATFORMS="$EGL_PLATFORMS wayland"
- PKG_CHECK_EXISTS([wayland-egl],
- [
- COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-egl"
- COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-client"
- ],
- [AC_MSG_ERROR([Unable to locate required wayland libraries])])
+ PKG_CHECK_MODULES(WAYLAND_CLIENT,
+ [wayland-egl >= wayland_req_version wayland-client >= wayland_req_version])
+ COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-egl >= wayland_req_version"
+ COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-client >= wayland_req_version"
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT"
])
@@ -995,11 +995,9 @@ AS_IF([test "x$enable_wayland_egl_server" = "xyes"],
[
NEED_EGL=yes
- PKG_CHECK_EXISTS([wayland-server],
- [
- COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-server"
- ],
- [AC_MSG_ERROR([Unable to locate required wayland-server library])])
+ PKG_CHECK_MODULES(WAYLAND_SERVER,
+ [wayland-server >= wayland_req_version])
+ COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES wayland-server >= wayland_req_version"
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT"
])
--
1.7.11.3.g3c3efa5
More information about the Cogl
mailing list