Switch over to automake build tool.

This is an first step migrating to autobuild system.