Fix autotools and update coding style