From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Tue, 6 Jul 2021 18:57:15 +0000 (+0100) Subject: Check for the present of .git/index before committing to using git versioning. X-Git-Tag: 1.2~113^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac7f7a46299f553cf14bdf892333dd34e8cd4182;p=thirdparty%2Fnqptp.git Check for the present of .git/index before committing to using git versioning. --- diff --git a/configure.ac b/configure.ac index 46ec73d..a4a97b6 100644 --- a/configure.ac +++ b/configure.ac @@ -34,10 +34,10 @@ if test "x$build_freebsd" = "xyes" ; then fi AC_CHECK_PROGS([GIT], [git]) -if test -n "$GIT"; then +if test -n "$GIT" && test -e ".git/index" ; then AC_DEFINE([CONFIG_USE_GIT_VERSION_STRING], 1, [Use the version string produced by running 'git describe --dirty'.]) fi -AM_CONDITIONAL([USE_GIT], [test -n "$GIT"]) +AM_CONDITIONAL([USE_GIT_VERSION], [test -n "$GIT" && test -e ".git/index" ]) AC_CONFIG_SRCDIR([nqptp.c]) AC_CONFIG_HEADERS([config.h])