bootstrap: handle perl-5.11's changed --version output
authorJim Meyering <meyering@redhat.com>
Sun, 29 Nov 2009 12:57:05 +0000 (13:57 +0100)
committerJim Meyering <meyering@redhat.com>
Sun, 29 Nov 2009 12:58:11 +0000 (13:58 +0100)
* build-aux/bootstrap (get_version): Handle perl separately,
since perl-5.11's --version output is different.

ChangeLog
build-aux/bootstrap

index 979a554..3d04361 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-29  Jim Meyering  <meyering@redhat.com>
+
+       bootstrap: handle perl-5.11's changed --version output
+       * build-aux/bootstrap (get_version): Handle perl separately,
+       since perl-5.11's --version output is different.
+
 2009-11-28  Jim Meyering  <meyering@redhat.com>
 
        userspec: depend on the inttostr module, too
index 8ac13b2..7c4882d 100755 (executable)
@@ -311,6 +311,13 @@ sort_ver() { # sort -V is not generally available
 get_version() {
   app=$1
 
+  # perl 5.11's --version output does not fit the mold,
+  # handle perl as a special case.
+  if test "_$app" = _perl; then
+      perl -le 'print $]' || return 1
+      return 0
+  fi
+
   $app --version >/dev/null 2>&1 || return 1
 
   $app --version 2>&1 |