Pass no-pkg-config to qmake from config.test if appropriate

On macOS, even if pkg-config is present in the path, configure will by
default correctly ignore it and set no-pkg-config. However, this was not
propagated to qmake when invoked from config.test, so tests which rely on
that did not work.

This was leading to pkg-config (installed from homebrew) to be used in
the libpng test, so it succeeded. But the later Qt build would fail to
find png.h from homebrew, as it correctly ignores pkg-config.

Task-number: QTBUG-55011
Change-Id: Ic6fb866bea0551f528da56cb545174dcd9bacf0d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
This commit is contained in:
Mike Krus 2016-07-28 12:12:46 +01:00 committed by Oswald Buddenhagen
parent 1f7f73b86a
commit 882f344964

6
configure vendored
View File

@ -4293,8 +4293,12 @@ compileTest()
if [ "$CFG_SHARED" = "no" ]; then
test_config="$QMAKE_CONFIG static"
fi
TEST_CONFIG_FLAGS=
if [ -z "$PKG_CONFIG" ]; then
TEST_CONFIG_FLAGS="QT_CONFIG+=no-pkg-config"
fi
echo $ECHO_N "checking for $name... $ECHO_C"
"$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $D_FLAGS $L_FLAGS "$@"
"$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $D_FLAGS $L_FLAGS $TEST_CONFIG_FLAGS "$@"
}
compileTestWithPkgConfig()