Motivation
When NO_QT is not set, the depends build requires several host tools for building the Qt dependencies. If one of these tools (for example, pkg-config or bison) is missing, the build only reports the error after the Qt dependency download process has already begun.
This change performs an early check for the required host tools before downloading Qt dependencies, allowing the build to fail immediately with a clear error message instead of failing later in the build process.
This change follows the depends build instructions, which document additional host tool requirements when NO_QT is not set (see depends/README.md). The checks are implemented only for the operating systems where these requirements are explicitly documented: Linux (Ubuntu/Debian and Alpine) and FreeBSD. The documentation does not currently specify equivalent requirements for the remaining supported operating systems.
Testing
- Built
dependswith all required host tools installed. - Verified that removing
pkgconfcauses the new early check to fail with the expected error:
Error: bison host package is required to build Qt dependencies. Pass NO_QT=1 option to make if you wish to skip Qt.
make: *** [Makefile:258: check-host-tools] Error 1
- Verified that removing
bisoncauses the new early check to fail with the expected error:
Error: bison host package is required to build Qt dependencies. Pass NO_QT=1 option to make if you wish to skip Qt.
make: *** [Makefile:258: check-host-tools] Error 1
- Verified that
make NO_QT=1skips the host tool check.