[cogl] egl: Make sure to have egl.h included when testing for eglext.h



commit f798e6e0c7f358b239818482fb5114ef7de24d97
Author: Damien Lespiau <damien lespiau intel com>
Date:   Fri Jul 22 17:13:44 2011 +0300

    egl: Make sure to have egl.h included when testing for eglext.h
    
    AC_CHECK_HEADER(S) for eglext.h need include egl.h as it may not be done
    for you.
    
    The patch tries to integrate with the previous work to check if
    GLES/egl.h ir EGL/egl.h should be included for egl.h.

 configure.ac |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a7d1ab8..abbe151 100644
--- a/configure.ac
+++ b/configure.ac
@@ -413,14 +413,16 @@ AS_IF([test "x$enable_gles1" = "xyes"],
                   [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])
 
+            AC_CHECK_HEADERS([EGL/eglext.h],
+                             [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
+#include <EGL/eglext.h>"],
+                             [],
+                             [$COGL_EGL_INCLUDES])
+
             # Check for a GLES 1.x Common Profile library with/without EGL.
             #
             # Note: historically GLES 1 libraries shipped with the
@@ -752,9 +754,14 @@ 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/eglext.h],
+              [EGL/egl.h],
               [],
               [AC_MSG_ERROR([Unable to locate required EGL headers])])
+            AC_CHECK_HEADERS(
+              [EGL/eglext.h],
+              [],
+              [AC_MSG_ERROR([Unable to locate required EGL headers])],
+              [#include <EGL/egl.h>])
 
             AC_CHECK_LIB(EGL, [eglInitialize],
               [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],



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