Updated configure to check for more dependencies

Now checks for emacs, bison, gperf, flex but only if the code is from
the github repo and not a tarball.

Fixes issue #1
Updaing configure files to automake 1.12+

.in files are deprecated, so are a couple of macros. Functionality
should be the same.