aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-14 17:03:16 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-06-14 17:30:19 +0000
commit0d9e1813f031b6b4449654265f66b92595f73122 (patch)
tree85cbc8bbac4ef4e29a76634e3dc918bfacb2df68 /configure.ac
parent47a57ef2597ff09c3c8f5d9400713ee8f7052b55 (diff)
downloadpaludis-0d9e1813f031b6b4449654265f66b92595f73122.tar.gz
paludis-0d9e1813f031b6b4449654265f66b92595f73122.tar.xz
Change subversion revision for git head
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 16 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 2176513..b4c5919 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1277,18 +1277,24 @@ AC_SUBST([BUILDHOST])
BUILDDATE=`date +%Y-%m-%dT%H:%M:%S%z`
AC_SUBST([BUILDDATE])
-if test -d "${ac_top_srcdir:-./}/.svn" ; then
- SVNVERSION=`svnversion "${ac_top_srcdir:-./}"`
+if test -d "${ac_top_srcdir:-./}/.git" ; then
+ GITHEAD=`git describe 2>/dev/null`
+ if test -z ${GITHEAD} ; then
+ GITHEAD=`git rev-parse HEAD`
+ fi
+ if test -n "`git diff-index --name-only HEAD`" ; then
+ GITHEAD=${GITHEAD}-dirty
+ fi
else
- SVNVERSION=
+ GITVERSION=
fi
-AC_MSG_CHECKING([for svn revision])
-AC_ARG_WITH([svn-revision],
- AS_HELP_STRING([--with-svn-revision], [Specify svn revision]),
- SVNVERSION=`eval echo $withval`,
- SVNVERSION=`eval echo $SVNVERSION`)
-AC_MSG_RESULT([$SVNVERSION])
-AC_SUBST([SVNVERSION])
+AC_MSG_CHECKING([for git head])
+AC_ARG_WITH([git-head],
+ AS_HELP_STRING([--with-git-head], [Specify Git head]),
+ GITHEAD=`eval echo $withval`,
+ GITHEAD=`eval echo $GITHEAD`)
+AC_MSG_RESULT([$GITHEAD])
+AC_SUBST([GITHEAD])
dnl }}}
dnl {{{ output