The problem is that the macOS SDK doesn’t ship pkgconfig files for the libraries included with macOS.
Unless you go the extra length, the “easy fix” is to compile your own version of those libraries which is fine until you need to be linked against a binary shipped with the OS (say you are trying to compile an Apache module).
At that point you will have conflicting symbol names between the binary that shipped with the OS and depends on its libraries and your binary that depends on the self-compiled libraries which might or might not have matching versions and/or custom patches.
Libedit, libxml2 and many others are samples of this. Their binaries are in-fact installed in read-only /usr as shipped by apple, but the matching include files live in the Developer folder of either the command line developer tools or Xcode.
No open source package will be able to link to the system libraries by default with this split and when all they support is pkgconfig, you’re SOL without additional manual work