build: fix git detection for worktrees

When using additional git worktrees, .git is not a directory.

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2020-04-08 15:18:34 +02:00
parent 261e765345
commit 4c015942b1

View file

@ -860,7 +860,7 @@ fi
AC_SUBST([EXTRAVERSION])
if test "$with_pkg_git_version" = "yes"; then
if test -d "${srcdir}/.git"; then
if test -e "${srcdir}/.git"; then
AC_DEFINE([GIT_VERSION], [1], [include git version info])
else with_pkg_git_version="no"
AC_MSG_WARN([--with-pkg-git-version given, but this is not a git checkout])