Reintroduce pkg-config with optional Makefile.config flag.
Merge pull request #1283 from jeffdonahue/optional-pkg-config

Reintroduce pkg-config with optional Makefile.config flag.
Merge remote-tracking branch 'upstream/dev' into dev
fix labeling loss classes