annotate kdiff3/admin/missing @ 6:a23681732506

Files have moved into the src directory.
author joachim99
date Mon, 06 Oct 2003 18:32:37 +0000
parents 53b8ecbce0cb
children 415083d043f3
rev   line source
joachim99@2 1 #! /bin/sh
joachim99@2 2 # Common stub for a few missing GNU programs while installing.
joachim99@2 3 # Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
joachim99@2 4 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
joachim99@2 5
joachim99@2 6 # This program is free software; you can redistribute it and/or modify
joachim99@2 7 # it under the terms of the GNU General Public License as published by
joachim99@2 8 # the Free Software Foundation; either version 2, or (at your option)
joachim99@2 9 # any later version.
joachim99@2 10
joachim99@2 11 # This program is distributed in the hope that it will be useful,
joachim99@2 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
joachim99@2 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
joachim99@2 14 # GNU General Public License for more details.
joachim99@2 15
joachim99@2 16 # You should have received a copy of the GNU General Public License
joachim99@2 17 # along with this program; if not, write to the Free Software
joachim99@2 18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
joachim99@2 19 # 02111-1307, USA.
joachim99@2 20
joachim99@2 21 # As a special exception to the GNU General Public License, if you
joachim99@2 22 # distribute this file as part of a program that contains a
joachim99@2 23 # configuration script generated by Autoconf, you may include it under
joachim99@2 24 # the same distribution terms that you use for the rest of that program.
joachim99@2 25
joachim99@2 26 if test $# -eq 0; then
joachim99@2 27 echo 1>&2 "Try \`$0 --help' for more information"
joachim99@2 28 exit 1
joachim99@2 29 fi
joachim99@2 30
joachim99@2 31 run=:
joachim99@2 32
joachim99@2 33 # In the cases where this matters, `missing' is being run in the
joachim99@2 34 # srcdir already.
joachim99@2 35 if test -f configure.ac; then
joachim99@2 36 configure_ac=configure.ac
joachim99@2 37 else
joachim99@2 38 configure_ac=configure.in
joachim99@2 39 fi
joachim99@2 40
joachim99@2 41 case "$1" in
joachim99@2 42 --run)
joachim99@2 43 # Try to run requested program, and just exit if it succeeds.
joachim99@2 44 run=
joachim99@2 45 shift
joachim99@2 46 "$@" && exit 0
joachim99@2 47 ;;
joachim99@2 48 esac
joachim99@2 49
joachim99@2 50 # If it does not exist, or fails to run (possibly an outdated version),
joachim99@2 51 # try to emulate it.
joachim99@2 52 case "$1" in
joachim99@2 53
joachim99@2 54 -h|--h|--he|--hel|--help)
joachim99@2 55 echo "\
joachim99@2 56 $0 [OPTION]... PROGRAM [ARGUMENT]...
joachim99@2 57
joachim99@2 58 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
joachim99@2 59 error status if there is no known handling for PROGRAM.
joachim99@2 60
joachim99@2 61 Options:
joachim99@2 62 -h, --help display this help and exit
joachim99@2 63 -v, --version output version information and exit
joachim99@2 64 --run try to run the given command, and emulate it if it fails
joachim99@2 65
joachim99@2 66 Supported PROGRAM values:
joachim99@2 67 aclocal touch file \`aclocal.m4'
joachim99@2 68 autoconf touch file \`configure'
joachim99@2 69 autoheader touch file \`config.h.in'
joachim99@2 70 automake touch all \`Makefile.in' files
joachim99@2 71 bison create \`y.tab.[ch]', if possible, from existing .[ch]
joachim99@2 72 flex create \`lex.yy.c', if possible, from existing .c
joachim99@2 73 help2man touch the output file
joachim99@2 74 lex create \`lex.yy.c', if possible, from existing .c
joachim99@2 75 makeinfo touch the output file
joachim99@2 76 tar try tar, gnutar, gtar, then tar without non-portable flags
joachim99@2 77 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
joachim99@2 78 ;;
joachim99@2 79
joachim99@2 80 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
joachim99@2 81 echo "missing 0.3 - GNU automake"
joachim99@2 82 ;;
joachim99@2 83
joachim99@2 84 -*)
joachim99@2 85 echo 1>&2 "$0: Unknown \`$1' option"
joachim99@2 86 echo 1>&2 "Try \`$0 --help' for more information"
joachim99@2 87 exit 1
joachim99@2 88 ;;
joachim99@2 89
joachim99@2 90 aclocal)
joachim99@2 91 echo 1>&2 "\
joachim99@2 92 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 93 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
joachim99@2 94 to install the \`Automake' and \`Perl' packages. Grab them from
joachim99@2 95 any GNU archive site."
joachim99@2 96 touch aclocal.m4
joachim99@2 97 ;;
joachim99@2 98
joachim99@2 99 autoconf)
joachim99@2 100 echo 1>&2 "\
joachim99@2 101 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 102 you modified \`${configure_ac}'. You might want to install the
joachim99@2 103 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
joachim99@2 104 archive site."
joachim99@2 105 touch configure
joachim99@2 106 ;;
joachim99@2 107
joachim99@2 108 autoheader)
joachim99@2 109 echo 1>&2 "\
joachim99@2 110 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 111 you modified \`acconfig.h' or \`${configure_ac}'. You might want
joachim99@2 112 to install the \`Autoconf' and \`GNU m4' packages. Grab them
joachim99@2 113 from any GNU archive site."
joachim99@2 114 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
joachim99@2 115 test -z "$files" && files="config.h"
joachim99@2 116 touch_files=
joachim99@2 117 for f in $files; do
joachim99@2 118 case "$f" in
joachim99@2 119 *:*) touch_files="$touch_files "`echo "$f" |
joachim99@2 120 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
joachim99@2 121 *) touch_files="$touch_files $f.in";;
joachim99@2 122 esac
joachim99@2 123 done
joachim99@2 124 touch $touch_files
joachim99@2 125 ;;
joachim99@2 126
joachim99@2 127 automake)
joachim99@2 128 echo 1>&2 "\
joachim99@2 129 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 130 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
joachim99@2 131 You might want to install the \`Automake' and \`Perl' packages.
joachim99@2 132 Grab them from any GNU archive site."
joachim99@2 133 find . -type f -name Makefile.am -print |
joachim99@2 134 sed 's/\.am$/.in/' |
joachim99@2 135 while read f; do touch "$f"; done
joachim99@2 136 ;;
joachim99@2 137
joachim99@2 138 bison|yacc)
joachim99@2 139 echo 1>&2 "\
joachim99@2 140 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 141 you modified a \`.y' file. You may need the \`Bison' package
joachim99@2 142 in order for those modifications to take effect. You can get
joachim99@2 143 \`Bison' from any GNU archive site."
joachim99@2 144 rm -f y.tab.c y.tab.h
joachim99@2 145 if [ $# -ne 1 ]; then
joachim99@2 146 eval LASTARG="\${$#}"
joachim99@2 147 case "$LASTARG" in
joachim99@2 148 *.y)
joachim99@2 149 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
joachim99@2 150 if [ -f "$SRCFILE" ]; then
joachim99@2 151 cp "$SRCFILE" y.tab.c
joachim99@2 152 fi
joachim99@2 153 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
joachim99@2 154 if [ -f "$SRCFILE" ]; then
joachim99@2 155 cp "$SRCFILE" y.tab.h
joachim99@2 156 fi
joachim99@2 157 ;;
joachim99@2 158 esac
joachim99@2 159 fi
joachim99@2 160 if [ ! -f y.tab.h ]; then
joachim99@2 161 echo >y.tab.h
joachim99@2 162 fi
joachim99@2 163 if [ ! -f y.tab.c ]; then
joachim99@2 164 echo 'main() { return 0; }' >y.tab.c
joachim99@2 165 fi
joachim99@2 166 ;;
joachim99@2 167
joachim99@2 168 lex|flex)
joachim99@2 169 echo 1>&2 "\
joachim99@2 170 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 171 you modified a \`.l' file. You may need the \`Flex' package
joachim99@2 172 in order for those modifications to take effect. You can get
joachim99@2 173 \`Flex' from any GNU archive site."
joachim99@2 174 rm -f lex.yy.c
joachim99@2 175 if [ $# -ne 1 ]; then
joachim99@2 176 eval LASTARG="\${$#}"
joachim99@2 177 case "$LASTARG" in
joachim99@2 178 *.l)
joachim99@2 179 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
joachim99@2 180 if [ -f "$SRCFILE" ]; then
joachim99@2 181 cp "$SRCFILE" lex.yy.c
joachim99@2 182 fi
joachim99@2 183 ;;
joachim99@2 184 esac
joachim99@2 185 fi
joachim99@2 186 if [ ! -f lex.yy.c ]; then
joachim99@2 187 echo 'main() { return 0; }' >lex.yy.c
joachim99@2 188 fi
joachim99@2 189 ;;
joachim99@2 190
joachim99@2 191 help2man)
joachim99@2 192 echo 1>&2 "\
joachim99@2 193 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 194 you modified a dependency of a manual page. You may need the
joachim99@2 195 \`Help2man' package in order for those modifications to take
joachim99@2 196 effect. You can get \`Help2man' from any GNU archive site."
joachim99@2 197
joachim99@2 198 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
joachim99@2 199 if test -z "$file"; then
joachim99@2 200 file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
joachim99@2 201 fi
joachim99@2 202 if [ -f "$file" ]; then
joachim99@2 203 touch $file
joachim99@2 204 else
joachim99@2 205 test -z "$file" || exec >$file
joachim99@2 206 echo ".ab help2man is required to generate this page"
joachim99@2 207 exit 1
joachim99@2 208 fi
joachim99@2 209 ;;
joachim99@2 210
joachim99@2 211 makeinfo)
joachim99@2 212 if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
joachim99@2 213 # We have makeinfo, but it failed.
joachim99@2 214 exit 1
joachim99@2 215 fi
joachim99@2 216
joachim99@2 217 echo 1>&2 "\
joachim99@2 218 WARNING: \`$1' is missing on your system. You should only need it if
joachim99@2 219 you modified a \`.texi' or \`.texinfo' file, or any other file
joachim99@2 220 indirectly affecting the aspect of the manual. The spurious
joachim99@2 221 call might also be the consequence of using a buggy \`make' (AIX,
joachim99@2 222 DU, IRIX). You might want to install the \`Texinfo' package or
joachim99@2 223 the \`GNU make' package. Grab either from any GNU archive site."
joachim99@2 224 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
joachim99@2 225 if test -z "$file"; then
joachim99@2 226 file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
joachim99@2 227 file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
joachim99@2 228 fi
joachim99@2 229 touch $file
joachim99@2 230 ;;
joachim99@2 231
joachim99@2 232 tar)
joachim99@2 233 shift
joachim99@2 234 if test -n "$run"; then
joachim99@2 235 echo 1>&2 "ERROR: \`tar' requires --run"
joachim99@2 236 exit 1
joachim99@2 237 fi
joachim99@2 238
joachim99@2 239 # We have already tried tar in the generic part.
joachim99@2 240 # Look for gnutar/gtar before invocation to avoid ugly error
joachim99@2 241 # messages.
joachim99@2 242 if (gnutar --version > /dev/null 2>&1); then
joachim99@2 243 gnutar ${1+"$@"} && exit 0
joachim99@2 244 fi
joachim99@2 245 if (gtar --version > /dev/null 2>&1); then
joachim99@2 246 gtar ${1+"$@"} && exit 0
joachim99@2 247 fi
joachim99@2 248 firstarg="$1"
joachim99@2 249 if shift; then
joachim99@2 250 case "$firstarg" in
joachim99@2 251 *o*)
joachim99@2 252 firstarg=`echo "$firstarg" | sed s/o//`
joachim99@2 253 tar "$firstarg" ${1+"$@"} && exit 0
joachim99@2 254 ;;
joachim99@2 255 esac
joachim99@2 256 case "$firstarg" in
joachim99@2 257 *h*)
joachim99@2 258 firstarg=`echo "$firstarg" | sed s/h//`
joachim99@2 259 tar "$firstarg" ${1+"$@"} && exit 0
joachim99@2 260 ;;
joachim99@2 261 esac
joachim99@2 262 fi
joachim99@2 263
joachim99@2 264 echo 1>&2 "\
joachim99@2 265 WARNING: I can't seem to be able to run \`tar' with the given arguments.
joachim99@2 266 You may want to install GNU tar or Free paxutils, or check the
joachim99@2 267 command line arguments."
joachim99@2 268 exit 1
joachim99@2 269 ;;
joachim99@2 270
joachim99@2 271 *)
joachim99@2 272 echo 1>&2 "\
joachim99@2 273 WARNING: \`$1' is needed, and you do not seem to have it handy on your
joachim99@2 274 system. You might have modified some files without having the
joachim99@2 275 proper tools for further handling them. Check the \`README' file,
joachim99@2 276 it often tells you about the needed prerequirements for installing
joachim99@2 277 this package. You may also peek at any GNU archive site, in case
joachim99@2 278 some other package would contain this missing \`$1' program."
joachim99@2 279 exit 1
joachim99@2 280 ;;
joachim99@2 281 esac
joachim99@2 282
joachim99@2 283 exit 0