1 From 9c4764224aded552fb855b1c2b85b26d2b894adf Mon Sep 17 00:00:00 2001
2 From: Alexander Tsoy <alexander@tsoy.me>
3 Date: Tue, 29 Oct 2019 18:17:51 +0300
4 Subject: [PATCH] Fix building against libglvnd-provided EGL headers
6 Add missing EGL/eglmesaext.h include. When building against mesa-provided
7 headers, this header is included indirectly via EGL/eglext.h.
9 Also fix typo COGL_EGL_INCLUDE -> COGL_EGL_INCLUDES
11 configure.ac | 16 ++++++++++++++--
12 1 file changed, 14 insertions(+), 2 deletions(-)
14 diff --git a/configure.ac b/configure.ac
15 index da188edd..b0b0c94d 100644
18 @@ -670,10 +670,15 @@ AS_IF([test "x$enable_gles1" = "xyes"],
19 AC_SUBST([COGL_EGL_INCLUDES])
21 AC_CHECK_HEADERS([EGL/eglext.h],
22 - [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDE
23 + [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
24 #include <EGL/eglext.h>"],
27 + AC_CHECK_HEADERS([EGL/eglmesaext.h],
28 + [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES
29 +#include <EGL/eglmesaext.h>"],
31 + [$COGL_EGL_INCLUDES])
33 # Check for a GLES 1.x Common Profile library with/without EGL.
35 @@ -1178,6 +1183,12 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
37 [AC_MSG_ERROR([Unable to locate required EGL headers])],
38 [#include <EGL/egl.h>])
42 + [AC_MSG_ERROR([Unable to locate required EGL headers])],
43 + [#include <EGL/egl.h>
44 +#include <EGL/eglext.h>])
46 AC_CHECK_LIB(EGL, [eglInitialize],
47 [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"],
48 @@ -1188,7 +1199,8 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"],
51 COGL_EGL_INCLUDES="#include <EGL/egl.h>
52 -#include <EGL/eglext.h>"
53 +#include <EGL/eglext.h>
54 +#include <EGL/eglmesaext.h>"
55 AC_SUBST([COGL_EGL_INCLUDES])