From eba0efe10ea90dec7a8b1e95017b0203b899af95 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Wed, 18 Jul 2012 15:37:21 +0200 Subject: [PATCH] Enable CUPS auto detection on Windows Detect CUPS availability automatically when cross-compiling from a Windows host. Change-Id: Ife9bb90732c39794a7b760ced4aaea232612fe54 Reviewed-by: Oswald Buddenhagen Reviewed-by: Sean Harmer --- tools/configure/configureapp.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) 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::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())