diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-06-10 14:00:05 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-06-10 14:00:05 +0100 |
commit | 0eb300e2eeeedd4cc701ac58af5484155601fc9c (patch) | |
tree | 058811778de29b319badafb0a35a7bee45eff478 | |
parent | 2fd47ce08e1017143f150ea26074bc138084683c (diff) | |
download | clutter-0eb300e2eeeedd4cc701ac58af5484155601fc9c.tar.gz |
build: Use the same pattern for the manual Mir check
Ensure that the checks are similar and create similar results.
-rw-r--r-- | configure.ac | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index cf34a4853..b6bd67883 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"], |