Add public CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT define
authorRobert Bragg <robert@linux.intel.com>
Tue, 6 Dec 2011 21:53:57 +0000 (21:53 +0000)
committerRobert Bragg <robert@linux.intel.com>
Thu, 8 Dec 2011 16:13:38 +0000 (16:13 +0000)
When clutter has been built with Wayland compositor support then we now
expose a public CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT define so that
applications can #ifdef code that depends on the api that this feature
implies.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
configure.ac

index 15637d6..977fe4d 100644 (file)
@@ -193,6 +193,7 @@ FLAVOUR_LIBS=""
 FLAVOUR_CFLAGS=""
 CLUTTER_BACKENDS=""
 CLUTTER_INPUT_BACKENDS=""
+CLUTTER_CONFIG_DEFINES=
 
 experimental_backend=no
 experimental_input_backend=no
@@ -335,6 +336,8 @@ AS_IF([test "x$enable_wayland_compositor" = "xyes"],
         PKG_CHECK_EXISTS([wayland-server],
                         [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-server"], [])
         SUPPORT_WAYLAND_COMPOSITOR=1
+       CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
+#define CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT 1"
         AC_DEFINE([HAVE_CLUTTER_WAYLAND_COMPOSITOR], [1], [Have wayland compositor support])
       ])
 AM_CONDITIONAL(SUPPORT_WAYLAND_COMPOSITOR, [test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"])
@@ -508,8 +511,6 @@ AC_CACHE_SAVE
 
 dnl === Clutter configuration =================================================
 
-CLUTTER_CONFIG_DEFINES=
-
 # windowing systems
 AS_IF([test "x$SUPPORT_X11" = "x1"],
       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES