bootstrap: support Automake-NG in $buildreq
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 23 Apr 2012 15:17:21 +0000 (17:17 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 26 Apr 2012 13:38:55 +0000 (15:38 +0200)
* bootstrap (check_versions): Handle automake and aclocal from
Automake-NG specially.  They can be specified as respectively
the "automake-ng" and "aclocal-ng" requirements.

ChangeLog
build-aux/bootstrap

index 37cdb76..b81a470 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       bootstrap: support Automake-NG in $buildreq
+       * bootstrap (check_versions): Handle automake and aclocal from
+       Automake-NG specially.  They can be specified as respectively
+       the "automake-ng" and "aclocal-ng" requirements.
+
 2012-04-25  Eric Blake  <eblake@redhat.com>
 
        bootstrap: only force latest Makefile.in.in for gettext module
index 6b45868..c496d29 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2012-04-25.17; # UTC
+scriptversion=2012-04-26.13; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -433,6 +433,22 @@ check_versions() {
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
         *) eval "app=\${$appvar-$app}" ;;
     esac
+
+    # Handle the still-experimental Automake-NG programs specially.
+    # They remain named as the mainstream Automake programs ("automake",
+    # and "aclocal") to avoid gratuitous incompatibilities with
+    # pre-existing usages (by, say, autoreconf, or custom autogen.sh
+    # scripts), but correctly identify themselves (as being part of
+    # "GNU automake-ng") when asked their version.
+    case $app in
+      automake-ng|aclocal-ng)
+        app=`echo "$app" | sed 's/-ng$//'`
+        ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
+          echo "$me: Error: '$app' not found or not from Automake-NG" >&2
+          ret=1
+          continue
+        } ;;
+    esac
     if [ "$req_ver" = "-" ]; then
       # Merely require app to exist; not all prereq apps are well-behaved
       # so we have to rely on $? rather than get_version.