From: Chris Lamb <lamby@debian.org>
Date: Fri, 28 Aug 2015 22:38:47 +0100
Subject: Make the build reproducible.

Description: Make the build reproducible.
Author: Chris Lamb <lamby@debian.org>
Bug-Debian: https://bugs.debian.org/797254
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index c11448f..e17fa8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,9 +157,15 @@ AC_DEFINE_UNQUOTED(DEFAULT_LCLIMPORTDIR, ".$PATH_SEPARATOR$myprefix/share/splint
 
 # These used to be in herald.h
 LCL_PARSE_VERSION="AC_PACKAGE_NAME AC_PACKAGE_VERSION"
+if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
+AC_DEFINE_UNQUOTED(SPLINT_VERSION,
+                   "$LCL_PARSE_VERSION --- `LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH}" +"%d %b %Y"`",
+                   [Splint's version number and configure/build date])
+else
 AC_DEFINE_UNQUOTED(SPLINT_VERSION,
                    "$LCL_PARSE_VERSION --- `date +"%d %b %Y"`",
                    [Splint's version number and configure/build date])
+fi
 AC_DEFINE_UNQUOTED(LCL_PARSE_VERSION, "$LCL_PARSE_VERSION",
                    [Splint's version number])
 AC_DEFINE_UNQUOTED(LCL_COMPILE,
