pkg.m4: Abort by default if no pkg-config

Ismael Luceno requested to merge ismael/pkg-config:master into master

Provide a second optional argument to PKG_PROG_PKG_CONFIG with an action to take if pkg-config isn't found, and default to aborting.

Too many configure scripts in the wild don't handle an empty PKG_CONFIG, resulting in weird error messages through the run, which often confuse users.

Authors wishing to fallback to other methods can either return to the old behavior by specifying [:] as an action, or use [PKG_CONFIG=false] and call pkg-config macros normally, handling the fallback as any other failure.

Users can override PKG_CONFIG in the command line so this implies no regressions.

Merge request reports