summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aclocal.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index e823f34fcc..8e97726d80 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1458,10 +1458,11 @@ if test "$RELEASE" = "NO"; then
AC_MSG_RESULT(given $PACKAGE_VERSION)
elif test -d .git; then
changequote(, )dnl
- ver_date=`git log -n 1 --date=short --pretty=format:%ci | cut -d ' ' -f 1 | tr -d -`
+ ver_posixtime=`git log -1 --pretty=format:%ct`
+ ver_date=`perl -MPOSIX -e "print strftime('%Y%m%d', gmtime($ver_posixtime));"`
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
changequote([, ])dnl
- AC_MSG_ERROR([failed to detect version date: check that git is in your path])
+ AC_MSG_ERROR([failed to detect version date: check that git and perl are in your path])
fi
PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date
AC_MSG_RESULT(inferred $PACKAGE_VERSION)