From f798e6e0c7f358b239818482fb5114ef7de24d97 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 22 Jul 2011 17:13:44 +0300 Subject: [PATCH] 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 file changed, 12 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index a7d1ab8a9..abbe151c3 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 " - AC_CHECK_HEADERS([EGL/eglext.h], - [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE -#include "], - []) ], [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 "], + [], + [$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 ]) AC_CHECK_LIB(EGL, [eglInitialize], [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],