build: changed to only generate/install .pc file if pkg-config is found

This change improves the pkg-config support to only generate/install a .pc
file if pkg-config is found, assuming it is part of the build toolchain.

Note:

The minimal version set for pkg-config is 0.25, because this is the oldest
version I am able to test at the moment.