summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <dangelog@gmail.com>2012-01-23 22:31:13 +0000
committerQt by Nokia <qt-info@nokia.com>2012-01-26 23:10:52 +0100
commitd6fccc69f39def255ec5d1ea36c37c49273c23b1 (patch)
tree3f17ce54a4177f3e33a081ce3092c5c271b90dcd /tools
parent3f91558d400be62be96fc3c6da36ad846ccddc9c (diff)
QRegularExpression: configure support for PCRE
Added PCRE config.tests, and logic and command line options (-qt-pcre and -system-pcre) for configure and configure.exe. Change-Id: I5da2658191198dbcf48c07d7c5de1be1b884a7a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 656323e365..d32b65107f 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -305,6 +305,8 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "ZLIB" ] = "auto";
+ dictionary[ "PCRE" ] = "auto";
+
dictionary[ "GIF" ] = "auto";
dictionary[ "TIFF" ] = "auto";
dictionary[ "JPEG" ] = "auto";
@@ -545,6 +547,12 @@ void Configure::parseCmdLine()
dictionary[ "ZLIB" ] = "system";
}
+ else if (configCmdLine.at(i) == "-qt-pcre") {
+ dictionary[ "PCRE" ] = "qt";
+ } else if (configCmdLine.at(i) == "-system-pcre") {
+ dictionary[ "PCRE" ] = "system";
+ }
+
// Image formats --------------------------------------------
else if (configCmdLine.at(i) == "-no-gif")
dictionary[ "GIF" ] = "no";
@@ -1522,8 +1530,8 @@ bool Configure::displayHelp()
"[-no-qmake] [-qmake] [-dont-process] [-process]\n"
"[-no-style-<style>] [-qt-style-<style>] [-redo]\n"
"[-saveconfig <config>] [-loadconfig <config>]\n"
- "[-qt-zlib] [-system-zlib] [-no-gif] [-no-libpng]\n"
- "[-qt-libpng] [-system-libpng] [-no-libtiff] [-qt-libtiff]\n"
+ "[-qt-zlib] [-system-zlib] [-qt-pcre] [-system-pcre] [-no-gif]\n"
+ "[-no-libpng] [-qt-libpng] [-system-libpng] [-no-libtiff] [-qt-libtiff]\n"
"[-system-libtiff] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg]\n"
"[-mmx] [-no-mmx] [-3dnow] [-no-3dnow] [-sse] [-no-sse] [-sse2] [-no-sse2]\n"
"[-no-iwmmxt] [-iwmmxt] [-openssl] [-openssl-linked]\n"
@@ -1643,6 +1651,9 @@ bool Configure::displayHelp()
desc("ZLIB", "qt", "-qt-zlib", "Use the zlib bundled with Qt.");
desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n");
+ 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("GIF", "no", "-no-gif", "Do not compile GIF reading support.");
desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support.");
@@ -1857,6 +1868,7 @@ QString Configure::defaultTo(const QString &option)
{
// We prefer using the system version of the 3rd party libs
if (option == "ZLIB"
+ || option == "PCRE"
|| option == "LIBJPEG"
|| option == "LIBPNG"
|| option == "LIBTIFF")
@@ -1913,6 +1925,9 @@ bool Configure::checkAvailability(const QString &part)
else if (part == "ZLIB")
available = findFile("zlib.h");
+ else if (part == "PCRE")
+ available = findFile("pcre.h");
+
else if (part == "LIBJPEG")
available = findFile("jpeglib.h");
else if (part == "LIBPNG")
@@ -2035,6 +2050,10 @@ void Configure::autoDetection()
if (dictionary["ZLIB"] == "auto")
dictionary["ZLIB"] = checkAvailability("ZLIB") ? defaultTo("ZLIB") : "qt";
+ // PCRE detection
+ if (dictionary["PCRE"] == "auto")
+ dictionary["PCRE"] = checkAvailability("PCRE") ? defaultTo("PCRE") : "qt";
+
// Image format detection
if (dictionary["GIF"] == "auto")
dictionary["GIF"] = defaultTo("GIF");
@@ -2251,6 +2270,10 @@ void Configure::generateOutputVars()
else if (dictionary[ "ZLIB" ] == "system")
qtConfig += "system-zlib";
+ // PCRE ---------------------------------------------------------
+ if (dictionary[ "PCRE" ] == "qt")
+ qmakeConfig += "pcre";
+
// Image formates -----------------------------------------------
if (dictionary[ "GIF" ] == "no")
qtConfig += "no-gif";