missing 6.1 KB

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