1 dnl GEANY_CHECK_REVISION([action-if-found], [action-if-not-found])
2 dnl Check for the Git-SVN or SVN revision and set REVISION to
3 dnl "r<revnum>" or to "-1" if the revision can't be found
4 dnl Also AC_DEFINEs REVISION
5 AC_DEFUN([GEANY_CHECK_REVISION],
9 AC_MSG_CHECKING([for Git revision])
11 GIT=`which git 2>/dev/null`
12 if test -d ".git" -a "x${GIT}" != "x" -a -x "${GIT}"; then
13 REVISION=`git rev-parse --short --revs-only HEAD || 0`
16 if test "x${REVISION}" != "x0"; then
17 AC_MSG_RESULT([$REVISION])
18 GEANY_STATUS_ADD([Compiling Git revision], [$REVISION])
20 # call action-if-found
26 # call action-if-not-found
30 AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [git revision hash])