[clutter] cogl/configure.ac: Adds --enable-stub-winsys option
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] cogl/configure.ac: Adds --enable-stub-winsys option
- Date: Thu, 5 May 2011 14:23:03 +0000 (UTC)
commit 723e5de4b6390067b2e5af764cefae45392345cd
Author: Robert Bragg <robert linux intel com>
Date: Mon Apr 18 17:17:21 2011 +0100
cogl/configure.ac: Adds --enable-stub-winsys option
We want to be able to split Cogl out as a standalone project but there
are still some window systems that aren't natively supported by Cogl.
This allows Clutter to support those window systems directly but still
work with a standalone Cogl library.
This also ensures we set the SUPPORT_STUB conditional in clutter's
configure.ac when building for win32/osx and wayland.
clutter/cogl/configure.ac | 33 ++++++++++++++++++++++++++++++++-
configure.ac | 3 +++
2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/clutter/cogl/configure.ac b/clutter/cogl/configure.ac
index 2ae792d..304d8b0 100644
--- a/clutter/cogl/configure.ac
+++ b/clutter/cogl/configure.ac
@@ -384,6 +384,22 @@ dnl ========================================================
dnl Check window system integration libraries...
dnl ========================================================
+dnl The "stub" winsys is a fallback option we use when Cogl doesn't
+dnl yet have support for a window system. It enables a toolkit like
+dnl Clutter to provide external support instead. Currently this is
+dnl not compatible with other window system backends.
+AC_ARG_ENABLE(
+ [stub-winsys],
+ [AC_HELP_STRING([--enable-stub-winsys=@<:@no/yes@:>@], [Enable support stub winsys @<:@default=no@:>@])],
+ [],
+ enable_stub_winsys=no
+)
+AS_IF([test "x$enable_stub_winsys" = "xyes"],
+ [
+ GL_WINSYS_APIS="$GL_WINSYS_APIS stub"
+ ALLOW_GLX=no
+ ])
+
AC_ARG_ENABLE(
[glx],
[AC_HELP_STRING([--enable-glx=@<:@no/yes@:>@], [Enable support GLX @<:@default=auto@:>@])],
@@ -392,6 +408,9 @@ AC_ARG_ENABLE(
)
AS_IF([test "x$enable_glx" = "xyes"],
[
+ AS_IF([test "x$enable_stub_winsys" = "xyes"],
+ [AC_MSG_ERROR([Stub winsys not currently compatible with others])])
+
AS_IF([test "x$ALLOW_GLX" != "xyes"],
[AC_MSG_ERROR([GLX not supported with $COGL_DRIVER driver])])
@@ -400,6 +419,8 @@ AS_IF([test "x$enable_glx" = "xyes"],
GL_WINSYS_APIS="$GL_WINSYS_APIS glx"
AC_DEFINE([COGL_HAS_GLX_SUPPORT], [1], [Cogl supports OpenGL using the GLX API])
+ AC_DEFINE([COGL_HAS_FULL_WINSYS], [1],
+ [Cogl can create its own OpenGL context])
# We might fall back to DRM for sync-to-vblank on GLX
PKG_CHECK_EXISTS([libdrm],
@@ -422,6 +443,9 @@ AC_ARG_ENABLE(
)
AS_IF([test "x$enable_null_egl_platform" = "xyes"],
[
+ AS_IF([test "x$enable_stub_winsys" = "xyes"],
+ [AC_MSG_ERROR([Stub winsys not currently compatible with others])])
+
EGL_PLATFORM_COUNT=$((EGL_PLATFORM_COUNT+1))
NEED_EGL=yes
EGL_PLATFORMS="$EGL_PLATFORMS null"
@@ -439,6 +463,9 @@ AC_ARG_ENABLE(
)
AS_IF([test "x$enable_gdl_egl_platform" == "xyes"],
[
+ AS_IF([test "x$enable_stub_winsys" = "xyes"],
+ [AC_MSG_ERROR([Stub winsys not currently compatible with others])])
+
EGL_PLATFORM_COUNT=$((EGL_PLATFORM_COUNT+1))
NEED_EGL=yes
EGL_PLATFORMS="$EGL_PLATFORMS gdl"
@@ -469,6 +496,9 @@ AC_ARG_ENABLE(
)
AS_IF([test "x$enable_xlib_egl_platform" = "xyes"],
[
+ AS_IF([test "x$enable_stub_winsys" = "xyes"],
+ [AC_MSG_ERROR([Stub winsys not currently compatible with others])])
+
EGL_PLATFORM_COUNT=$((EGL_PLATFORM_COUNT+1))
NEED_EGL=yes
NEED_XLIB=yes
@@ -504,6 +534,8 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
SUPPORT_EGL=yes
GL_WINSYS_APIS="$GL_WINSYS_APIS egl"
COGL_DEFINES_SYMBOLS="$COGL_DEFINES_SYMBOLS COGL_HAS_EGL_SUPPORT"
+ AC_DEFINE([COGL_HAS_FULL_WINSYS], [1],
+ [Cogl can create its own OpenGL context])
])
AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "xyes"])
@@ -531,7 +563,6 @@ AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "xyes"])
AM_CONDITIONAL(COGL_STANDALONE_BUILD, [true])
-AC_DEFINE([COGL_HAS_FULL_WINSYS], [1], [Cogl can create its own OpenGL context])
AM_CONDITIONAL(SUPPORT_OSX, [false])
AM_CONDITIONAL(SUPPORT_WIN32, [false])
diff --git a/configure.ac b/configure.ac
index e03a25c..23d5d04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,6 +513,9 @@ AM_CONDITIONAL(SUPPORT_OSX, [test "x$CLUTTER_WINSYS" = "xosx"])
AM_CONDITIONAL(SUPPORT_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"])
AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"])
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$CLUTTER_WINSYS" = "xwayland"])
+AM_CONDITIONAL(SUPPORT_STUB, [test "x$CLUTTER_WINSYS" = "xwin32" -o \
+ "x$CLUTTER_WINSYS" = "xosx" -o \
+ "x$CLUTTER_WINSYS" = "xwayland"])
dnl === COGL driver backend =====================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]