mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
egl: check or EGL/eglext.h
While running configure we now check for EGL/eglext.h and if found we will substitute an inclusion in cogl-defines.h.
This commit is contained in:
parent
52aada8442
commit
c9f1541de0
@ -36,15 +36,10 @@ G_BEGIN_DECLS
|
||||
@COGL_DEFINES@
|
||||
|
||||
#ifdef COGL_HAS_EGL_SUPPORT
|
||||
#ifdef COGL_HAS_GLES1
|
||||
#include <GLES/gl.h>
|
||||
@COGL_GLES1_EGL_INCLUDE@
|
||||
#else
|
||||
#include <EGL/egl.h>
|
||||
@COGL_EGL_INCLUDES@
|
||||
#define NativeDisplayType EGLNativeDisplayType
|
||||
#define NativeWindowType EGLNativeWindowType
|
||||
#endif
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
24
configure.ac
24
configure.ac
@ -369,11 +369,17 @@ AS_IF([test "x$enable_gles1" = "xyes"],
|
||||
AC_CHECK_HEADERS([GLES/egl.h EGL/egl.h])
|
||||
|
||||
AS_IF([test "x$ac_cv_header_GLES_egl_h" = "xyes"],
|
||||
[COGL_GLES1_EGL_INCLUDE="#include <GLES/egl.h>"],
|
||||
[AS_IF([test "x$ac_cv_header_EGL_egl_h" = "xyes"],
|
||||
[COGL_GLES1_EGL_INCLUDE="#include <EGL/egl.h>"],
|
||||
[AC_MSG_ERROR([Unable to locate EGL header])])])
|
||||
AC_SUBST([COGL_GLES1_EGL_INCLUDE])
|
||||
[COGL_EGL_INCLUDES="#include <GLES/egl.h>"],
|
||||
[test "x$ac_cv_header_EGL_egl_h" = "xyes"],
|
||||
[
|
||||
COGL_EGL_INCLUDES="#include <EGL/egl.h>"
|
||||
AC_CHECK_HEADERS([EGL/eglext.h],
|
||||
[COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
|
||||
#include <EGL/eglext.h>"],
|
||||
[])
|
||||
],
|
||||
[AC_MSG_ERROR([Unable to locate EGL header])])
|
||||
AC_SUBST([COGL_EGL_INCLUDES])
|
||||
|
||||
# Check for a GLES 1.x Common Profile library with/without EGL.
|
||||
#
|
||||
@ -662,7 +668,7 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
|
||||
[COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES egl"],
|
||||
[
|
||||
AC_CHECK_HEADERS(
|
||||
[EGL/egl.h],
|
||||
[EGL/egl.h EGL/eglext.h],
|
||||
[],
|
||||
[AC_MSG_ERROR([Unable to locate required EGL headers])])
|
||||
|
||||
@ -673,7 +679,11 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
|
||||
COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"
|
||||
]
|
||||
)
|
||||
])
|
||||
|
||||
COGL_EGL_INCLUDES="#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>"
|
||||
AC_SUBST([COGL_EGL_INCLUDES])
|
||||
])
|
||||
|
||||
AS_IF([test "x$NEED_EGL" = "xyes"],
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user