Autotools magic!

http://www.youtube.com/watch?v=NFQCYpIHLNQ