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