summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure35
1 files changed, 25 insertions, 10 deletions
diff --git a/configure b/configure
index 9786d2e5e6..dbb47ff1b7 100755
--- a/configure
+++ b/configure
@@ -2484,7 +2484,7 @@ Additional options:
-no-opengl .......... Do not support OpenGL.
-opengl <api> ....... Enable OpenGL support
With no parameter, this will attempt to auto-detect
- OpenGL ES 2, or regular desktop OpenGL.
+ OpenGL ES 2.0 and higher, or regular desktop OpenGL.
Use es2 for <api> to override auto-detection.
* -no-system-proxies .. Do not use system network proxies by default.
@@ -4675,7 +4675,7 @@ fi
# X11/MINGW OpenGL
if [ "$XPLATFORM_MINGW" = "yes" ]; then
- # auto-detect OpenGL support (es2 = OpenGL ES 2.x)
+ # auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
if [ "$CFG_GUI" = "no" ]; then
if [ "$CFG_OPENGL" = "auto" ]; then
CFG_OPENGL=no
@@ -4689,7 +4689,7 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
CFG_OPENGL=desktop
- elif compileTest unix/opengles2 "OpenGL ES 2.x"; then
+ elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
if [ "$CFG_OPENGL" = "yes" ]; then
@@ -4715,8 +4715,8 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
;;
esac
elif [ "$CFG_OPENGL" = "es2" ]; then
- #OpenGL ES 2.x
- compileTest unix/opengles2 "OpenGL ES 2.x"
+ #OpenGL ES 2.0
+ compileTest unix/opengles2 "OpenGL ES 2.0"
if [ $? != "0" ]; then
echo "The OpenGL ES 2.0 functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
@@ -4758,11 +4758,11 @@ if [ "$XPLATFORM_MAC" = "yes" ]; then
fi
fi
-# auto-detect OpenGL support (es2 = OpenGL ES 2.x)
+# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest unix/opengldesktop "OpenGL"; then
CFG_OPENGL=desktop
- elif compileTest unix/opengles2 "OpenGL ES 2.x"; then
+ elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
if [ "$CFG_OPENGL" = "yes" ]; then
@@ -4775,7 +4775,7 @@ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
CFG_OPENGL=no
fi
elif [ "$CFG_OPENGL" = "es2" ]; then
- #OpenGL ES 2.x
+ #OpenGL ES 2.0
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then
QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'`
@@ -4786,7 +4786,7 @@ elif [ "$CFG_OPENGL" = "es2" ]; then
QMakeVar set QMAKE_LIBS_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBS_OPENGL_ES2"`"
fi
- compileTest unix/opengles2 "OpenGL ES 2.x" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
+ compileTest unix/opengles2 "OpenGL ES 2.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2
if [ $? != "0" ]; then
echo "The OpenGL ES 2.0 functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
@@ -4806,6 +4806,21 @@ elif [ "$CFG_OPENGL" = "desktop" ]; then
fi
fi
+# If OpenGL ES 2.0 is enabled, check for 3.0 and higher. This is used to allow
+# compile-time differentiation and including the version specific (but backwards
+# compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is
+# no difference in the configuration, even the library is the same.
+if [ "$CFG_OPENGL" = "es2" ]; then
+ if compileTest unix/opengles3 "OpenGL ES 3.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then
+ # Add a define for ES3, in addition to ES and ES2.
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3"
+ fi
+ if compileTest unix/opengles31 "OpenGL ES 3.1" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then
+ # Add a define for ES31.
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3_1"
+ fi
+fi
+
# auto-detect FontConfig support
if [ "$CFG_FONTCONFIG" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
@@ -6494,7 +6509,7 @@ report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading librarie
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.x"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then