+AM_INIT_AUTOMAKE([dist-bzip2])
+
+# variables for version.h
+AC_DEFINE([HAVE_VERSION_H], 1, [Set if version.h is generated])
+
+# are we running under Hudson? (defines BUILD_ID, BUILD_NUMBER in the environment)
+if test "x$BUILD_ID" != "x" ; then
+ AC_SUBST([HUDSON_BUILD_ID], $BUILD_ID)
+ AC_SUBST([HUDSON_BUILD_NUMBER], $BUILD_NUMBER)
+else
+ AC_SUBST([HUDSON_BUILD_ID], [none])
+ AC_SUBST([HUDSON_BUILD_NUMBER], 0)
+fi
+
+AC_CHECK_PROG([HAVE_GIT], git, 1)
+if test "x$HAVE_GIT" != "x" ; then
+ # git might be installed, but we might be building from a tarball
+ if git rev-parse ; then
+ AC_SUBST([REVISION], `git rev-parse HEAD`)
+ else
+ AC_SUBST([REVISION], [none])
+ fi
+else
+ AC_SUBST([REVISION], [none])
+fi