]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Let `missing' also work with versioned and prefixed programs.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 24 Nov 2008 06:44:33 +0000 (07:44 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 24 Nov 2008 06:51:47 +0000 (07:51 +0100)
* lib/missing: Ignore prefixes of `gnu-', `gnu', and `g' when
testing for known programs; also, ignore suffixes.
* tests/missing.test: Amend test.
* NEWS, THANKS: Update.
Report by Tim Rice.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
THANKS
lib/missing
tests/missing.test

index 8f2042fcae86b9621086cc8270141f56600b7b28..ef7f710a5186cd2a47d55adee8916da44ab1bfbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-11-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Let `missing' also work with versioned and prefixed programs.
+       * lib/missing: Ignore prefixes of `gnu-', `gnu', and `g' when
+       testing for known programs; also, ignore suffixes.
+       * tests/missing.test: Amend test.
+       * NEWS, THANKS: Update.
+       Report by Tim Rice.
+
 2008-11-23  William Pursell  <bill.pursell@gmail.com>
 
        * doc/automake.texi (Macro search path, Extending aclocal)
diff --git a/NEWS b/NEWS
index 2910cf8faf9d49be0704f0cae7c9735757662201..8e0d0270a4ed1340af8ec4e694efc39e545f2202 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -125,6 +125,8 @@ New in 1.10a:
   - AM_SUBST_NOTMAKE may prevent substitution of AC_SUBSTed variables,
     useful especially for multi-line values.
 
+  - The `missing' script works better with versioned tool names.
+
 Bugs fixed in 1.10a:
 
 * Long standing bugs:
diff --git a/THANKS b/THANKS
index 55ec6dfa9dd6950dde48ee6a814eb93733797175..8afb9cf4f8589cf7c42aa19383d3c7363d6c03fc 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -312,6 +312,7 @@ Thomas Tanner               tanner@ffii.org
 Toralf Förster                toralf.foerster@gmx.de
 Tim Goodwin            tjg@star.le.ac.uk
 Tim Mooney             mooney@dogbert.cc.ndsu.NoDak.edu
+Tim Rice               tim@multitalents.net
 Tim Van Holder         tim.van.holder@pandora.be
 Toshio Kuratomi                toshio@tiki-lounge.com
 Tom Epperly            tepperly@llnl.gov
index 68e3a41a176fd7198414c836ddd94dacc57b5e32..4758c826ca9e851f5ee1160d9053c7de7c2936bf 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2006-05-10.23
+scriptversion=2008-11-24.07
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008  Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -87,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <bug-automake@gnu.org>."
     exit $?
     ;;
@@ -104,15 +107,19 @@ Send bug reports to <bug-automake@gnu.org>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed 's/^gnu-//; t; s/^gnu//; t; s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
 case $1 in
-  lex|yacc)
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -136,7 +143,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case $1 in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -146,7 +153,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -155,7 +162,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -185,7 +192,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -208,7 +215,7 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
@@ -238,7 +245,7 @@ WARNING: \`$1' $msg.  You should only need it if
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
@@ -261,7 +268,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
@@ -279,7 +286,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -308,7 +315,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
index 7d541837af9f38a26038d99737cccf46390eb3ef..911a5529aa4f7bfc13f860df8a3f329ef0ef1cd3 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2008  Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,6 +44,16 @@ $sleep
 echo 'AC_PREREQ(9999)' >> aclocal.m4
 $MAKE distdir
 
+# Try version number suffixes if we can add them safely.
+case $MYAUTOCONF in *autoconf)
+  ./configure AUTOCONF="${MYAUTOCONF}6789"
+  $MAKE
+  $sleep
+  # Hopefully the install version of Autoconf cannot compete with this one...
+  echo 'AC_PREREQ(9999)' >> aclocal.m4
+  $MAKE distdir
+esac
+
 # Run again, but without missing, to ensure that timestamps were updated.
 export AUTOMAKE ACLOCAL
 ./configure AUTOCONF="$MYAUTOCONF"