summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-01 12:34:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-31 22:01:40 +0100
commitd8bf317546bcfab0b6b50375218429fa9d470705 (patch)
tree91bfee6bbf56d25002d819c46e5778e49d3c4679 /configure
parente696bef863ba4cc21a36cbfdc0d6e811060916f7 (diff)
make qreal double by default on all platforms
On modern ARM CPUs there is no speed difference between float and double anymore, so let's rather use double for qreal to avoid rounding and precision issues. Like this we also get much better compatibility with our desktop OSes. This is not binary compatible on ARM, but the old behavior can be restored by passing -qreal float to configure. Change-Id: I2a4b61e19a3dfa6b0bd76734cecf2634c97207fc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure b/configure
index b5e375baed..4adaa77403 100755
--- a/configure
+++ b/configure
@@ -1006,6 +1006,7 @@ QPA_PLATFORM_GUARD=yes
CFG_CXX11=auto
CFG_DIRECTWRITE=no
CFG_WERROR=auto
+CFG_QREAL=double
OPT_MAC_SDK=
# initalize variables used for installation
@@ -1168,6 +1169,7 @@ while [ "$#" -gt 0 ]; do
-mysql_config| \
-qpa| \
-qconfig| \
+ -qreal| \
-android-sdk| \
-android-ndk| \
-android-ndk-platform| \
@@ -1419,6 +1421,9 @@ while [ "$#" -gt 0 ]; do
qconfig)
CFG_QCONFIG="$VAL"
;;
+ qreal)
+ CFG_QREAL="$VAL"
+ ;;
sysroot)
CFG_SYSROOT="$VAL"
;;
@@ -3699,6 +3704,9 @@ Additional options:
-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
default ($CFG_QCONFIG).
+ -qreal [double|float] typedef qreal to the specified type. The default is double.
+ Note that changing this flag affects binary compatibility.
+
-no-opengl .......... Do not support OpenGL.
-opengl <api> ....... Enable OpenGL support
With no parameter, this will attempt to auto-detect
@@ -6356,6 +6364,10 @@ if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
+if [ "$CFG_QREAL" != double ]; then
+ echo "#define QT_COORD_TYPE $CFG_QREAL" >>"$outpath/src/corelib/global/qconfig.h.new"
+fi
+
if [ "$CFG_FRAMEWORK" = "yes" ]; then
echo "#define QT_MAC_FRAMEWORK_BUILD" >>"$outpath/src/corelib/global/qconfig.h.new"
fi
@@ -6960,6 +6972,10 @@ if [ "$ORIG_CFG_XKBCOMMON" != qt ] && [ "$CFG_XKBCOMMON" = qt ]; then
echo "NOTE: libxkbcommon 0.2.0 (or higher) not found on the system, will use "
echo "the bundled version from 3rd party directory."
fi
+if [ "$CFG_QREAL" = double ] && [ "$CFG_ARCH" = arm ]; then
+ echo "NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1."
+ echo "Configure with '-qreal float' to create a build that is binary compatible with 5.1."
+fi
exec 1>&3 3>&- # restore stdout
cat $outpath/config.summary # display config feedback to user