Don't print error about missing git repo if building from tarball. Don't define REVISION in that case.

remotes/origin/master-1.2.x suricata-1.2rc1
Victor Julien 14 years ago
parent e192ce7ea5
commit 5886ef8249

@ -1046,10 +1046,16 @@ AC_CHECK_HEADER(pcap.h,,[AC_ERROR(pcap.h not found ...)])
REVISION=`cat ./revision`
CFLAGS="${CFLAGS} -DREVISION=\"${REVISION}\""
else
AC_MSG_CHECKING(git command available)
GIT=`which git`
if test "$GIT" != ""; then
REVISION=`git rev-parse --short HEAD`
CFLAGS="${CFLAGS} -DREVISION=\"${REVISION}\""
if [ test "$GIT" != ""]; then
AC_MSG_RESULT(yes)
if [ test -d .git ]; then
REVISION=`git rev-parse --short HEAD`
CFLAGS="${CFLAGS} -DREVISION=\"${REVISION}\""
fi
else
AC_MSG_RESULT(no)
fi
fi

Loading…
Cancel
Save