From: Ole Streicher <olebole@debian.org>
Date: Mon, 25 Sep 2017 14:07:50 +0200
Subject: Replace the build date with the last changed date of configure.ac

This shall help to make the build reproducible.
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 774f2ba..788ec75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,10 @@ AC_CONFIG_SRCDIR(src/makeit.c)
 AC_CONFIG_AUX_DIR(autoconf)
 AC_CONFIG_HEADERS(config.h)
 AM_INIT_AUTOMAKE
-date=`date +%Y-%m-%d`
-date2=`date +"%a %b %d %Y"`
-date3=`date +"%B %Y"`
+d0=`fgrep "Last modified" configure.ac | cut -d: -f2- | head -1 |  sed "s+\(..\)/\(..\)/\(....\)+\\3-\\2-\\1+"`
+date=`date +%Y-%m-%d -d $d0`
+date2=`date +"%a %b %d %Y" -d $d0`
+date3=`date +"%B %Y" -d $d0`
 AC_DEFINE_UNQUOTED(DATE, "$date", [Archive creation date])
 AC_SUBST(PACKAGER, "Emmanuel Bertin")
 AC_SUBST(DATE2, "$date2")
