missing revision 4a53e3c2b83c476a93148eaee0272649beb221ca
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Common wrapper for a few potentially missing GNU programs.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Copyright (C) 1996-2017 Free Software Foundation, Inc.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# This program is free software; you can redistribute it and/or modify
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# it under the terms of the GNU General Public License as published by
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# the Free Software Foundation; either version 2, or (at your option)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# any later version.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# This program is distributed in the hope that it will be useful,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# but WITHOUT ANY WARRANTY; without even the implied warranty of
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# GNU General Public License for more details.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# You should have received a copy of the GNU General Public License
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# along with this program. If not, see <http://www.gnu.org/licenses/>.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# As a special exception to the GNU General Public License, if you
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# distribute this file as part of a program that contains a
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# configuration script generated by Autoconf, you may include it under
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# the same distribution terms that you use for the rest of that program.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews # Used by our autoconf macros to check whether the available missing
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews # script is modern enough.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews # Back-compat with the calling convention used by older automake.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt$0 [OPTION]... PROGRAM [ARGUMENT]...
4a53e3c2b83c476a93148eaee0272649beb221caMark AndrewsRun 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrewsto PROGRAM being missing or too old.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt -h, --help display this help and exit
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt -v, --version output version information and exit
ef421f66f47224a42073deaf087378c5d0c9952eEvan HuntSupported PROGRAM values:
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews aclocal autoconf autoheader autom4te automake makeinfo
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews bison yacc flex lex help2man
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntVersion suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt'g' are ignored when checking the name.
ef421f66f47224a42073deaf087378c5d0c9952eEvan HuntSend bug reports to <bug-automake@gnu.org>."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt echo "missing $scriptversion (GNU Automake)"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Run the given program, remember its exit status.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# If it succeeded, we are done.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Also exit now if we it failed (or wasn't found), and '--version' was
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# passed; such an option is passed most likely to detect whether the
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# program is present and works.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Exit code 63 means version mismatch. This often happens when the user
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# tries to use an ancient version of a tool on a file that requires a
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# minimum version.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews # Program was missing.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews # Program was found and executed, but failed. Give up.
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "The '$1' program is part of the GNU Automake package:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "The '$1' program is part of the GNU Autoconf package:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "It also requires GNU m4 and Perl in order to run:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews s/^gnu-//; t
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified 'configure.ac',"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified 'acconfig.h' or"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified 'Makefile.am' or"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified 'acinclude.m4' or"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You might have modified some maintainer files that require"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified a '.y' file."
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You may want to install the GNU Bison package:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified a '.l' file."
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You may want to install the Fast Lexical Analyzer package:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified a dependency" \
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You may want to install the GNU Help2man package:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You should only need it if you modified a '.texi' file, or"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "any other file indirectly affecting the aspect of the manual."
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You might want to install the Texinfo package:"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "The spurious makeinfo call might also be the consequence of"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "You might have modified some files without having the proper"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "tools for further handling them. Check the 'README' file, it"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "often tells you about the needed prerequisites for installing"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "this package. You may also peek at any GNU archive site, in"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews echo "case some other package contains this missing '$1' program."
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# Propagate the correct exit status (expected to be 127 for a program
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# not found, 63 for a program that failed due to version mismatch).
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Local variables:
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# eval: (add-hook 'write-file-hooks 'time-stamp)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# time-stamp-start: "scriptversion="
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# time-stamp-format: "%:y-%02m-%02d.%02H"
4a53e3c2b83c476a93148eaee0272649beb221caMark Andrews# time-stamp-time-zone: "UTC0"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# time-stamp-end: "; # UTC"