From d1ba08cdf0a668885ff0fcf57db5ff8fdd2df303 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 8 Oct 2006 12:04:04 +0000 Subject: [PATCH] * Retrieve the configure.ac timestamp at configure time and store it in a C macro for better FIGlet emulation. --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index 09a5d09..f4ee44b 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,16 @@ PKG_CHECK_MODULES(cucul, cucul >= 0.99.beta6, [AC_MSG_RESULT(no) AC_MSG_ERROR([you need libcucul version 0.99.beta6 or later])]) +AC_CACHE_CHECK([for build date], + [ac_build_date], + [stamp="$(sed -ne 's/# \$Id: .*\(....-..-..\).*/\1/p;q' configure.ac)" + if date +"%e %B %Y" -d "$stamp" >/dev/null 2>&1; then + ac_build_date="$(LANG=C date +"%e %B %Y" -d "$stamp" | sed 's/^ //')" + else + ac_build_date="${stamp##*-} ${${stamp%-*}#*-} ${stamp%%-*}" + fi]) +AC_DEFINE_UNQUOTED(DATE, "$ac_build_date", [Define the version date]) + # Optimizations CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer" # Code qui fait des warnings == code de porc == deux baffes dans ta gueule