Do not unconditionally use pkg-config in .pro files

Using the first pkg-config in PATH is prone to errors when
cross compiling.  This is a known issue, and `configure' already
avoids using pkg-config for cross compiling (unless -force-pkg-config is
used).  However, there was previously no way for a .pro file to test
whether or not the user had passed -force-pkg-config.

Let !contains(QT_CONFIG, no-pkg-config) be used to test whether or not it
is safe to run pkg-config.

(cherry picked from commit 53794d94994cb3149581b1a91762dfa2d6defac0)

Change-Id: I53794d94994cb3149581b1a91762dfa2d6defac0
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-on: http://codereview.qt-project.org/6488
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Rohan McGovern 2011-10-12 15:49:24 +10:00 committed by Qt by Nokia
parent 8ad18813fb
commit 638fc2e4c6

4
configure vendored
View File

@ -3298,6 +3298,10 @@ if [ "$QT_CROSS_COMPILE" = "yes" ]; then
fi
fi
if [ ! -n "$PKG_CONFIG" ]; then
QT_CONFIG="$QT_CONFIG no-pkg-config"
fi
# process CFG_MAC_ARCHS
if [ "$PLATFORM_MAC" = "yes" ]; then
# check -arch arguments for validity.