Generate PAZPAR2_VERSION_SHA1 (Git SHA1 ID).
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 5 May 2009 10:59:46 +0000 (12:59 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 5 May 2009 10:59:46 +0000 (12:59 +0200)
configure.ac

index 0eb1621..e17d571 100644 (file)
@@ -27,6 +27,14 @@ YAZ_DOC
 
 AC_CHECK_HEADERS([sys/time.h sys/socket.h unistd.h netinet/in.h netdb.h arpa/inet.h])
 AC_CHECK_FUNCS([getaddrinfo])
+
+if test -d ${srcdir}/.git; then
+       sha=`git show --pretty=format:%H|head -1`
+else
+       sha=`head -1 ${srcdir}/ChangeLog|awk '{print $2}'`
+fi
+AC_DEFINE_UNQUOTED([PAZPAR2_VERSION_SHA1], ["$sha"], [Git SHA1])
+
 AC_CONFIG_FILES([
        Doxyfile
        Makefile