diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 56 |
1 files changed, 45 insertions, 11 deletions
@@ -1149,6 +1149,23 @@ while [ "$#" -gt 0 ]; do ;; qreal) CFG_QREAL="$VAL" + if [ "$CFG_QREAL" = "float" ]; then + CFG_QREAL_STRING="\"float\"" + elif [ "$CFG_QREAL" != "double" ]; then + if [ -z "$PERL" ]; then + echo "configure needs perl in \$PATH if the -qreal option is used with" >&2 + echo "a value different from \"float\"" >&2 + exit 1 + fi + CFG_QREAL_STRING=`perl -e '$_ = $ARGV[0]; + s/ +/ /g; s/^ +//; s/ +$//; + while (/(.)/g) { + $c = $1; + if ($c =~ /[a-zA-Z0-9]/) { $result .= $c; } + else { $result .= "_" . unpack("H*", $c); } + } + print "\"$result\"";' "$CFG_QREAL"` + fi ;; sysroot) CFG_SYSROOT="$VAL" @@ -1329,6 +1346,7 @@ while [ "$#" -gt 0 ]; do XPLATFORM_MINGW=yes CFG_RPATH=no CFG_REDUCE_EXPORTS=no + CFG_ICU=no ;; esac ;; @@ -2504,7 +2522,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. @@ -4700,7 +4718,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 @@ -4714,7 +4732,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 @@ -4740,8 +4758,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" @@ -4783,11 +4801,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 @@ -4800,7 +4818,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'` @@ -4811,7 +4829,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" @@ -4831,6 +4849,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 @@ -5986,6 +6019,7 @@ fi if [ "$CFG_QREAL" != double ]; then echo "#define QT_COORD_TYPE $CFG_QREAL" >>"$outpath/src/corelib/global/qconfig.h.new" + echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING" >>"$outpath/src/corelib/global/qconfig.h.new" fi if [ "$CFG_FRAMEWORK" = "yes" ]; then @@ -6019,7 +6053,7 @@ for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \ eval "VAL=\$CFG_$SUBARCH" case "$VAL" in yes) - echo "#define QT_COMPILER_SUPPORTS_$SUBARCH" \ + echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \ >>"$outpath/src/corelib/global/qconfig.h.new" ;; esac @@ -6508,7 +6542,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 |