mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 06:04:10 +00:00
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.
This commit is contained in:
parent
0ac8135b87
commit
3530354d5d
28
configure.ac
28
configure.ac
@ -325,9 +325,16 @@ AS_IF([test "x$enable_gles1" = "xyes"],
|
|||||||
NEED_EGL=yes
|
NEED_EGL=yes
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
AC_CHECK_HEADERS([$cogl_gl_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.
|
||||||
[AC_MSG_ERROR([Unable to locate required GLES headers])])
|
# 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.
|
# 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],
|
PKG_CHECK_EXISTS([glesv2],
|
||||||
[COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES glesv2"],
|
[COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES glesv2"],
|
||||||
[
|
[
|
||||||
AC_CHECK_HEADERS([$cogl_gl_headers],
|
# 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.
|
||||||
[AC_MSG_ERROR([Unable to locate required GLES headers])],
|
# GLenum).
|
||||||
[[#include <GLES2/gl2.h>
|
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"
|
COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lGLESv2"
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user