On master (f05c1ac444e0c893516535bfdf07c5c8cd9bce16) during building with depends host packages are always considered by pkg-config regardless of ALLOW_HOST_PACKAGES environment variable. This causes issues like #18042.
This is an alternative to #18042 and #18045.
On master:
$ make HOST=x86_64-apple-darwin16 -C depends
$ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
...
checking for QT_DBUS... yes
...
checking whether to build GUI with support for D-Bus... yes
...
With this PR:
ALLOW_HOST_PACKAGESunset
$ make HOST=x86_64-apple-darwin16 -C depends
$ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
...
checking for QT_DBUS... no
...
checking whether to build GUI with support for D-Bus... no
...
ALLOW_HOST_PACKAGES=1
$ make HOST=x86_64-apple-darwin16 ALLOW_HOST_PACKAGES=1 -C depends
$ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
...
checking for QT_DBUS... yes
...
checking whether to build GUI with support for D-Bus... yes
...