commit dae2a17f44d3fa1decb1285b9f509c84dc2e5214
parent c2c94ee2ddf4510205874d42c8fe3e99dfbfeab4
Author: Andrej Kacian <ticho@claws-mail.org>
Date: Fri, 24 Aug 2018 13:48:38 +0200
Fix configure version detection when building outside of srcdir.
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
@@ -21,8 +21,13 @@ if test \( -d .git \); then
echo "echo ${GIT_VERSION}" > ./version
fi
else
- GIT_VERSION=`sh -c ". ./$srcdir/version"`
+ GIT_VERSION=`sh -c ". $srcdir/version"`
fi
+
+if test \( -z "$GIT_VERSION" \); then
+ AC_MSG_ERROR([*** could not determine program version])
+fi
+
MAJOR_VERSION=${GIT_VERSION%%.*}
MINOR_VERSION=${GIT_VERSION#*.}
MINOR_VERSION=${MINOR_VERSION%%.*}