summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-07-18 14:06:42 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-18 14:37:36 +0200
commitd524e326e462e89b69940424340a63435706afc0 (patch)
tree9e0fdd5d0db6dd33c74f834c29ebd3f1c4ce49bb /tools
parent96bf9b181cf06695dc439674be79a126997cb9eb (diff)
Auto detect iconv on Windows hosts
Enable auto detection for iconv when cross-compiling from Windows hosts. Change-Id: I699e0a31d938403f5e80e74be90df87f11f361ba Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index fc33922f5b..d1f5609e3d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -237,6 +237,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "FONT_CONFIG" ] = "no";
dictionary[ "POSIX_IPC" ] = "no";
dictionary[ "QT_GLIB" ] = "no";
+ dictionary[ "QT_ICONV" ] = "auto";
//Only used when cross compiling.
dictionary[ "QT_INSTALL_SETTINGS" ] = "/etc/xdg";
@@ -2093,6 +2094,8 @@ bool Configure::checkAvailability(const QString &part)
available = true;
} else if (part == "DIRECTWRITE") {
available = findFile("dwrite.h") && findFile("d2d1.h") && findFile("dwrite.lib");
+ } else if (part == "ICONV") {
+ available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv");
}
return available;
@@ -2192,6 +2195,10 @@ void Configure::autoDetection()
if (dictionary["INCREDIBUILD_XGE"] == "auto")
dictionary["INCREDIBUILD_XGE"] = checkAvailability("INCREDIBUILD_XGE") ? "yes" : "no";
+ // Detection of iconv support
+ if (dictionary["QT_ICONV"] == "auto")
+ dictionary["QT_ICONV"] = checkAvailability("ICONV") ? "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")