Skip to content

Commit

Permalink
Don't print error about missing git repo if building from tarball. Do…
Browse files Browse the repository at this point in the history
…n't define REVISION in that case.
  • Loading branch information
victorjulien committed Jan 11, 2012
1 parent e192ce7 commit 5886ef8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5886ef8

Please sign in to comment.