Rewrote configure.ac according to my new l33t knowledge of autotools, and