When using [Autoconf](http://www.gnu.org/s/autoconf/) in a project managed with [Subversion](http://subversion.apache.org/), I would put this code in `configure.ac`:

```
AC_REVISION($Revision: 1234 $)

```

With `svn:keywords Revision`, [`AC_REVISION`](http://www.gnu.org/software/autoconf/manual/html_node/Notices.html) would insert the revision number of `configure.ac` into the generated `configure` script.

How can I do something similar in a project managed with [Git](http://git-scm.com/)?

Git doesn't have keywords like `$Revision$`, and doesn't have revision numbers as such. But it does have SHA1s for commits, and `git describe`. I'm just not sure how to incorporate that into `configure.ac`.