summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-02-01 16:12:11 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-02-02 09:48:28 (GMT)
commit186a9f967394d554ce99b8a3313cbc679b54c7c7 (patch)
tree68c19d4708bc099965a6978095f81a3fc1da74c0 /configure
parent216b29f0c976405c718c7bb8e24699d368baac7e (diff)
downloadQt-186a9f967394d554ce99b8a3313cbc679b54c7c7.zip
Qt-186a9f967394d554ce99b8a3313cbc679b54c7c7.tar.gz
Qt-186a9f967394d554ce99b8a3313cbc679b54c7c7.tar.bz2
Fixed es2 configure when both EGL/egl.h and GLES/egl.h are present.
Change e0c2861976e06658a1d651941310407c15b0bcde fixed es1 configure by only picking EGL/egl.h if GLES/egl.h is not found. This broke es2 configure on platforms where both EGL/egl.h and GLES/egl.h are present, by picking GLES/egl.h instead of EGL/egl.h, which implicitly pulled in the GLES/gl.h header as well, causing inconsistent declarations due to both GLES2/gl2.h and GLES/gl.h getting included. Instead, we need to prioritize depending on whether we're using es1 or es2. For es1, we prefer GLES/egl.h, and for es2, we prefer EGL/egl.h. If only one of the headers is found we still use it unconditionally, to preserve the existing behaviour and minimize the risk of breaking other platforms. Reviewed-by: Ritt Konstantin Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 16 insertions, 7 deletions
diff --git a/configure b/configure
index dfbf9bd..5e8ef17 100755
--- a/configure
+++ b/configure
@@ -6056,19 +6056,28 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
fi # QWS
+EGL_VARIANT=none
# EGL Support
if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then
if [ "$CFG_EGL" != "no" ]; then
# detect EGL support
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
- # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
- CFG_EGL=yes
- CFG_EGL_GLES_INCLUDES=yes
- elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
# EGL specified by QMAKE_*_EGL, included with <EGL/egl.h>
+ EGL_VARIANT=regular
CFG_EGL=yes
- CFG_EGL_GLES_INCLUDES=no
- else
+ fi
+
+ # Prefer this variant for ES1
+ if [ "$CFG_OPENGL" = "es1" -o "$EGL_VARIANT" = "none" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h>
+ EGL_VARIANT=gles
+ CFG_EGL=yes
+ CFG_EGL_GLES_INCLUDES=yes
+ fi
+ fi
+
+ if [ "$EGL_VARIANT" = "none" ]; then
if [ "$CFG_EGL" = "yes" ]; then
echo "The EGL functionality test failed!"
echo " EGL is required for OpenGL ES to manage contexts & surfaces."