From 0eb365bca2dc3b7244b3c9adec65a17cd36123be Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 14 Jul 2009 11:44:24 +0200 Subject: fix for mingw to still look into LIB and INCLUDE env var --- tools/configure/configureapp.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index ccb2665..985c317 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1688,14 +1688,13 @@ bool Configure::findFile( const QString &fileName ) QString paths; if (file.endsWith(".h")) { - if (!mingwPath.isNull()) - paths = mingwPath + QLatin1String("/../include"); - else - paths = QString::fromLocal8Bit(getenv("INCLUDE")); - } else if ( file.endsWith( ".lib" ) ) { + if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + 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()) + return true; paths = QString::fromLocal8Bit(getenv("LIB")); - } else if (file.endsWith( ".a" ) && !mingwPath.isNull() ) { - paths = mingwPath + QLatin1String("/../lib"); } else { paths = pathEnvVar; } -- cgit v0.12