missing revision a747113422afaa29ce72d2c5ba7f0b7ea9ec2054
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Common stub for a few missing GNU programs while installing.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt# Copyright (C) 1996-2012 Free Software Foundation, Inc.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Originally 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.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt# In the cases where this matters, 'missing' is being run in the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# srcdir already.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Huntif test -f configure.ac; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # Try to run requested program, and just exit if it succeeds.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # Exit code 63 means version mismatch. This often happens
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # when the user try to use an ancient version of a tool on
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # a file that requires a minimum version. In this case we
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # we should proceed has if the program had been absent, or
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # if --run hadn't been passed.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test $? = 63; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt$0 [OPTION]... PROGRAM [ARGUMENT]...
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntHandle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunterror status if there is no known handling for PROGRAM.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt -h, --help display this help and exit
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt -v, --version output version information and exit
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt --run try to run the given command, and emulate it if it fails
ef421f66f47224a42073deaf087378c5d0c9952eEvan HuntSupported PROGRAM values:
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt aclocal touch file 'aclocal.m4'
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt autoconf touch file 'configure'
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt autoheader touch file 'config.h.in'
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt autom4te touch the output file, or create a stub one
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt automake touch all 'Makefile.in' files
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt bison create 'y.tab.[ch]', if possible, from existing .[ch]
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt flex create 'lex.yy.c', if possible, from existing .c
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt help2man touch the output file
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt lex create 'lex.yy.c', if possible, from existing .c
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt makeinfo touch the output file
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt yacc create 'y.tab.[ch]', if possible, from existing .[ch]
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)"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# normalize program name to check for.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt s/^gnu-//; t
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# Now exit if we have it, but it failed. Also exit now if we
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# don't have it and --version was passed (most likely to detect
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# the program). This is about non-GNU programs, so use $1 not
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # Not GNU programs, they don't have --version.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # We have it, but it failed.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # Could not run --version or --help. This is probably someone
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt # running '$TOOL --version' or '$TOOL --help' to check whether
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # $TOOL exists and not knowing $TOOL uses missing.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# If it does not exist, or fails to run (possibly an outdated version),
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# try to emulate it.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified 'acinclude.m4' or '${configure_ac}'. You might want
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt to install the Automake and Perl packages. Grab them from
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt any GNU archive site."
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified '${configure_ac}'. You might want to install the
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Autoconf and GNU m4 packages. Grab them from any GNU
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt archive site."
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified 'acconfig.h' or '${configure_ac}'. You might want
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt to install the Autoconf and GNU m4 packages. Grab them
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt from any GNU archive site."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt You might want to install the Automake and Perl packages.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt Grab them from any GNU archive site."
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is needed, but is $msg.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt You might have modified some files without having the
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt proper tools for further handling them.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt You can get '$1' as part of Autoconf from any GNU
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt archive site."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -f "$file"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt echo "# Created by GNU Automake missing as a replacement of"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt echo "# $ $@"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt echo "exit 0"
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified a '.y' file. You may need the Bison package
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt in order for those modifications to take effect. You can get
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Bison from any GNU archive site."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -f "$SRCFILE"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -f "$SRCFILE"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test ! -f y.tab.h; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test ! -f y.tab.c; then
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified a '.l' file. You may need the Flex package
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt in order for those modifications to take effect. You can get
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Flex from any GNU archive site."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -f "$SRCFILE"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test ! -f lex.yy.c; then
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt you modified a dependency of a manual page. You may need the
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt Help2man package in order for those modifications to take
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt effect. You can get Help2man from any GNU archive site."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -f "$file"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt echo ".ab help2man is required to generate this page"
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is $msg. You should only need it if
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt you modified a '.texi' or '.texinfo' file, or any other file
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt indirectly affecting the aspect of the manual. The spurious
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt call might also be the consequence of using a buggy 'make' (AIX,
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt DU, IRIX). You might want to install the Texinfo package or
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt the GNU make package. Grab either from any GNU archive site."
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # The file to touch is that specified with -o ...
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt if test -z "$file"; then
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # ... or it is the one specified with @setfilename ...
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt /^@setfilename/{
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt s/.* \([^ ]*\) *$/\1/
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # ... or it is derived from the source name (dir/f.texi becomes f.info)
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # If the file does not exist, the user really needs makeinfo;
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt # let's fail without touching anything.
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan HuntWARNING: '$1' is needed, and is $msg.
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt You might have modified some files without having the
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt proper tools for further handling them. Check the 'README' file,
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt it often tells you about the needed prerequisites for installing
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt this package. You may also peek at any GNU archive site, in case
a747113422afaa29ce72d2c5ba7f0b7ea9ec2054Evan Hunt some other package would contain this missing '$1' program."
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"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# time-stamp-time-zone: "UTC"
ef421f66f47224a42073deaf087378c5d0c9952eEvan Hunt# time-stamp-end: "; # UTC"