Subject: [bug#67414] [PATCH] missing: add autoreconf, autogen and perl as supported programs

From: Karl Berry <[email-masked]>
Date: Thu, 23 Nov 2023 14:37:45 -0700

Hi Alex - back in July 2015, you sent an Automake patch to add support
for autoreconf, etc., to the missing script:
  https://lists.gnu.org/archive/html/automake-patches/2015-08/msg00000.html

In the better late than never department, I've finally applied that
patch, modulo a few unimportant wording tweaks, as below. Belated thanks!
(And thanks to Bogdan for unearthing this from the archives.)

(I also alphabetized the lists, so the diffs appear larger than they are.)

Karl

-------
missing: add autoreconf, autogen and perl as supported programs.

From:
https://lists.gnu.org/archive/html/automake-patches/2015-08/msg00000.html

* lib/missing: add autoreconf, autogen and perl as supported programs,
potentially especially useful from bootstrap scripts. Alphabetize.
* NEWS: mention.
* THANKS: new contributor.
diff --git a/NEWS b/NEWS
index 2a58785f3..86a9c5d21 100644
--- a/NEWS
+++ b/NEWS
@@ -10,9 +10,6 @@ New in 1.17:
   - AM_PATH_PYTHON will also search for Python versions 3.10 - 3.15.  It has
     previously searched for 3.0 - 3.9. (bug#53530)

-  - The default value of $ARFLAGS is now "cr" instead of "cru", to
-    support deterministic builds. (bug#20082)
-
   - RANLIB may be overridden on a per-target basis.

   - AM_TEXI2FLAGS may be defined to pass extra flags to TEXI2DVI & TEXI2PDF.
@@ -37,6 +34,8 @@ New in 1.17:
     it should be the basename of the Texinfo file, extended with .info.
     (bug#54063)

+  - The missing script also supports autoreconf, autogen, and perl.
+
 * Bugs fixed

   - Generated file timestamp checks handle filesystems with sub-second
@@ -46,6 +45,9 @@ New in 1.17:
     problems may ensue); for older autom4te, we fall back to one-second
     granularity as before. (bug#64756)

+  - The default value of $ARFLAGS is now "cr" instead of "cru", to better
+    support deterministic builds. (bug#20082)
+
   - Dependency files are now empty, instead of '# dummy', for speed.

   - Compiling Python modules with Python 3.5+ uses multiple optimization
diff --git a/THANKS b/THANKS
index 63e4f65af..4ba67cf7e 100644
--- a/THANKS
+++ b/THANKS
@@ -11,6 +11,7 @@ Akim Demaille                   [email-masked]
 Alan Modra                      [email-masked]
 Alex Hornby                     [email-masked]
 Alex Unleashed                  [email-masked]
+Alex Vong                       [email-masked]
 Alexander V. Lukyanov           [email-masked]
 Alexander Mai                   [email-masked]
 Alexander Martens               [email-masked]
diff --git a/lib/missing b/lib/missing
index 9181a2183..e73e48a43 100755
--- a/lib/missing
+++ b/lib/missing
@@ -1,7 +1,7 @@
 #! /bin/sh
-# Common wrapper for a few potentially missing GNU programs.
+# Common wrapper for a few potentially missing GNU and other programs.

-scriptversion=2018-03-07.03; # UTC
+scriptversion=2023-11-23.17; # UTC

 # Copyright (C) 1996-2023 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <[email-masked]>, 1996.
@@ -54,8 +54,8 @@ Options:
   -v, --version   output version information and exit

 Supported PROGRAM values:
-  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
-  bison     yacc      flex         lex       help2man
+aclocal autoconf autogen  autoheader autom4te automake autoreconf 
+bison   flex     help2man lex        makeinfo perl     yacc

 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
 'g' are ignored when checking the name.
@@ -108,7 +108,7 @@ gnu_software_URL=https://www.gnu.org/software
 program_details ()
 {
   case $1 in
-    aclocal|automake)
+    aclocal|automake|autoreconf)
       echo "The '$1' program is part of the GNU Automake package:"
       echo "<$gnu_software_URL/automake>"
       echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
@@ -123,6 +123,9 @@ program_details ()
       echo "<$gnu_software_URL/m4/>"
       echo "<$perl_URL>"
       ;;
+    *)
+      :
+      ;;
   esac
 }

@@ -137,48 +140,55 @@ give_advice ()
   printf '%s\n' "'$1' is $msg."

   configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  autoheader_deps="'acconfig.h'"
+  automake_deps="'Makefile.am'"
+  aclocal_deps="'acinclude.m4'"
   case $normalized_program in
+    aclocal*)
+      echo "You should only need it if you modified $aclocal_deps or"
+      echo "$configure_deps."
+      ;;
     autoconf*)
-      echo "You should only need it if you modified 'configure.ac',"
-      echo "or m4 files included by it."
-      program_details 'autoconf'
+      echo "You should only need it if you modified $configure_deps."
+      ;;
+    autogen*)
+      echo "You should only need it if you modified a '.def' or '.tpl' file."
+      echo "You may want to install the GNU AutoGen package:"
+      echo "<$gnu_software_URL/autogen/>"
       ;;
     autoheader*)
-      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "You should only need it if you modified $autoheader_deps or"
       echo "$configure_deps."
-      program_details 'autoheader'
       ;;
     automake*)
-      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "You should only need it if you modified $automake_deps or"
       echo "$configure_deps."
-      program_details 'automake'
       ;;
-    aclocal*)
-      echo "You should only need it if you modified 'acinclude.m4' or"
-      echo "$configure_deps."
-      program_details 'aclocal'
-      ;;
-   autom4te*)
+    autom4te*)
       echo "You might have modified some maintainer files that require"
       echo "the 'autom4te' program to be rebuilt."
-      program_details 'autom4te'
+      ;;
+    autoreconf*)
+      echo "You should only need it if you modified $aclocal_deps or"
+      echo "$automake_deps or $autoheader_deps or $automake_deps or"
+      echo "$configure_deps."
       ;;
     bison*|yacc*)
       echo "You should only need it if you modified a '.y' file."
       echo "You may want to install the GNU Bison package:"
       echo "<$gnu_software_URL/bison/>"
       ;;
-    lex*|flex*)
-      echo "You should only need it if you modified a '.l' file."
-      echo "You may want to install the Fast Lexical Analyzer package:"
-      echo "<$flex_URL>"
-      ;;
     help2man*)
       echo "You should only need it if you modified a dependency" \
            "of a man page."
       echo "You may want to install the GNU Help2man package:"
       echo "<$gnu_software_URL/help2man/>"
     ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
     makeinfo*)
       echo "You should only need it if you modified a '.texi' file, or"
       echo "any other file indirectly affecting the aspect of the manual."
@@ -189,6 +199,12 @@ give_advice ()
       echo "want to install GNU make:"
       echo "<$gnu_software_URL/make/>"
       ;;
+    perl*)
+      echo "You should only need it to run GNU Autoconf, GNU Automake, "
+      echo "  assorted other tools, or if you modified a Perl source file."
+      echo "You may want to install the Perl 5 language interpreter:"
+      echo "<$perl_URL>"
+      ;;
     *)
       echo "You might have modified some files without having the proper"
       echo "tools for further handling them.  Check the 'README' file, it"
@@ -197,6 +213,7 @@ give_advice ()
       echo "case some other package contains this missing '$1' program."
       ;;
   esac
+  program_details "$normalized_program"
 }

 give_advice "$1" | sed -e '1s/^/WARNING: /' \

compile finished at Thu Nov 23 09:12:53 2023