[cogl] egl: check or EGL/eglext.h



commit c9f1541de008cea64dd61f3bfd37451c47e55408
Author: Robert Bragg <robert linux intel com>
Date:   Tue May 24 21:33:22 2011 +0100

    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.

 cogl/cogl-defines.h.in |    7 +------
 configure.ac           |   24 +++++++++++++++++-------
 2 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/cogl/cogl-defines.h.in b/cogl/cogl-defines.h.in
index 5baa3b9..0822689 100644
--- a/cogl/cogl-defines.h.in
+++ b/cogl/cogl-defines.h.in
@@ -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
 
diff --git a/configure.ac b/configure.ac
index b2ada6c..4a201d2 100644
--- a/configure.ac
+++ b/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"],
       [



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]