Modernise autotools and fix some platform specific stuff

Modernise autoconf
Modernise automake
Properly quote to avoid AC_LANG_SOURCE error
Change version.h to work on platforms which don't have echo -n