From 163bbeb2181bc66683bb836542dc1ea2bcded1fd Mon Sep 17 00:00:00 2001 From: Matt Hoosier Date: Thu, 17 Oct 2013 08:47:46 -0500 Subject: Detect pointer size at configure-time on Windows-hosted builds The configure-time procedure used on Windows does not currently perform the same tests to determine the width of a pointer as are performed on Unix-based builds. This causes QT_POINTER_SIZE to be undefined in the generated qconfig.h file. This in turn breaks compilation of various Qt modules such as QtDeclarative. This patch adds the same level of support for automatically determining the target platform's pointer size, as is currently offered to Unix users. Change-Id: I93838c1759b14089ba9f4daf442048fb5c8da738 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 757de7b3b0..c3382a5e0a 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2353,6 +2353,11 @@ void Configure::autoDetection() if (i.value() == "auto") i.value() = defaultTo(i.key()); } + + if (tryCompileProject("unix/ptrsize")) + dictionary["QT_POINTER_SIZE"] = "8"; + else + dictionary["QT_POINTER_SIZE"] = "4"; } bool Configure::verifyConfiguration() @@ -3411,6 +3416,8 @@ void Configure::generateConfigfiles() if (dictionary["REDUCE_RELOCATIONS"] == "yes") qconfigList += "QT_REDUCE_RELOCATIONS"; if (dictionary["QT_GETIFADDRS"] == "no") qconfigList += "QT_NO_GETIFADDRS"; + qconfigList += QString("QT_POINTER_SIZE=%1").arg(dictionary["QT_POINTER_SIZE"]); + qconfigList.sort(); for (int i = 0; i < qconfigList.count(); ++i) tmpStream << addDefine(qconfigList.at(i)); -- cgit v1.2.3