[cogl/wip/android: 3/12] build: Fix the GLES headers check
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/android: 3/12] build: Fix the GLES headers check
- Date: Mon, 16 May 2011 16:54:41 +0000 (UTC)
commit 6a0a61e0f9f5d946b2752721acc70fcdaa905f5b
Author: Damien Lespiau <damien lespiau intel com>
Date: Thu May 12 14:59:44 2011 +0100
build: Fix the GLES headers check
GLES/glext.h and GLES2/gl2ext.h need to include GLES/gl.h and
GLES2/gl2.h respectively to get the GL types.
This used to work as autoconf used to only do a preprocessor pass in
AC_CHECK_HEADER(S), but now it also tries to compile a small test
program and thus the test failed.
configure.ac | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8a8404c..d7d0d08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,9 +325,16 @@ AS_IF([test "x$enable_gles1" = "xyes"],
NEED_EGL=yes
],
[
- AC_CHECK_HEADERS([$cogl_gl_headers],
- [],
- [AC_MSG_ERROR([Unable to locate required GLES headers])])
+ # We have to check the two headers independently as GLES/glext.h
+ # needs to include GLES/gl.h to have the GL types defined (eg.
+ # GLenum).
+ AC_CHECK_HEADER([GLES/gl.h],
+ [],
+ [AC_MSG_ERROR([Unable to locate GLES/gl.h])])
+ AC_CHECK_HEADER([GLES/glext.h],
+ [],
+ [AC_MSG_ERROR([Unable to locate GLES/glext.h])],
+ [#include <GLES/gl.h>])
# Check for a GLES 1.x Common Profile library with/without EGL.
#
@@ -374,11 +381,16 @@ AS_IF([test "x$enable_gles2" = "xyes"],
PKG_CHECK_EXISTS([glesv2],
[COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES glesv2"],
[
- AC_CHECK_HEADERS([$cogl_gl_headers],
- [],
- [AC_MSG_ERROR([Unable to locate required GLES headers])],
- [[#include <GLES2/gl2.h>
- ]])
+ # We have to check the two headers independently as GLES2/gl2ext.h
+ # needs to include GLES2/gl2.h to have the GL types defined (eg.
+ # GLenum).
+ AC_CHECK_HEADER([GLES2/gl2.h],
+ [],
+ [AC_MSG_ERROR([Unable to locate GLES2/gl2.h])])
+ AC_CHECK_HEADER([GLES2/gl2ext.h],
+ [],
+ [AC_MSG_ERROR([Unable to locate GLES2/gl2ext.h])],
+ [#include <GLES2/gl2.h>])
COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lGLESv2"
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]