[clutter] build: Use the same pattern for the manual Mir check



commit 0eb300e2eeeedd4cc701ac58af5484155601fc9c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Jun 10 14:00:05 2015 +0100

    build: Use the same pattern for the manual Mir check
    
    Ensure that the checks are similar and create similar results.

 configure.ac |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cf34a48..b6bd678 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,12 +486,11 @@ AS_IF([test "x$enable_mir" = "xyes"],
         SUPPORT_MIR=1
         SUPPORT_COGL=1
 
-        have_cogl_mir=no
-        SAVED_CFLAGS="${CFLAGS}"
+        # We need to manually check for Mir support in Cogl because
+        # the windowing systems are not exposed in the pkg-config file
+        saved_CFLAGS="${CFLAGS}"
         CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
 
-        # Manually check whether cogl has Mir support, as we can't rely on
-        # versioning yet.
         AC_MSG_CHECKING([for Mir Cogl backend])
         AC_TRY_COMPILE([#include <cogl/cogl.h>],
                        [
@@ -500,15 +499,17 @@ AS_IF([test "x$enable_mir" = "xyes"],
                         #endif
                         int main (void) { return 0; }
                        ],
-                       AC_MSG_RESULT(yes)
-                       have_cogl_mir=yes,
-                       AC_MSG_RESULT(no)
-                       have_cogl_mir=no)
-
-        CFLAGS="${SAVED_CFLAGS}"
+                       [
+                         AC_MSG_RESULT(yes)
+                         have_cogl_mir=yes
+                       ],
+                       [
+                         AC_MSG_RESULT(no)
+                         have_cogl_mir=no
+                       ])
 
-        AS_IF([test "x$have_cogl_mir" = "xno"],
-              [AC_MSG_ERROR([COGL_HAS_EGL_PLATFORM_MIR_SUPPORT not defined but the Mir backend has been 
explicitly enabled])])
+        CFLAGS="${saved_CFLAGS}"
+        AS_IF([test "x$have_cogl_mir" = xno], [AC_MSG_ERROR("*** Cogl is missing Mir support.")])
 
         PKG_CHECK_EXISTS([mirclient],
                          [BACKEND_PC_FILES="$BACKEND_PC_FILES mirclient"],


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