Some versions of macOS images lack the pkg-config package.
For example, https://github.com/bitcoin/bitcoin/actions/runs/6248032071/job/16961797066:
Runner Image
Image: macos-13
Version: 20230417.1
+ ./autogen.sh
configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh
This PR makes Homebrew install the pkg-config package explicitly.
Also please refer to macOS Build Guide.