Use host system pkg-config when (cross-)compiling and convert to PKG_CHECK_MODULES

Fixes Bug 3575
1 file changed