From b66a3e4c9ec67d3bbb538544e7786c197fbf7810 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 9 Aug 2010 13:09:13 +0200 Subject: [PATCH] set hg revision in Gajim version --- autogen.sh | 8 ++++++++ configure.ac | 2 +- m4/acinclude.m4 | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 7e2f228e8..d57ce293f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,12 @@ #!/usr/bin/env bash + gajimversion="0.13.90" + if [ -d ".hg" ]; then + hgversion="-$(hexdump -n6 -e'6/1 "%02x"' .hg/dirstate)" + else + hgversion="" + fi + echo "define([AC_PACKAGE_VERSION], [${gajimversion}${hgversion}])" > m4/hgversion.m4 + AM_ARGS="--add-missing --gnu --copy" CONF_ARGS="" if test x`uname -s 2>/dev/null` = 'xDarwin' -a -f /Library/Frameworks/GTK+.framework/Versions/Current/env; then diff --git a/configure.ac b/configure.ac index 768e5b966..0dfcb4fb9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT([Gajim - A Jabber Instant Messager], - [0.13.90],[http://trac.gajim.org/],[gajim]) + ["version-set-in-hgversion"],[http://trac.gajim.org/],[gajim]) AC_PREREQ([2.59]) AC_CONFIG_HEADER(config.h) diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 index deebd2bf8..4a356b520 100644 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -47,3 +47,8 @@ AC_DEFUN([AS_AC_EXPAND], prefix=$prefix_save exec_prefix=$exec_prefix_save ]) + +# Fix autoconf: They don't allow shell variables in AC_INIT +# So we have to define them via m4 to be accepted.... + +m4_include(m4/hgversion.m4)