Strip out the old build system.
Set up an automake-based build system.

Also refreshed the configure.ac file based on one generated with autoscan.
Replace the hand-written makefiles with automake.