Merge pull request #1208 from pmienk/master

Reduce automake recursion; simplify pgm dependency