|
|
| version 1.4, 2017/05/25 12:16:08 | version 1.5, 2026/09/27 13:14:20 |
|---|---|
| Line 1 | Line 1 |
| #! /bin/sh | #! /bin/sh |
| # Common wrapper for a few potentially missing GNU programs. | # Common wrapper for a few potentially missing GNU and other programs. |
| scriptversion=2013-10-28.13; # UTC | scriptversion=2024-06-07.14; # UTC |
| # Copyright (C) 1996-2014 Free Software Foundation, Inc. | # shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells |
| # Copyright (C) 1996-2024 Free Software Foundation, Inc. | |
| # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
| # This program is free software; you can redistribute it and/or modify | # This program is free software; you can redistribute it and/or modify |
| Line 17 scriptversion=2013-10-28.13; # UTC | Line 19 scriptversion=2013-10-28.13; # UTC |
| # GNU General Public License for more details. | # GNU General Public License for more details. |
| # You should have received a copy of the GNU General Public License | # You should have received a copy of the GNU General Public License |
| # along with this program. If not, see <http://www.gnu.org/licenses/>. | # along with this program. If not, see <https://www.gnu.org/licenses/>. |
| # As a special exception to the GNU General Public License, if you | # As a special exception to the GNU General Public License, if you |
| # distribute this file as part of a program that contains a | # distribute this file as part of a program that contains a |
| Line 54 Options: | Line 56 Options: |
| -v, --version output version information and exit | -v, --version output version information and exit |
| Supported PROGRAM values: | Supported PROGRAM values: |
| aclocal autoconf autoheader autom4te automake makeinfo | aclocal autoconf autogen autoheader autom4te automake autoreconf |
| bison yacc flex lex help2man | bison flex help2man lex makeinfo perl yacc |
| Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and | Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and |
| 'g' are ignored when checking the name. | 'g' are ignored when checking the name. |
| Send bug reports to <bug-automake@gnu.org>." | Report bugs to <bug-automake@gnu.org>. |
| GNU Automake home page: <https://www.gnu.org/software/automake/>. | |
| General help using GNU software: <https://www.gnu.org/gethelp/>." | |
| exit $? | exit $? |
| ;; | ;; |
| -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) |
| echo "missing $scriptversion (GNU Automake)" | echo "missing (GNU Automake) $scriptversion" |
| exit $? | exit $? |
| ;; | ;; |
| Line 101 else | Line 105 else |
| exit $st | exit $st |
| fi | fi |
| perl_URL=http://www.perl.org/ | perl_URL=https://www.perl.org/ |
| flex_URL=http://flex.sourceforge.net/ | flex_URL=https://github.com/westes/flex |
| gnu_software_URL=http://www.gnu.org/software | gnu_software_URL=https://www.gnu.org/software |
| program_details () | program_details () |
| { | { |
| case $1 in | case $1 in |
| aclocal|automake) | aclocal|automake|autoreconf) |
| echo "The '$1' program is part of the GNU Automake package:" | echo "The '$1' program is part of the GNU Automake package:" |
| echo "<$gnu_software_URL/automake>" | echo "<$gnu_software_URL/automake>" |
| echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" | echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" |
| Line 123 program_details () | Line 127 program_details () |
| echo "<$gnu_software_URL/m4/>" | echo "<$gnu_software_URL/m4/>" |
| echo "<$perl_URL>" | echo "<$perl_URL>" |
| ;; | ;; |
| *) | |
| : | |
| ;; | |
| esac | esac |
| } | } |
| Line 137 give_advice () | Line 144 give_advice () |
| printf '%s\n' "'$1' is $msg." | printf '%s\n' "'$1' is $msg." |
| configure_deps="'configure.ac' or m4 files included by 'configure.ac'" | 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 | case $normalized_program in |
| aclocal*) | |
| echo "You should only need it if you modified $aclocal_deps or" | |
| echo "$configure_deps." | |
| ;; | |
| autoconf*) | autoconf*) |
| echo "You should only need it if you modified 'configure.ac'," | echo "You should only need it if you modified $configure_deps." |
| echo "or m4 files included by it." | ;; |
| program_details 'autoconf' | 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*) | 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." | echo "$configure_deps." |
| program_details 'autoheader' | |
| ;; | ;; |
| automake*) | 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." | echo "$configure_deps." |
| program_details 'aclocal' | |
| ;; | ;; |
| autom4te*) | autom4te*) |
| echo "You might have modified some maintainer files that require" | echo "You might have modified some maintainer files that require" |
| echo "the 'autom4te' program to be rebuilt." | 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*) | bison*|yacc*) |
| echo "You should only need it if you modified a '.y' file." | echo "You should only need it if you modified a '.y' file." |
| echo "You may want to install the GNU Bison package:" | echo "You may want to install the GNU Bison package:" |
| echo "<$gnu_software_URL/bison/>" | 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*) | help2man*) |
| echo "You should only need it if you modified a dependency" \ | echo "You should only need it if you modified a dependency" \ |
| "of a man page." | "of a man page." |
| echo "You may want to install the GNU Help2man package:" | echo "You may want to install the GNU Help2man package:" |
| echo "<$gnu_software_URL/help2man/>" | 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*) | makeinfo*) |
| echo "You should only need it if you modified a '.texi' file, or" | echo "You should only need it if you modified a '.texi' file, or" |
| echo "any other file indirectly affecting the aspect of the manual." | echo "any other file indirectly affecting the aspect of the manual." |
| Line 189 give_advice () | Line 203 give_advice () |
| echo "want to install GNU make:" | echo "want to install GNU make:" |
| echo "<$gnu_software_URL/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 "You might have modified some files without having the proper" |
| echo "tools for further handling them. Check the 'README' file, it" | echo "tools for further handling them. Check the 'README' file, it" |
| Line 197 give_advice () | Line 217 give_advice () |
| echo "case some other package contains this missing '$1' program." | echo "case some other package contains this missing '$1' program." |
| ;; | ;; |
| esac | esac |
| program_details "$normalized_program" | |
| } | } |
| give_advice "$1" | sed -e '1s/^/WARNING: /' \ | give_advice "$1" | sed -e '1s/^/WARNING: /' \ |
| Line 207 give_advice "$1" | sed -e '1s/^/WARNING: | Line 228 give_advice "$1" | sed -e '1s/^/WARNING: |
| exit $st | exit $st |
| # Local variables: | # Local variables: |
| # eval: (add-hook 'write-file-hooks 'time-stamp) | # eval: (add-hook 'before-save-hook 'time-stamp) |
| # time-stamp-start: "scriptversion=" | # time-stamp-start: "scriptversion=" |
| # time-stamp-format: "%:y-%02m-%02d.%02H" | # time-stamp-format: "%:y-%02m-%02d.%02H" |
| # time-stamp-time-zone: "UTC" | # time-stamp-time-zone: "UTC0" |
| # time-stamp-end: "; # UTC" | # time-stamp-end: "; # UTC" |
| # End: | # End: |