diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-10-15 15:40:26 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-11-02 17:00:50 +0000 |
commit | 8c2ca33073f20e1fe552bd8b5f663aec5b8a634d (patch) | |
tree | a8277e71b865e3e08908a4937668e163c35a03e6 /configure | |
parent | 84042523f272c1d30247e9329eea21036ff793f4 (diff) |
Replace qdtoa and qstrtod implementation by a 3rdparty library
This also fixes the underlying cause of QTBUG-44039 and QTBUG-43885.
You can choose between system, qt, and no libdouble-conversion
support. If you choose "no", snprintf_l and sscanf_l will be
used.
By default, system double conversion is used if the system provides a
double-conversion library. Otherwise the bundled libdouble-conversion
is built. sscanf_l and snprintf_l are not used by default as the
planned "shortest" conversion mode to produce the shortest possible
string will give less precise results when implemented with snprintf_l.
Change-Id: I8ca08a0fca5c54cf7009e48e771385614f6aa031
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -647,6 +647,7 @@ CFG_OPENVG_SHIVA=auto CFG_OPENVG_ON_OPENGL=auto CFG_EGL=auto CFG_EGL_X=auto +CFG_DOUBLECONVERSION=auto CFG_FONTCONFIG=auto CFG_FREETYPE=auto CFG_HARFBUZZ=qt @@ -1764,6 +1765,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + doubleconversion) + if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then + CFG_DOUBLECONVERSION="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; fontconfig) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_FONTCONFIG="$VAL" @@ -2535,6 +2543,11 @@ Third Party Libraries: + -system-libjpeg ..... Use libjpeg from the operating system. See http://www.ijg.org + -no-doubleconversion ..... Use sscanf_l and snprintf_l for (imprecise) double conversion. + -qt-doubleconversion ..... Use the libdouble-conversion bundled with Qt. + + -system-doubleconversion . Use the libdouble-conversion provided by the system. + See https://github.com/google/double-conversion + -no-freetype ........ Do not compile in Freetype2 support. -qt-freetype ........ Use the libfreetype bundled with Qt. + -system-freetype..... Use the libfreetype provided by the system (enabled if -fontconfig is active). @@ -5931,6 +5944,24 @@ if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM fi fi +# double-conversion support +if [ "$CFG_DOUBLECONVERSION" = "no" ]; then + if ! compileTest common/xlocalescanprint "XLocaleScanPrint"; then + echo "Your C library does not provide sscanf_l or snprintf_l." + echo "You need to use libdouble-conversion for double/string conversion." + exit 1 + fi +elif [ "$CFG_DOUBLECONVERSION" != "qt" ]; then + if compileTest unix/doubleconversion "DoubleConversion"; then + CFG_DOUBLECONVERSION=system + elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then + echo "No system libdouble-conversion found." + exit 1 + else + CFG_DOUBLECONVERSION=qt + fi +fi + # freetype support [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_FREETYPE" = "auto" ] && CFG_FREETYPE=no if [ "$CFG_FREETYPE" = "auto" ]; then @@ -6430,6 +6461,13 @@ if [ "$CFG_GIF" = "no" ]; then elif [ "$CFG_GIF" = "yes" ]; then QT_CONFIG="$QT_CONFIG gif" fi +if [ "$CFG_DOUBLECONVERSION" = "no" ]; then + QT_CONFIG="$QT_CONFIG no-doubleconversion" +elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then + QT_CONFIG="$QT_CONFIG system-doubleconversion" +else + QT_CONFIG="$QT_CONFIG doubleconversion" +fi if [ "$CFG_FREETYPE" = "no" ]; then QT_CONFIG="$QT_CONFIG no-freetype" QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE" @@ -7345,6 +7383,7 @@ report_support " ALSA ..................." "$CFG_ALSA" report_support " CUPS ..................." "$CFG_CUPS" [ "$XPLATFORM_MINGW" = "yes" ] && \ report_support " DirectWrite ............" "$CFG_DIRECTWRITE" +report_support " DoubleConversion........" "$CFG_DOUBLECONVERSION" no "libc" system "system library" qt "bundled copy" report_support " Evdev .................." "$CFG_EVDEV" report_support " FontConfig ............." "$CFG_FONTCONFIG" report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy" |