summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-11-16 10:48:32 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-11-16 10:50:23 (GMT)
commitb4790f30d62b00bd1a91ca9de78b3c5738de5fd1 (patch)
treea92ea01b6b226bacd68bb159bd24db07bb4f76f5 /tools/configure
parent01733c6c00b2fd2d5ee95b3d0837bc6c993162f3 (diff)
downloadQt-b4790f30d62b00bd1a91ca9de78b3c5738de5fd1.zip
Qt-b4790f30d62b00bd1a91ca9de78b3c5738de5fd1.tar.gz
Qt-b4790f30d62b00bd1a91ca9de78b3c5738de5fd1.tar.bz2
Make SSE/SSE2 and 3dnow autodetectable with mingw by configure.exe
Mingw-g++ 4.4 supports those SIMD instructions
Diffstat (limited to 'tools/configure')
-rw-r--r--tools/configure/configureapp.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 735e030..7e3182e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1853,8 +1853,16 @@ bool Configure::findFile( const QString &fileName )
QString paths;
if (file.endsWith(".h")) {
- if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull())
- return true;
+ if (!mingwPath.isNull()) {
+ if (!findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull())
+ return true;
+ //now let's try the additional compiler path
+ QDir mingwLibDir = mingwPath + QLatin1String("/../lib/gcc/mingw32");
+ foreach(const QFileInfo &version, mingwLibDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot)) {
+ if (!findFileInPaths(file, version.absoluteFilePath() + QLatin1String("/include")).isNull())
+ return true;
+ }
+ }
paths = QString::fromLocal8Bit(getenv("INCLUDE"));
} else if ( file.endsWith( ".lib" ) || file.endsWith( ".a" ) ) {
if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../lib")).isNull())
@@ -1991,11 +1999,11 @@ bool Configure::checkAvailability(const QString &part)
else if (part == "DIRECTSHOW")
available = (dictionary[ "ARCHITECTURE" ] == "windowsce");
else if (part == "SSE2")
- available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-g++");
+ available = (dictionary.value("QMAKESPEC") != "win32-msvc");
else if (part == "3DNOW" )
- available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h") && (dictionary.value("QMAKESPEC") != "win32-g++");
+ available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-icc") && findFile("mm3dnow.h");
else if (part == "MMX" || part == "SSE")
- available = (dictionary.value("QMAKESPEC") != "win32-msvc") && (dictionary.value("QMAKESPEC") != "win32-g++");
+ available = (dictionary.value("QMAKESPEC") != "win32-msvc");
else if (part == "OPENSSL")
available = findFile("openssl\\ssl.h");
else if (part == "DBUS")