Properly use autotools
Merge pull request #1 from tuminoid/master

Fix autotools and build env