11#! /bin/sh
2- # Common wrapper for a few potentially missing GNU programs.
2+ # Common wrapper for a few potentially missing GNU and other programs.
33
4- scriptversion=2017 -12-05.17gnucobol ; # UTC
4+ scriptversion=2024 -12-03.03 ; # UTC
55
6- # Copyright (C) 1996-2017 Free Software Foundation, Inc.
6+ # shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells
7+
8+ # Copyright (C) 1996-2024 Free Software Foundation, Inc.
79# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
810
911# This program is free software; you can redistribute it and/or modify
@@ -54,18 +56,20 @@ Options:
5456 -v, --version output version information and exit
5557
5658Supported PROGRAM values:
57- aclocal autoconf autoheader autom4te automake makeinfo
58- bison yacc flex lex help2man
59+ aclocal autoconf autogen autoheader autom4te automake autoreconf
60+ bison flex help2man lex makeinfo perl yacc
5961
6062Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
6163'g' are ignored when checking the name.
6264
63- Send bug reports to <bug-automake@gnu.org>."
65+ Report bugs to <bug-automake@gnu.org>.
66+ GNU Automake home page: <https://www.gnu.org/software/automake/>.
67+ General help using GNU software: <https://www.gnu.org/gethelp/>."
6468 exit $?
6569 ;;
6670
6771 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
68- echo " missing $scriptversion (GNU Automake)"
72+ echo " missing (GNU Automake) $scriptversion "
6973 exit $?
7074 ;;
7175
@@ -108,7 +112,7 @@ gnu_software_URL=https://www.gnu.org/software
108112program_details ()
109113{
110114 case $1 in
111- aclocal|automake)
115+ aclocal|automake|autoreconf )
112116 echo " The '$1 ' program is part of the GNU Automake package:"
113117 echo " <$gnu_software_URL /automake>"
114118 echo " It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
@@ -123,6 +127,9 @@ program_details ()
123127 echo " <$gnu_software_URL /m4/>"
124128 echo " <$perl_URL >"
125129 ;;
130+ * )
131+ :
132+ ;;
126133 esac
127134}
128135
@@ -137,48 +144,55 @@ give_advice ()
137144 printf ' %s\n' " '$1 ' is $msg ."
138145
139146 configure_deps=" 'configure.ac' or m4 files included by 'configure.ac'"
147+ autoheader_deps=" 'acconfig.h'"
148+ automake_deps=" 'Makefile.am'"
149+ aclocal_deps=" 'acinclude.m4'"
140150 case $normalized_program in
151+ aclocal* )
152+ echo " You should only need it if you modified $aclocal_deps or"
153+ echo " $configure_deps ."
154+ ;;
141155 autoconf* )
142- echo " You should only need it if you modified 'configure.ac',"
143- echo " or m4 files included by it."
144- program_details ' autoconf'
156+ echo " You should only need it if you modified $configure_deps ."
157+ ;;
158+ autogen* )
159+ echo " You should only need it if you modified a '.def' or '.tpl' file."
160+ echo " You may want to install the GNU AutoGen package:"
161+ echo " <$gnu_software_URL /autogen/>"
145162 ;;
146163 autoheader* )
147- echo " You should only need it if you modified 'acconfig.h' or"
164+ echo " You should only need it if you modified $autoheader_deps or"
148165 echo " $configure_deps ."
149- program_details ' autoheader'
150166 ;;
151167 automake* )
152- echo " You should only need it if you modified 'Makefile.am' or"
153- echo " $configure_deps ."
154- program_details ' automake'
155- ;;
156- aclocal* )
157- echo " You should only need it if you modified 'acinclude.m4' or"
168+ echo " You should only need it if you modified $automake_deps or"
158169 echo " $configure_deps ."
159- program_details ' aclocal'
160170 ;;
161- autom4te* )
171+ autom4te* )
162172 echo " You might have modified some maintainer files that require"
163173 echo " the 'autom4te' program to be rebuilt."
164- program_details ' autom4te'
174+ ;;
175+ autoreconf* )
176+ echo " You should only need it if you modified $aclocal_deps or"
177+ echo " $automake_deps or $autoheader_deps or $automake_deps or"
178+ echo " $configure_deps ."
165179 ;;
166180 bison* |yacc* )
167181 echo " You should only need it if you modified a '.y' file."
168182 echo " You may want to install the GNU Bison package:"
169183 echo " <$gnu_software_URL /bison/>"
170184 ;;
171- lex* |flex* )
172- echo " You should only need it if you modified a '.l' file."
173- echo " You may want to install the Fast Lexical Analyzer package:"
174- echo " <$flex_URL >"
175- ;;
176185 help2man* )
177186 echo " You should only need it if you modified a dependency" \
178187 " of a man page."
179188 echo " You may want to install the GNU Help2man package:"
180189 echo " <$gnu_software_URL /help2man/>"
181190 ;;
191+ lex* |flex* )
192+ echo " You should only need it if you modified a '.l' file."
193+ echo " You may want to install the Fast Lexical Analyzer package:"
194+ echo " <$flex_URL >"
195+ ;;
182196 makeinfo* )
183197 echo " You should only need it if you modified a '.texi' file, or"
184198 echo " any other file indirectly affecting the aspect of the manual."
@@ -189,6 +203,12 @@ give_advice ()
189203 echo " want to install GNU make:"
190204 echo " <$gnu_software_URL /make/>"
191205 ;;
206+ perl* )
207+ echo " You should only need it to run GNU Autoconf, GNU Automake, "
208+ echo " assorted other tools, or if you modified a Perl source file."
209+ echo " You may want to install the Perl 5 language interpreter:"
210+ echo " <$perl_URL >"
211+ ;;
192212 * )
193213 echo " You might have modified some files without having the proper"
194214 echo " tools for further handling them. Check the 'README' file, it"
@@ -197,6 +217,7 @@ give_advice ()
197217 echo " case some other package contains this missing '$1 ' program."
198218 ;;
199219 esac
220+ program_details " $normalized_program "
200221}
201222
202223give_advice " $1 " | sed -e ' 1s/^/WARNING: /' \
@@ -207,7 +228,7 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
207228exit $st
208229
209230# Local variables:
210- # eval: (add-hook 'write-file-hooks 'time-stamp)
231+ # eval: (add-hook 'before-save-hook 'time-stamp nil t )
211232# time-stamp-start: "scriptversion="
212233# time-stamp-format: "%:y-%02m-%02d.%02H"
213234# time-stamp-time-zone: "UTC0"
0 commit comments