From 544ff819114714762fe870a59008d3089987b775 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 20 Jul 2020 17:38:03 +0200 Subject: [PATCH] configure: Ignore unknown Git version number Don't abort the script if the version is reported as UNKNOWN, which happens on CI hosts where the repository is only cloned with a certain depth (which may not include the latest tag). Also, never map VERSION to UNKNOWN. Fixes: 2e522952c77d ("configure: Optionally use version information obtained from Git in executables") --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 6ee47f584..419f1246f 100644 --- a/configure.ac +++ b/configure.ac @@ -1391,12 +1391,15 @@ case "$GIT_VERSION" in "$PACKAGE_VERSION"*) AC_MSG_RESULT([$GIT_VERSION]) ;; + UNKNOWN) + AC_MSG_RESULT([$GIT_VERSION (could be due to insufficient clone depth)]) + ;; *) AC_MSG_ERROR([$PACKAGE_VERSION is not a prefix of $GIT_VERSION, tag missing?]) ;; esac -if test x$git_version = xtrue; then +if test x$git_version = xtrue -a "$GIT_VERSION" != "UNKNOWN"; then AC_DEFINE_UNQUOTED(VERSION, ["$GIT_VERSION"]) fi