autotools build system

a simple autotools build system. The only option that is supported is --with-m4ri, but more could be easily added.