Define SVN_REV filled with latest svn revision. Code kindly taken from geany project.

This commit is contained in:
riccardom 2009-06-18 19:21:28 +00:00
parent 05b10e8faa
commit bd0f5f9eb2
1 changed files with 9 additions and 0 deletions

View File

@ -24,6 +24,15 @@ AC_PROG_RANLIB
dnl -- check for endianess
AC_C_BIGENDIAN
# took this from geany, hope it works
REVISION="r0"
SVN=`which svn 2>/dev/null`
if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}" ; then
REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
fi
AC_DEFINE_UNQUOTED([SVN_REV], "$REVISION", [subversion revision number])
dnl --- Other prerequisites ---
dnl - Check for pkg-config macros
m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG])