aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c35ea4298..99d158afd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-10 Werner Koch <[email protected]>
+
+ * configure.ac: Support a git_revision string.
+
2010-07-19 Werner Koch <[email protected]>
Release 2.0.16.
diff --git a/configure.ac b/configure.ac
index 1332bc551..bf1b39fdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,8 +29,11 @@ m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
| sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
+m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
+ | awk '/^\* / {printf "%s",$3}']))
AC_INIT([gnupg],
- [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
+ [my_version[]m4_if(my_issvn,[yes],
+ [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])],
[http://bugs.gnupg.org])
# Set development_version to yes if the minor number is odd or you
# feel that the default check for a development version is not