From 638fc2e4c6751e6b98d18d14e149f172407205da Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 12 Oct 2011 15:49:24 +1000 Subject: 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 Reviewed-on: http://codereview.qt-project.org/6488 Reviewed-by: Rohan McGovern --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index c11ab76f2c..708d7404e9 100755 --- a/configure +++ b/configure @@ -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. -- cgit v1.2.3