Build system tweak: Do the package checks at configure time

This removes the '.PHONY' rule, so means that "make" in a built tree
won't repeat the check.

We also now check the .cabal files for the executables as well as the
libraries.