]> arthur.barton.de Git - ngircd-alex.git/commitdiff
configure.ng: don't require GIT tree to detect version string
authorAlexander Barton <alex@barton.de>
Mon, 24 Sep 2012 16:00:36 +0000 (18:00 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 24 Sep 2012 16:00:36 +0000 (18:00 +0200)
configure.ng

index 25654f9cfbdfc78d2ef74de059a64cfeeb8e355f..da723e8fcae037dacbdf6710aef521b3538c1460 100644 (file)
@@ -9,7 +9,12 @@
 # Please read the file COPYING, README and AUTHORS for more information.
 #
 
 # 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 --
 
 
 # -- Initialisation --