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. Change-Id: I1c9558e550c48e8441ebdac34b82066473c2ce3a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
f0b922a3af
commit
01864d4854
24
configure
vendored
24
configure
vendored
@ -3681,12 +3681,23 @@ cat > "$QTCONFFILE" <<EOF
|
||||
Prefix=..
|
||||
EOF
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# write out device config before we run the test.
|
||||
#-------------------------------------------------------------------------------
|
||||
DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
|
||||
if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
|
||||
rm -f "$DEVICE_VARS_FILE"
|
||||
else
|
||||
mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
|
||||
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Detect pkg-config
|
||||
#-------------------------------------------------------------------------------
|
||||
if [ -z "$PKG_CONFIG" ]; then
|
||||
# See if PKG_CONFIG is set in the mkspec:
|
||||
PKG_CONFIG=`getXQMakeConf PKG_CONFIG`
|
||||
PKG_CONFIG="`"$outpath/bin/qmake" -E -nocache -spec "$XQMAKESPEC" /dev/null 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
|
||||
fi
|
||||
if [ -z "$PKG_CONFIG" ]; then
|
||||
PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
|
||||
@ -3748,17 +3759,6 @@ if [ -z "$PKG_CONFIG" ]; then
|
||||
QT_CONFIG="$QT_CONFIG no-pkg-config"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# write out device config before we run the test.
|
||||
#-------------------------------------------------------------------------------
|
||||
DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
|
||||
if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
|
||||
rm -f "$DEVICE_VARS_FILE"
|
||||
else
|
||||
mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
|
||||
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# tests that need qmake
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user