aboutsummaryrefslogtreecommitdiff
path: root/m4/ac_espik_version.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/ac_espik_version.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)
+])