1#! /bin/sh
2# Common stub for a few missing GNU programs while installing.
3# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
5
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)
9# any later version.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19# 02111-1307, USA.
20
21if test $# -eq 0; then
22  echo 1>&2 "Try \`$0 --help' for more information"
23  exit 1
24fi
25
26case "$1" in
27
28  -h|--h|--he|--hel|--help)
29    echo "\
30$0 [OPTION]... PROGRAM [ARGUMENT]...
31
32Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
33error status if there is no known handling for PROGRAM.
34
35Options:
36  -h, --help      display this help and exit
37  -v, --version   output version information and exit
38
39Supported PROGRAM values:
40  aclocal      touch file \`aclocal.m4'
41  autoconf     touch file \`configure'
42  autoheader   touch file \`config.h.in'
43  automake     touch all \`Makefile.in' files
44  bison        touch file \`y.tab.c'
45  makeinfo     touch the output file
46  yacc         touch file \`y.tab.c'"
47    ;;
48
49  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
50    echo "missing - GNU libit 0.0"
51    ;;
52
53  -*)
54    echo 1>&2 "$0: Unknown \`$1' option"
55    echo 1>&2 "Try \`$0 --help' for more information"
56    exit 1
57    ;;
58
59  aclocal)
60    echo 1>&2 "\
61WARNING: \`$1' is missing on your system.  You should only need it if
62         you modified \`acinclude.m4' or \`configure.in'.  You might want
63         to install the \`Automake' and \`Perl' packages.  Grab them from
64         any GNU archive site."
65    touch aclocal.m4
66    ;;
67
68  autoconf)
69    echo 1>&2 "\
70WARNING: \`$1' is missing on your system.  You should only need it if
71         you modified \`configure.in'.  You might want to install the
72         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
73         archive site."
74    touch configure
75    ;;
76
77  autoheader)
78    echo 1>&2 "\
79WARNING: \`$1' is missing on your system.  You should only need it if
80         you modified \`acconfig.h' or \`configure.in'.  You might want
81         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
82         from any GNU archive site."
83    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
84    if test -z "$files"; then
85      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
86      test -z "$files" || files="$files.in"
87    else
88      files=`echo "$files" | sed -e 's/:/ /g'`
89    fi
90    test -z "$files" && files="config.h.in"
91    touch $files
92    ;;
93
94  automake)
95    echo 1>&2 "\
96WARNING: \`$1' is missing on your system.  You should only need it if
97         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
98         You might want to install the \`Automake' and \`Perl' packages.
99         Grab them from any GNU archive site."
100    find . -type f -name Makefile.am -print \
101      | sed 's/^\(.*\).am$/touch \1.in/' \
102      | sh
103    ;;
104
105  bison|yacc)
106    echo 1>&2 "\
107WARNING: \`$1' is missing on your system.  You should only need it if
108         you modified a \`.y' file.  You may need the \`Bison' package
109         in order for those modifications to take effect.  You can get
110         \`Bison' from any GNU archive site."
111    touch y.tab.c
112    ;;
113
114  makeinfo)
115    echo 1>&2 "\
116WARNING: \`$1' is missing on your system.  You should only need it if
117         you modified a \`.texi' or \`.texinfo' file, or any other file
118         indirectly affecting the aspect of the manual.  The spurious
119         call might also be the consequence of using a buggy \`make' (AIX,
120         DU, IRIX).  You might want to install the \`Texinfo' package or
121         the \`GNU make' package.  Grab either from any GNU archive site."
122    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
123    if test -z "$file"; then
124      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
125      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
126    fi
127    touch $file
128    ;;
129
130  *)
131    echo 1>&2 "\
132WARNING: \`$1' is needed, and you do not seem to have it handy on your
133         system.  You might have modified some files without having the
134         proper tools for further handling them.  Check the \`README' file,
135         it often tells you about the needed prerequirements for installing
136         this package.  You may also peek at any GNU archive site, in case
137         some other package would contain this missing \`$1' program."
138    exit 1
139    ;;
140esac
141
142exit 0
143