summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-07-18 15:37:21 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-19 15:28:18 +0200
commiteba0efe10ea90dec7a8b1e95017b0203b899af95 (patch)
tree40c4f61860e3650957bd3daa5c278609d933020a
parentaf8e318b35498543107e7251324ccdc0c4152483 (diff)
Enable CUPS auto detection on Windows
Detect CUPS availability automatically when cross-compiling from a Windows host. Change-Id: Ife9bb90732c39794a7b760ced4aaea232612fe54 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--tools/configure/configureapp.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 06ddefa61d..384079f6ec 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -238,6 +238,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "POSIX_IPC" ] = "no";
dictionary[ "QT_GLIB" ] = "no";
dictionary[ "QT_ICONV" ] = "auto";
+ dictionary[ "QT_CUPS" ] = "auto";
//Only used when cross compiling.
dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg";
@@ -2096,6 +2097,8 @@ bool Configure::checkAvailability(const QString &part)
available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib");
} else if (part == "ICONV") {
available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv");
+ } else if (part == "CUPS") {
+ available = (platform() != WINDOWS) && (platform() != WINDOWS_CE) && tryCompileProject("unix/cups");
}
return available;
@@ -2199,6 +2202,10 @@ void Configure::autoDetection()
if (dictionary["QT_ICONV"] == "auto")
dictionary["QT_ICONV"] = checkAvailability("ICONV") ? "yes" : "no";
+ // Detection of iconv support
+ if (dictionary["QT_CUPS"] == "auto")
+ dictionary["QT_CUPS"] = checkAvailability("CUPS") ? "yes" : "no";
+
// Mark all unknown "auto" to the default value..
for (QMap<QString,QString>::iterator i = dictionary.begin(); i != dictionary.end(); ++i) {
if (i.value() == "auto")
@@ -3304,6 +3311,7 @@ void Configure::displayConfig()
sout << "NIS support................." << dictionary[ "NIS" ] << endl;
sout << "Iconv support..............." << dictionary[ "QT_ICONV" ] << endl;
sout << "Glib support................" << dictionary[ "QT_GLIB" ] << endl;
+ sout << "CUPS support................" << dictionary[ "QT_CUPS" ] << endl;
if (dictionary.value(QStringLiteral("OPENGL_ES_2")) == QStringLiteral("yes")) {
const QString angleDir = dictionary.value(QStringLiteral("ANGLE_DIR"));
if (!angleDir.isEmpty())