summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-05-11 16:16:38 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-05-11 16:16:38 +0200
commitebce8a94938198be7e676da8d8ab70f6960f176c (patch)
tree1cc4eabec21abbdb0990b7f7df4691f4db56c5e1 /configure.ac
parent435390e4d981f15e55ebe9c45772816c1c39a28e (diff)
downloadmerchant-ebce8a94938198be7e676da8d8ab70f6960f176c.tar.gz
merchant-ebce8a94938198be7e676da8d8ab70f6960f176c.tar.bz2
merchant-ebce8a94938198be7e676da8d8ab70f6960f176c.zip
adding --version info
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5fee56d6..3d57949f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -273,6 +273,29 @@ AC_ARG_ENABLE([logging],
], [])
AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
+# version info
+AC_PATH_PROG(gitcommand, git)
+AC_MSG_CHECKING(for source being under a VCS)
+git_version=
+AS_IF([test ! "X$gitcommand" = "X"],
+[
+ git_version=$(cd $srcdir ; git rev-list --full-history --all --abbrev-commit | head -n 1 2>/dev/null)
+])
+AS_IF([test "X$git_version" = "X"],
+ [
+ vcs_name="no"
+ vcs_version="\"release\""
+ ],
+ [
+ vcs_name="yes, git-svn"
+ vcs_version="\"git-$git_version\""
+ ])
+AC_MSG_RESULT($vcs_name)
+
+AC_MSG_CHECKING(VCS version)
+AC_MSG_RESULT($vcs_version)
+AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version])
+
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_SIZE_T