summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2012-09-14 08:03:18 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-19 07:04:10 (GMT)
commitd8f1f7a29c277c9a643fd048b87f530e37773676 (patch)
tree92a0374df94023b09b671a7cb4fee4a93ed21858 /configure
parent1861f0317d4058482667154131f8eb6488db407e (diff)
downloadQt-d8f1f7a29c277c9a643fd048b87f530e37773676.zip
Qt-d8f1f7a29c277c9a643fd048b87f530e37773676.tar.gz
Qt-d8f1f7a29c277c9a643fd048b87f530e37773676.tar.bz2
use qmake to get PKG_CONFIG in configure script
The value of PKG_CONFIG might depend on device options. For example, "-device-option PKG_CONFIG" might be used with configure or a mkspec might prefix PKG_CONFIG with CROSS_COMPILE which is specified as a device option. The shell functions of configure for parsing mkspecs do not take device options into account, but qmake is pretty good at it now. backport of qt5/qtbase 01864d4854557d2cf8b067e229d77cd7c9c553ee Change-Id: I1c9558e550c48e8441ebdac34b82066473c2ce3a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure b/configure
index 3488769..b6e2d11 100755
--- a/configure
+++ b/configure
@@ -5010,8 +5010,12 @@ else
fi
if [ -z "$PKG_CONFIG" ]; then
- # See if PKG_CONFIG is set in the mkspec:
- PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
+ # See if PKG_CONFIG is set in the mkspec or device options
+ (echo TEMPLATE = subdirs
+ echo 'message($$PKG_CONFIG)') > "$outpath/dummy.pro"
+ echo "QT_BUILD_TREE = $outpath" > "$outpath/.qmake.cache.pkgconfig"
+ PKG_CONFIG=`"$outpath/bin/qmake" -cache "$outpath/.qmake.cache.pkgconfig" -spec "$XQMAKESPEC" "$outpath/dummy.pro" -o /dev/null 2>&1 > /dev/null | sed -n -e 's,Project MESSAGE: \(.*\),\1,p'`
+ rm "$outpath/.qmake.cache.pkgconfig" "$outpath/dummy.pro"
fi
if [ -z "$PKG_CONFIG" ]; then
PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`