automate build from git

the return code should be checked, otherwise users will not see errors from the `configure` script