]> git.donarmstrong.com Git - lilypond.git/commitdiff
robuster version detection.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 1 Jun 2006 00:10:38 +0000 (00:10 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 1 Jun 2006 00:10:38 +0000 (00:10 +0000)
ChangeLog
stepmake/aclocal.m4

index dfe07ee89713495e99c84ebf23da243627867f5c..b72619e3028105ac675414b71b3766ab1885aea2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2006-06-01  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
-       * stepmake/aclocal.m4: revert version detection change.
+       * stepmake/aclocal.m4: robuster version detection.
 
 2006-06-01  Jan Nieuwenhuizen  <janneke@gnu.org>
 
index 9f418fbad497203853a25285cb3c9c49ff519f92..e352d40bf8f3469149aa922c5996369d3a8388c0 100644 (file)
@@ -29,15 +29,11 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [
     ## Assume and hunt for dotted version multiplet.
     ## use eval trickery, because we cannot use multi-level $() instead of ``
     ## for compatibility reasons.
-    ## FIXME: what systems still do not have $() in /bin/sh?
+
+    ## grab the first version number in  --version output.
     eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '[0-9]\.[0-9]' \
         | head -n 1 \
-       | sed -e 's/.*[^-.0-9]\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/' \
-          -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
-
-## apparently breaks on darwin,  
-#        | sed -e 's/\([0-9][0-9]*\.[0-9][.0-9]*\).*/\1/' \
-#        -e 's/\([^0-9]*\|^\) //' -e 's/[^0-9]*$//'\`\"
+       | tr ' ' '\n' | grep '[0-9]\.[0-9]' | head -n 1 | sed 's/\([0-9.]*\).*/\1/g'\`\"
 
     if test -z "$_ver"; then
         ## If empty, try date [fontforge]