cleanup configure.ac

Rewrote the gcc checks to use AS/AC calls