Fix bug in configure where Qt did not compile with QT_ICONV=no
authorJan-Arve Saether <jan-arve.saether@nokia.com>
Tue, 21 Aug 2012 09:52:28 +0000 (11:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 23 Aug 2012 00:55:17 +0000 (02:55 +0200)
It did not compile because at the time qconfig.h was preprocessed,
QT_NO_ICONV was already defined, causing the #define QT_NO_ICONV to
fail. It should be guarded like most other defines in qconfig.h.
Also fix QT_CUPS=no, QT_ICONV=no, QT_GLIB=no, QT_NOTIFY=no and
QT_LARGEFILE_SUPPORT=64 the same way.

Change-Id: Ic9e0295756c35cb7c62e18eb9b63b1410e7de051
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
tools/configure/configureapp.cpp

index 2d80325..7fc1c62 100644 (file)
@@ -3139,26 +3139,16 @@ void Configure::generateConfigfiles()
         else
             qconfigList += "QT_NO_NIS";
 
-        if (dictionary["LARGE_FILE"] == "yes")
-            tmpStream << "#define QT_LARGEFILE_SUPPORT 64" << endl;
-
+        if (dictionary["LARGE_FILE"] == "yes")       qconfigList += "QT_LARGEFILE_SUPPORT=64";
+        if (dictionary["QT_CUPS"] == "no")           qconfigList += "QT_NO_CUPS";
+        if (dictionary["QT_ICONV"] == "no")          qconfigList += "QT_NO_ICONV";
+        if (dictionary["QT_GLIB"] == "no")           qconfigList += "QT_NO_GLIB";
+        if (dictionary["QT_INOTIFY"] == "no")        qconfigList += "QT_NO_INOTIFY";
 
         qconfigList.sort();
         for (int i = 0; i < qconfigList.count(); ++i)
             tmpStream << addDefine(qconfigList.at(i));
 
-        if (dictionary[ "QT_CUPS" ] == "no")
-          tmpStream<<"#define QT_NO_CUPS"<<endl;
-
-        if (dictionary[ "QT_ICONV" ]  == "no")
-          tmpStream<<"#define QT_NO_ICONV"<<endl;
-
-        if (dictionary[ "QT_GLIB" ] == "no")
-          tmpStream<<"#define QT_NO_GLIB"<<endl;
-
-        if (dictionary[ "QT_INOTIFY" ] == "no")
-          tmpStream<<"#define QT_NO_INOTIFY"<<endl;
-
         tmpStream<<"#define QT_QPA_DEFAULT_PLATFORM_NAME \"" << qpaPlatformName() << "\""<<endl;
 
         tmpStream.flush();