Some error handling for autogen.sh.

As per title, small mod for autogen.sh.