15e9cd1aeSAssar Westerlund#! /bin/sh 25e9cd1aeSAssar Westerlund# Common stub for a few missing GNU programs while installing. 35e9cd1aeSAssar Westerlund# Copyright (C) 1996, 1997 Free Software Foundation, Inc. 45e9cd1aeSAssar Westerlund# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996. 55e9cd1aeSAssar Westerlund 65e9cd1aeSAssar Westerlund# This program is free software; you can redistribute it and/or modify 75e9cd1aeSAssar Westerlund# it under the terms of the GNU General Public License as published by 85e9cd1aeSAssar Westerlund# the Free Software Foundation; either version 2, or (at your option) 95e9cd1aeSAssar Westerlund# any later version. 105e9cd1aeSAssar Westerlund 115e9cd1aeSAssar Westerlund# This program is distributed in the hope that it will be useful, 125e9cd1aeSAssar Westerlund# but WITHOUT ANY WARRANTY; without even the implied warranty of 135e9cd1aeSAssar Westerlund# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 145e9cd1aeSAssar Westerlund# GNU General Public License for more details. 155e9cd1aeSAssar Westerlund 165e9cd1aeSAssar Westerlund# You should have received a copy of the GNU General Public License 175e9cd1aeSAssar Westerlund# along with this program; if not, write to the Free Software 185e9cd1aeSAssar Westerlund# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 195e9cd1aeSAssar Westerlund# 02111-1307, USA. 205e9cd1aeSAssar Westerlund 215e9cd1aeSAssar Westerlundif test $# -eq 0; then 225e9cd1aeSAssar Westerlund echo 1>&2 "Try \`$0 --help' for more information" 235e9cd1aeSAssar Westerlund exit 1 245e9cd1aeSAssar Westerlundfi 255e9cd1aeSAssar Westerlund 265e9cd1aeSAssar Westerlundcase "$1" in 275e9cd1aeSAssar Westerlund 285e9cd1aeSAssar Westerlund -h|--h|--he|--hel|--help) 295e9cd1aeSAssar Westerlund echo "\ 305e9cd1aeSAssar Westerlund$0 [OPTION]... PROGRAM [ARGUMENT]... 315e9cd1aeSAssar Westerlund 325e9cd1aeSAssar WesterlundHandle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an 335e9cd1aeSAssar Westerlunderror status if there is no known handling for PROGRAM. 345e9cd1aeSAssar Westerlund 355e9cd1aeSAssar WesterlundOptions: 365e9cd1aeSAssar Westerlund -h, --help display this help and exit 375e9cd1aeSAssar Westerlund -v, --version output version information and exit 385e9cd1aeSAssar Westerlund 395e9cd1aeSAssar WesterlundSupported PROGRAM values: 405e9cd1aeSAssar Westerlund aclocal touch file \`aclocal.m4' 415e9cd1aeSAssar Westerlund autoconf touch file \`configure' 425e9cd1aeSAssar Westerlund autoheader touch file \`config.h.in' 435e9cd1aeSAssar Westerlund automake touch all \`Makefile.in' files 445e9cd1aeSAssar Westerlund bison create \`y.tab.[ch]', if possible, from existing .[ch] 455e9cd1aeSAssar Westerlund flex create \`lex.yy.c', if possible, from existing .c 465e9cd1aeSAssar Westerlund lex create \`lex.yy.c', if possible, from existing .c 475e9cd1aeSAssar Westerlund makeinfo touch the output file 485e9cd1aeSAssar Westerlund yacc create \`y.tab.[ch]', if possible, from existing .[ch]" 495e9cd1aeSAssar Westerlund ;; 505e9cd1aeSAssar Westerlund 515e9cd1aeSAssar Westerlund -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 525e9cd1aeSAssar Westerlund echo "missing - GNU libit 0.0" 535e9cd1aeSAssar Westerlund ;; 545e9cd1aeSAssar Westerlund 555e9cd1aeSAssar Westerlund -*) 565e9cd1aeSAssar Westerlund echo 1>&2 "$0: Unknown \`$1' option" 575e9cd1aeSAssar Westerlund echo 1>&2 "Try \`$0 --help' for more information" 585e9cd1aeSAssar Westerlund exit 1 595e9cd1aeSAssar Westerlund ;; 605e9cd1aeSAssar Westerlund 615e9cd1aeSAssar Westerlund aclocal) 625e9cd1aeSAssar Westerlund echo 1>&2 "\ 635e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 645e9cd1aeSAssar Westerlund you modified \`acinclude.m4' or \`configure.in'. You might want 655e9cd1aeSAssar Westerlund to install the \`Automake' and \`Perl' packages. Grab them from 665e9cd1aeSAssar Westerlund any GNU archive site." 675e9cd1aeSAssar Westerlund touch aclocal.m4 685e9cd1aeSAssar Westerlund ;; 695e9cd1aeSAssar Westerlund 705e9cd1aeSAssar Westerlund autoconf) 715e9cd1aeSAssar Westerlund echo 1>&2 "\ 725e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 735e9cd1aeSAssar Westerlund you modified \`configure.in'. You might want to install the 745e9cd1aeSAssar Westerlund \`Autoconf' and \`GNU m4' packages. Grab them from any GNU 755e9cd1aeSAssar Westerlund archive site." 765e9cd1aeSAssar Westerlund touch configure 775e9cd1aeSAssar Westerlund ;; 785e9cd1aeSAssar Westerlund 795e9cd1aeSAssar Westerlund autoheader) 805e9cd1aeSAssar Westerlund echo 1>&2 "\ 815e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 825e9cd1aeSAssar Westerlund you modified \`acconfig.h' or \`configure.in'. You might want 835e9cd1aeSAssar Westerlund to install the \`Autoconf' and \`GNU m4' packages. Grab them 845e9cd1aeSAssar Westerlund from any GNU archive site." 855e9cd1aeSAssar Westerlund files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` 865e9cd1aeSAssar Westerlund test -z "$files" && files="config.h" 875e9cd1aeSAssar Westerlund touch_files= 885e9cd1aeSAssar Westerlund for f in $files; do 895e9cd1aeSAssar Westerlund case "$f" in 905e9cd1aeSAssar Westerlund *:*) touch_files="$touch_files "`echo "$f" | 915e9cd1aeSAssar Westerlund sed -e 's/^[^:]*://' -e 's/:.*//'`;; 925e9cd1aeSAssar Westerlund *) touch_files="$touch_files $f.in";; 935e9cd1aeSAssar Westerlund esac 945e9cd1aeSAssar Westerlund done 955e9cd1aeSAssar Westerlund touch $touch_files 965e9cd1aeSAssar Westerlund ;; 975e9cd1aeSAssar Westerlund 985e9cd1aeSAssar Westerlund automake) 995e9cd1aeSAssar Westerlund echo 1>&2 "\ 1005e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 1015e9cd1aeSAssar Westerlund you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. 1025e9cd1aeSAssar Westerlund You might want to install the \`Automake' and \`Perl' packages. 1035e9cd1aeSAssar Westerlund Grab them from any GNU archive site." 1045e9cd1aeSAssar Westerlund find . -type f -name Makefile.am -print | 1055e9cd1aeSAssar Westerlund sed 's/\.am$/.in/' | 1065e9cd1aeSAssar Westerlund while read f; do touch "$f"; done 1075e9cd1aeSAssar Westerlund ;; 1085e9cd1aeSAssar Westerlund 1095e9cd1aeSAssar Westerlund bison|yacc) 1105e9cd1aeSAssar Westerlund echo 1>&2 "\ 1115e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 1125e9cd1aeSAssar Westerlund you modified a \`.y' file. You may need the \`Bison' package 1135e9cd1aeSAssar Westerlund in order for those modifications to take effect. You can get 1145e9cd1aeSAssar Westerlund \`Bison' from any GNU archive site." 1155e9cd1aeSAssar Westerlund rm -f y.tab.c y.tab.h 1165e9cd1aeSAssar Westerlund if [ $# -ne 1 ]; then 1175e9cd1aeSAssar Westerlund eval LASTARG="\${$#}" 1185e9cd1aeSAssar Westerlund case "$LASTARG" in 1195e9cd1aeSAssar Westerlund *.y) 1205e9cd1aeSAssar Westerlund SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` 1215e9cd1aeSAssar Westerlund if [ -f "$SRCFILE" ]; then 1225e9cd1aeSAssar Westerlund cp "$SRCFILE" y.tab.c 1235e9cd1aeSAssar Westerlund fi 1245e9cd1aeSAssar Westerlund SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` 1255e9cd1aeSAssar Westerlund if [ -f "$SRCFILE" ]; then 1265e9cd1aeSAssar Westerlund cp "$SRCFILE" y.tab.h 1275e9cd1aeSAssar Westerlund fi 1285e9cd1aeSAssar Westerlund ;; 1295e9cd1aeSAssar Westerlund esac 1305e9cd1aeSAssar Westerlund fi 1315e9cd1aeSAssar Westerlund if [ ! -f y.tab.h ]; then 1325e9cd1aeSAssar Westerlund echo >y.tab.h 1335e9cd1aeSAssar Westerlund fi 1345e9cd1aeSAssar Westerlund if [ ! -f y.tab.c ]; then 1355e9cd1aeSAssar Westerlund echo 'main() { return 0; }' >y.tab.c 1365e9cd1aeSAssar Westerlund fi 1375e9cd1aeSAssar Westerlund ;; 1385e9cd1aeSAssar Westerlund 1395e9cd1aeSAssar Westerlund lex|flex) 1405e9cd1aeSAssar Westerlund echo 1>&2 "\ 1415e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 1425e9cd1aeSAssar Westerlund you modified a \`.l' file. You may need the \`Flex' package 1435e9cd1aeSAssar Westerlund in order for those modifications to take effect. You can get 1445e9cd1aeSAssar Westerlund \`Flex' from any GNU archive site." 1455e9cd1aeSAssar Westerlund rm -f lex.yy.c 1465e9cd1aeSAssar Westerlund if [ $# -ne 1 ]; then 1475e9cd1aeSAssar Westerlund eval LASTARG="\${$#}" 1485e9cd1aeSAssar Westerlund case "$LASTARG" in 1495e9cd1aeSAssar Westerlund *.l) 1505e9cd1aeSAssar Westerlund SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` 1515e9cd1aeSAssar Westerlund if [ -f "$SRCFILE" ]; then 1525e9cd1aeSAssar Westerlund cp "$SRCFILE" lex.yy.c 1535e9cd1aeSAssar Westerlund fi 1545e9cd1aeSAssar Westerlund ;; 1555e9cd1aeSAssar Westerlund esac 1565e9cd1aeSAssar Westerlund fi 1575e9cd1aeSAssar Westerlund if [ ! -f lex.yy.c ]; then 1585e9cd1aeSAssar Westerlund echo 'main() { return 0; }' >lex.yy.c 1595e9cd1aeSAssar Westerlund fi 1605e9cd1aeSAssar Westerlund ;; 1615e9cd1aeSAssar Westerlund 1625e9cd1aeSAssar Westerlund makeinfo) 1635e9cd1aeSAssar Westerlund echo 1>&2 "\ 1645e9cd1aeSAssar WesterlundWARNING: \`$1' is missing on your system. You should only need it if 1655e9cd1aeSAssar Westerlund you modified a \`.texi' or \`.texinfo' file, or any other file 1665e9cd1aeSAssar Westerlund indirectly affecting the aspect of the manual. The spurious 1675e9cd1aeSAssar Westerlund call might also be the consequence of using a buggy \`make' (AIX, 1685e9cd1aeSAssar Westerlund DU, IRIX). You might want to install the \`Texinfo' package or 1695e9cd1aeSAssar Westerlund the \`GNU make' package. Grab either from any GNU archive site." 1705e9cd1aeSAssar Westerlund file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` 1715e9cd1aeSAssar Westerlund if test -z "$file"; then 1725e9cd1aeSAssar Westerlund file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` 1735e9cd1aeSAssar Westerlund file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` 1745e9cd1aeSAssar Westerlund fi 1755e9cd1aeSAssar Westerlund touch $file 1765e9cd1aeSAssar Westerlund ;; 1775e9cd1aeSAssar Westerlund 1785e9cd1aeSAssar Westerlund *) 1795e9cd1aeSAssar Westerlund echo 1>&2 "\ 1805e9cd1aeSAssar WesterlundWARNING: \`$1' is needed, and you do not seem to have it handy on your 1815e9cd1aeSAssar Westerlund system. You might have modified some files without having the 1825e9cd1aeSAssar Westerlund proper tools for further handling them. Check the \`README' file, 1835e9cd1aeSAssar Westerlund it often tells you about the needed prerequirements for installing 1845e9cd1aeSAssar Westerlund this package. You may also peek at any GNU archive site, in case 1855e9cd1aeSAssar Westerlund some other package would contain this missing \`$1' program." 1865e9cd1aeSAssar Westerlund exit 1 1875e9cd1aeSAssar Westerlund ;; 1885e9cd1aeSAssar Westerlundesac 1895e9cd1aeSAssar Westerlund 1905e9cd1aeSAssar Westerlundexit 0 191