first pass at an autotools build, still broken in many ways.

not deleting the old buildsystem, yet.