Disable EGL (and thus EGLFS) if we're not using OpenGL ES
authorThiago Macieira <thiago.macieira@intel.com>
Sun, 25 Mar 2012 23:22:18 +0000 (20:22 -0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 27 Mar 2012 19:14:35 +0000 (21:14 +0200)
EGL support in src/platformsupport/eglconvenience requires OpenGL ES
to be enabled, so it makes no sense to test for the presence of EGL if
we're not enabling OpenGL ES.

EGLFS has similar requirements, so ensure it gets disabled
too. Otherwise we're going to get lots of undefined symbols in the
EGLFS plugin to things in QtPlatformSupport that did not get compiled
in either.

Change-Id: Ie55dd2e2597ec0594aa589ee8aac150c71104b46
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
configure

index b95f459..c437bb1 100755 (executable)
--- a/configure
+++ b/configure
@@ -4584,7 +4584,7 @@ else
 fi
 
 # EGL Support
-if [ "$CFG_EGL" != "no" ]; then
+if [ "$CFG_EGL" != "no" ] && [ "$CFG_OPENGL" != "desktop" ]; then
     if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
         QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
         QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
@@ -4602,6 +4602,13 @@ if [ "$CFG_EGL" != "no" ]; then
     else
         CFG_EGL=no
     fi
+elif [ "$CFG_OPENGL" = "desktop" ]; then
+    if [ "$CFG_EGL" = "yes" ]; then
+        echo "EGL support was requested but Qt is being configured for desktop OpenGL."
+        echo "Either disable EGL support or enable OpenGL ES support."
+        exit 101
+    fi
+    CFG_EGL=no
 fi
 
 if [ "$CFG_EGLFS" != "no" ]; then