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.
This commit is contained in:
Robert Bragg 2011-04-18 17:17:21 +01:00
parent cd6d561f6f
commit 0f7fce7e2b

View File

@ -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])