update build system to autotools (finally)