about summary refs log tree commit diff
path: root/configure.ng
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-09-24 18:00:36 +0200
committerAlexander Barton <alex@barton.de>2012-09-24 18:00:36 +0200
commitd7d5f4330b15667d9f364ebabd886a062b2741fb (patch)
tree9c832e4ce9866dda993cf2a45382b6d95af86a2d /configure.ng
parent79c122289657afcac0ad15d3946be52906dbf3d9 (diff)
downloadngircd-d7d5f4330b15667d9f364ebabd886a062b2741fb.tar.gz
ngircd-d7d5f4330b15667d9f364ebabd886a062b2741fb.zip
configure.ng: don't require GIT tree to detect version string
Diffstat (limited to 'configure.ng')
-rw-r--r--configure.ng7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ng b/configure.ng
index 25654f9c..da723e8f 100644
--- a/configure.ng
+++ b/configure.ng
@@ -9,7 +9,12 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 
-define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d \\n))
+define(VERSION_ID,esyscmd([
+	V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`;
+	[ -z "$V" -a -r configure ] \
+		&& V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2`
+	( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n';
+]))
 
 # -- Initialisation --