From bc7e63e3f9452ebc6d42a9cb75a8b1066193ebbd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 12 Jun 2013 15:21:04 -0700 Subject: Don't enable EGL support if OpenGL is disabled. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QtPlatformSupport fails to build if EGL support is enabled but OpenGL isn't. It tries to compile eglconvenience, but qplatformopenglcontext.h is empty (#ifndef QT_NO_OPENGL). It makes no sense to have EGL with no OpenGL ES, so make sure we don't try it. The current test to disable EGL if OpenGL desktop is active is upside down. With -opengl desktop -no-egl, it would complain that EGL support was requested. Task-number: QTBUG-28763 Change-Id: I80c780ec78181f3fa85f43e41be21d1217d76610 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Oswald Buddenhagen --- configure | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/configure b/configure index dacf3826b3..938b23b000 100755 --- a/configure +++ b/configure @@ -5381,7 +5381,18 @@ elif [ "$CFG_XKBCOMMON" = "no" ]; then fi # EGL Support -if [ "$CFG_EGL" != "no" ]; then +if [ "$CFG_OPENGL" != "es2" ]; then + if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "desktop" ]; 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 + elif [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then + echo "EGL support was requested but OpenGL ES support is disabled." + echo "Either disable EGL support or enable OpenGL ES support." + exit 101 + fi + CFG_EGL=no +elif [ "$CFG_EGL" != "no" ]; 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` @@ -5399,13 +5410,6 @@ 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 -- cgit v1.2.3