aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber@setibzh.com>2006-02-01 00:47:35 +0100
committerBertrand Jacquin (Beber) <beber@setibzh.com>2006-02-01 00:47:35 +0100
commitb15ed6c73bfe02e9966b2ed8859794c39dc44bfb (patch)
treed3fd48325c8154c65f26f8275d7507cee5914ed4 /m4
parentMissing files (diff)
downloadespik-b15ed6c73bfe02e9966b2ed8859794c39dc44bfb.tar.xz
Get commit id when compiling
Could be usefull
Diffstat (limited to 'm4')
-rw-r--r--m4/ac_espik_version.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/ac_espik_version.m4 b/m4/ac_espik_version.m4
new file mode 100644
index 0000000..4f355c4
--- /dev/null
+++ b/m4/ac_espik_version.m4
@@ -0,0 +1,14 @@
+AC_DEFUN([AC_ESPIK_VERSION],
+[
+ AC_MSG_CHECKING(for git commit)
+
+ if test `eval git hash-object .git/HEAD`; then
+ GITVERSION=`git hash-object .git/HEAD`
+ else
+ GITVERSION=`date +%Y%m%d`
+ fi
+
+ AC_MSG_RESULT($GITVERSION)
+
+ AC_SUBST(GITVERSION)
+])