From 882f344964aae5ac4c03f18209ea6256be5ee0ed Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Thu, 28 Jul 2016 12:12:46 +0100 Subject: 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 Reviewed-by: Liang Qi Reviewed-by: Mike Krus --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b30e85bd99..0b8b417bbc 100755 --- a/configure +++ b/configure @@ -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() -- cgit v1.2.3