From 5f6af9de48eba5e505dfe67d4ec36cfefdf23da6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 13 Jun 2014 15:12:28 -0700 Subject: Add the -qreal option to the Qt ABI information If -qreal float is passed, fullCpuArchitecture() will now include "-qreal_float". If something else other than "float" is passed to -qreal, we'll try to encode it (e.g., -qreal "fixed"). Change-Id: Ie33fd1a643f4376e6f01a7966e01c7c34e6fcffd Reviewed-by: Oswald Buddenhagen --- configure | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 9bb09bc36d..a6bd6c1bcb 100755 --- a/configure +++ b/configure @@ -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" @@ -6002,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 -- cgit v1.2.3