build: Fix critical issue with pkgconfig files

Previously we only accounted for one packaged .pc file, and tested it
multiple times due to using the wrong variable. We now ensure that
every single .pc file within the package is tested for dependencies.