Migrate from Makefile to GNU autotools