committing a bunch of changes that make this compatible with modern ubuntu.
Made the build system a little better, but it still needs work.  Ideally, it would have a ./configure script...