diff --git a/aclocal.m4 b/aclocal.m4
index 3f0ec00..e24fa4b 100644
|
a
|
b
|
|
| 988 | 988 | if test -f VERSION_DATE; then |
| 989 | 989 | PACKAGE_VERSION=${PACKAGE_VERSION}.`cat VERSION_DATE` |
| 990 | 990 | AC_MSG_RESULT(given $PACKAGE_VERSION) |
| 991 | | elif test -d _darcs; then |
| | 991 | elif test -d .git; then |
| 992 | 992 | changequote(, )dnl |
| 993 | | ver_date=`darcs changes --quiet --no-summary --xml | head -500 | grep 'date=' | sed "s/^.*date='\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/g" | sort -n | tail -1` |
| | 993 | ver_date=`git log -n 1 --date=short --pretty=format:%ci | sed "s/^.*\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\).*$/\1\2\3/"` |
| 994 | 994 | if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else |
| 995 | 995 | changequote([, ])dnl |
| 996 | | AC_MSG_ERROR([failed to detect version date: check that darcs is in your path]) |
| | 996 | AC_MSG_ERROR([failed to detect version date: check that git is in your path]) |
| 997 | 997 | fi |
| 998 | 998 | PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date |
| 999 | 999 | AC_MSG_RESULT(inferred $PACKAGE_VERSION) |
| … |
… |
|
| 1001 | 1001 | PACKAGE_VERSION=`cat VERSION` |
| 1002 | 1002 | AC_MSG_RESULT(given $PACKAGE_VERSION) |
| 1003 | 1003 | else |
| 1004 | | AC_MSG_WARN([cannot determine snapshot version: no _darcs directory and no VERSION file]) |
| | 1004 | AC_MSG_WARN([cannot determine snapshot version: no .git directory and no VERSION file]) |
| 1005 | 1005 | fi |
| 1006 | 1006 | fi |
| 1007 | 1007 | |