Rearrange initial config checks: AC, AM, compiler, libtool.
Removed some repeated and unused prog checks.