From 1711bab7197eb0176e0c56fe3b8a50b6878ee1a3 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Wed, 7 Mar 2012 20:51:27 -0600 Subject: [PATCH] Add support for ICU on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed by QtWebKit now. Change-Id: I177d8dcf6063a14501f7ba3081b43a29a48661c7 Reviewed-by: Tor Arne Vestbø Reviewed-by: Oswald Buddenhagen Reviewed-by: Simon Hausmann Reviewed-by: Lars Knoll --- tools/configure/configureapp.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 92fdd35f3c..5a6a04aee0 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -264,6 +264,8 @@ Configure::Configure(int& argc, char** argv) dictionary[ "PCRE" ] = "auto"; + dictionary[ "ICU" ] = "auto"; + dictionary[ "GIF" ] = "auto"; dictionary[ "JPEG" ] = "auto"; dictionary[ "PNG" ] = "auto"; @@ -504,6 +506,12 @@ void Configure::parseCmdLine() dictionary[ "PCRE" ] = "system"; } + else if (configCmdLine.at(i) == "-icu") { + dictionary[ "ICU" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-icu") { + dictionary[ "ICU" ] = "no"; + } + // Image formats -------------------------------------------- else if (configCmdLine.at(i) == "-no-gif") dictionary[ "GIF" ] = "no"; @@ -1468,7 +1476,7 @@ bool Configure::displayHelp() "[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n" "[-no-script] [-script] [-no-scripttools] [-scripttools]\n" "[-no-webkit] [-webkit] [-webkit-debug]\n" - "[-no-directwrite] [-directwrite] [-qpa] [-no-widgets] \n\n", 0, 7); + "[-no-directwrite] [-directwrite] [-qpa] [-no-widgets] [-icu]\n\n", 0, 7); desc("Installation options:\n\n"); @@ -1565,6 +1573,9 @@ bool Configure::displayHelp() desc("PCRE", "qt", "-qt-pcre", "Use the PCRE library bundled with Qt."); desc("PCRE", "qt", "-system-pcre", "Use the PCRE library from the operating system.\nSee http://pcre.org/\n"); + desc("ICU", "yes", "-icu", "Use the ICU library."); + desc("ICU", "no", "-no-icu", "Do not use the ICU library.\nSee http://site.icu-project.org/\n"); + desc("GIF", "no", "-no-gif", "Do not compile GIF reading support."); desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support."); @@ -1811,6 +1822,9 @@ bool Configure::checkAvailability(const QString &part) else if (part == "PCRE") available = findFile("pcre.h"); + else if (part == "ICU") + available = findFile("unicode/utypes.h") && findFile("unicode/ucol.h") && findFile("unicode/ustring.h") && findFile("icuin.lib"); + else if (part == "LIBJPEG") available = findFile("jpeglib.h"); else if (part == "LIBPNG") @@ -1924,6 +1938,10 @@ void Configure::autoDetection() if (dictionary["PCRE"] == "auto") dictionary["PCRE"] = checkAvailability("PCRE") ? defaultTo("PCRE") : "qt"; + // ICU detection + if (dictionary["ICU"] == "auto") + dictionary["ICU"] = checkAvailability("ICU") ? "yes" : "no"; + // Image format detection if (dictionary["GIF"] == "auto") dictionary["GIF"] = defaultTo("GIF"); @@ -2118,6 +2136,10 @@ void Configure::generateOutputVars() if (dictionary[ "PCRE" ] == "qt") qmakeConfig += "pcre"; + // ICU --------------------------------------------------------- + if (dictionary[ "ICU" ] == "yes") + qtConfig += "icu"; + // Image formates ----------------------------------------------- if (dictionary[ "GIF" ] == "no") qtConfig += "no-gif"; @@ -3060,6 +3082,8 @@ void Configure::displayConfig() cout << " JPEG support............" << dictionary[ "JPEG" ] << endl; cout << " PNG support............." << dictionary[ "PNG" ] << endl; cout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl; + cout << " PCRE support............" << dictionary[ "PCRE" ] << endl; + cout << " ICU support............." << dictionary[ "ICU" ] << endl; cout << "Styles:" << endl; cout << " Windows................." << dictionary[ "STYLE_WINDOWS" ] << endl;