Fix configure version detection when building outside of srcdir.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 24 Aug 2018 11:48:38 +0000 (13:48 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 24 Aug 2018 12:23:23 +0000 (14:23 +0200)
configure.ac

index 35e3b13..a3d2a67 100644 (file)
@@ -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%%.*}