annotate src/portaudio/missing @ 99:c6e1ae789cfb

Add Vamp builds
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 20 Mar 2013 16:05:58 +0000
parents 8a15ff55d9af
children
rev   line source
cannam@89 1 #! /bin/sh
cannam@89 2 # Common stub for a few missing GNU programs while installing.
cannam@89 3
cannam@89 4 scriptversion=2009-04-28.21; # UTC
cannam@89 5
cannam@89 6 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
cannam@89 7 # 2008, 2009 Free Software Foundation, Inc.
cannam@89 8 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
cannam@89 9
cannam@89 10 # This program is free software; you can redistribute it and/or modify
cannam@89 11 # it under the terms of the GNU General Public License as published by
cannam@89 12 # the Free Software Foundation; either version 2, or (at your option)
cannam@89 13 # any later version.
cannam@89 14
cannam@89 15 # This program is distributed in the hope that it will be useful,
cannam@89 16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@89 17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@89 18 # GNU General Public License for more details.
cannam@89 19
cannam@89 20 # You should have received a copy of the GNU General Public License
cannam@89 21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
cannam@89 22
cannam@89 23 # As a special exception to the GNU General Public License, if you
cannam@89 24 # distribute this file as part of a program that contains a
cannam@89 25 # configuration script generated by Autoconf, you may include it under
cannam@89 26 # the same distribution terms that you use for the rest of that program.
cannam@89 27
cannam@89 28 if test $# -eq 0; then
cannam@89 29 echo 1>&2 "Try \`$0 --help' for more information"
cannam@89 30 exit 1
cannam@89 31 fi
cannam@89 32
cannam@89 33 run=:
cannam@89 34 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
cannam@89 35 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
cannam@89 36
cannam@89 37 # In the cases where this matters, `missing' is being run in the
cannam@89 38 # srcdir already.
cannam@89 39 if test -f configure.ac; then
cannam@89 40 configure_ac=configure.ac
cannam@89 41 else
cannam@89 42 configure_ac=configure.in
cannam@89 43 fi
cannam@89 44
cannam@89 45 msg="missing on your system"
cannam@89 46
cannam@89 47 case $1 in
cannam@89 48 --run)
cannam@89 49 # Try to run requested program, and just exit if it succeeds.
cannam@89 50 run=
cannam@89 51 shift
cannam@89 52 "$@" && exit 0
cannam@89 53 # Exit code 63 means version mismatch. This often happens
cannam@89 54 # when the user try to use an ancient version of a tool on
cannam@89 55 # a file that requires a minimum version. In this case we
cannam@89 56 # we should proceed has if the program had been absent, or
cannam@89 57 # if --run hadn't been passed.
cannam@89 58 if test $? = 63; then
cannam@89 59 run=:
cannam@89 60 msg="probably too old"
cannam@89 61 fi
cannam@89 62 ;;
cannam@89 63
cannam@89 64 -h|--h|--he|--hel|--help)
cannam@89 65 echo "\
cannam@89 66 $0 [OPTION]... PROGRAM [ARGUMENT]...
cannam@89 67
cannam@89 68 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
cannam@89 69 error status if there is no known handling for PROGRAM.
cannam@89 70
cannam@89 71 Options:
cannam@89 72 -h, --help display this help and exit
cannam@89 73 -v, --version output version information and exit
cannam@89 74 --run try to run the given command, and emulate it if it fails
cannam@89 75
cannam@89 76 Supported PROGRAM values:
cannam@89 77 aclocal touch file \`aclocal.m4'
cannam@89 78 autoconf touch file \`configure'
cannam@89 79 autoheader touch file \`config.h.in'
cannam@89 80 autom4te touch the output file, or create a stub one
cannam@89 81 automake touch all \`Makefile.in' files
cannam@89 82 bison create \`y.tab.[ch]', if possible, from existing .[ch]
cannam@89 83 flex create \`lex.yy.c', if possible, from existing .c
cannam@89 84 help2man touch the output file
cannam@89 85 lex create \`lex.yy.c', if possible, from existing .c
cannam@89 86 makeinfo touch the output file
cannam@89 87 tar try tar, gnutar, gtar, then tar without non-portable flags
cannam@89 88 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
cannam@89 89
cannam@89 90 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
cannam@89 91 \`g' are ignored when checking the name.
cannam@89 92
cannam@89 93 Send bug reports to <bug-automake@gnu.org>."
cannam@89 94 exit $?
cannam@89 95 ;;
cannam@89 96
cannam@89 97 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
cannam@89 98 echo "missing $scriptversion (GNU Automake)"
cannam@89 99 exit $?
cannam@89 100 ;;
cannam@89 101
cannam@89 102 -*)
cannam@89 103 echo 1>&2 "$0: Unknown \`$1' option"
cannam@89 104 echo 1>&2 "Try \`$0 --help' for more information"
cannam@89 105 exit 1
cannam@89 106 ;;
cannam@89 107
cannam@89 108 esac
cannam@89 109
cannam@89 110 # normalize program name to check for.
cannam@89 111 program=`echo "$1" | sed '
cannam@89 112 s/^gnu-//; t
cannam@89 113 s/^gnu//; t
cannam@89 114 s/^g//; t'`
cannam@89 115
cannam@89 116 # Now exit if we have it, but it failed. Also exit now if we
cannam@89 117 # don't have it and --version was passed (most likely to detect
cannam@89 118 # the program). This is about non-GNU programs, so use $1 not
cannam@89 119 # $program.
cannam@89 120 case $1 in
cannam@89 121 lex*|yacc*)
cannam@89 122 # Not GNU programs, they don't have --version.
cannam@89 123 ;;
cannam@89 124
cannam@89 125 tar*)
cannam@89 126 if test -n "$run"; then
cannam@89 127 echo 1>&2 "ERROR: \`tar' requires --run"
cannam@89 128 exit 1
cannam@89 129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
cannam@89 130 exit 1
cannam@89 131 fi
cannam@89 132 ;;
cannam@89 133
cannam@89 134 *)
cannam@89 135 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
cannam@89 136 # We have it, but it failed.
cannam@89 137 exit 1
cannam@89 138 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
cannam@89 139 # Could not run --version or --help. This is probably someone
cannam@89 140 # running `$TOOL --version' or `$TOOL --help' to check whether
cannam@89 141 # $TOOL exists and not knowing $TOOL uses missing.
cannam@89 142 exit 1
cannam@89 143 fi
cannam@89 144 ;;
cannam@89 145 esac
cannam@89 146
cannam@89 147 # If it does not exist, or fails to run (possibly an outdated version),
cannam@89 148 # try to emulate it.
cannam@89 149 case $program in
cannam@89 150 aclocal*)
cannam@89 151 echo 1>&2 "\
cannam@89 152 WARNING: \`$1' is $msg. You should only need it if
cannam@89 153 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
cannam@89 154 to install the \`Automake' and \`Perl' packages. Grab them from
cannam@89 155 any GNU archive site."
cannam@89 156 touch aclocal.m4
cannam@89 157 ;;
cannam@89 158
cannam@89 159 autoconf*)
cannam@89 160 echo 1>&2 "\
cannam@89 161 WARNING: \`$1' is $msg. You should only need it if
cannam@89 162 you modified \`${configure_ac}'. You might want to install the
cannam@89 163 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
cannam@89 164 archive site."
cannam@89 165 touch configure
cannam@89 166 ;;
cannam@89 167
cannam@89 168 autoheader*)
cannam@89 169 echo 1>&2 "\
cannam@89 170 WARNING: \`$1' is $msg. You should only need it if
cannam@89 171 you modified \`acconfig.h' or \`${configure_ac}'. You might want
cannam@89 172 to install the \`Autoconf' and \`GNU m4' packages. Grab them
cannam@89 173 from any GNU archive site."
cannam@89 174 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
cannam@89 175 test -z "$files" && files="config.h"
cannam@89 176 touch_files=
cannam@89 177 for f in $files; do
cannam@89 178 case $f in
cannam@89 179 *:*) touch_files="$touch_files "`echo "$f" |
cannam@89 180 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
cannam@89 181 *) touch_files="$touch_files $f.in";;
cannam@89 182 esac
cannam@89 183 done
cannam@89 184 touch $touch_files
cannam@89 185 ;;
cannam@89 186
cannam@89 187 automake*)
cannam@89 188 echo 1>&2 "\
cannam@89 189 WARNING: \`$1' is $msg. You should only need it if
cannam@89 190 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
cannam@89 191 You might want to install the \`Automake' and \`Perl' packages.
cannam@89 192 Grab them from any GNU archive site."
cannam@89 193 find . -type f -name Makefile.am -print |
cannam@89 194 sed 's/\.am$/.in/' |
cannam@89 195 while read f; do touch "$f"; done
cannam@89 196 ;;
cannam@89 197
cannam@89 198 autom4te*)
cannam@89 199 echo 1>&2 "\
cannam@89 200 WARNING: \`$1' is needed, but is $msg.
cannam@89 201 You might have modified some files without having the
cannam@89 202 proper tools for further handling them.
cannam@89 203 You can get \`$1' as part of \`Autoconf' from any GNU
cannam@89 204 archive site."
cannam@89 205
cannam@89 206 file=`echo "$*" | sed -n "$sed_output"`
cannam@89 207 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
cannam@89 208 if test -f "$file"; then
cannam@89 209 touch $file
cannam@89 210 else
cannam@89 211 test -z "$file" || exec >$file
cannam@89 212 echo "#! /bin/sh"
cannam@89 213 echo "# Created by GNU Automake missing as a replacement of"
cannam@89 214 echo "# $ $@"
cannam@89 215 echo "exit 0"
cannam@89 216 chmod +x $file
cannam@89 217 exit 1
cannam@89 218 fi
cannam@89 219 ;;
cannam@89 220
cannam@89 221 bison*|yacc*)
cannam@89 222 echo 1>&2 "\
cannam@89 223 WARNING: \`$1' $msg. You should only need it if
cannam@89 224 you modified a \`.y' file. You may need the \`Bison' package
cannam@89 225 in order for those modifications to take effect. You can get
cannam@89 226 \`Bison' from any GNU archive site."
cannam@89 227 rm -f y.tab.c y.tab.h
cannam@89 228 if test $# -ne 1; then
cannam@89 229 eval LASTARG="\${$#}"
cannam@89 230 case $LASTARG in
cannam@89 231 *.y)
cannam@89 232 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
cannam@89 233 if test -f "$SRCFILE"; then
cannam@89 234 cp "$SRCFILE" y.tab.c
cannam@89 235 fi
cannam@89 236 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
cannam@89 237 if test -f "$SRCFILE"; then
cannam@89 238 cp "$SRCFILE" y.tab.h
cannam@89 239 fi
cannam@89 240 ;;
cannam@89 241 esac
cannam@89 242 fi
cannam@89 243 if test ! -f y.tab.h; then
cannam@89 244 echo >y.tab.h
cannam@89 245 fi
cannam@89 246 if test ! -f y.tab.c; then
cannam@89 247 echo 'main() { return 0; }' >y.tab.c
cannam@89 248 fi
cannam@89 249 ;;
cannam@89 250
cannam@89 251 lex*|flex*)
cannam@89 252 echo 1>&2 "\
cannam@89 253 WARNING: \`$1' is $msg. You should only need it if
cannam@89 254 you modified a \`.l' file. You may need the \`Flex' package
cannam@89 255 in order for those modifications to take effect. You can get
cannam@89 256 \`Flex' from any GNU archive site."
cannam@89 257 rm -f lex.yy.c
cannam@89 258 if test $# -ne 1; then
cannam@89 259 eval LASTARG="\${$#}"
cannam@89 260 case $LASTARG in
cannam@89 261 *.l)
cannam@89 262 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
cannam@89 263 if test -f "$SRCFILE"; then
cannam@89 264 cp "$SRCFILE" lex.yy.c
cannam@89 265 fi
cannam@89 266 ;;
cannam@89 267 esac
cannam@89 268 fi
cannam@89 269 if test ! -f lex.yy.c; then
cannam@89 270 echo 'main() { return 0; }' >lex.yy.c
cannam@89 271 fi
cannam@89 272 ;;
cannam@89 273
cannam@89 274 help2man*)
cannam@89 275 echo 1>&2 "\
cannam@89 276 WARNING: \`$1' is $msg. You should only need it if
cannam@89 277 you modified a dependency of a manual page. You may need the
cannam@89 278 \`Help2man' package in order for those modifications to take
cannam@89 279 effect. You can get \`Help2man' from any GNU archive site."
cannam@89 280
cannam@89 281 file=`echo "$*" | sed -n "$sed_output"`
cannam@89 282 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
cannam@89 283 if test -f "$file"; then
cannam@89 284 touch $file
cannam@89 285 else
cannam@89 286 test -z "$file" || exec >$file
cannam@89 287 echo ".ab help2man is required to generate this page"
cannam@89 288 exit $?
cannam@89 289 fi
cannam@89 290 ;;
cannam@89 291
cannam@89 292 makeinfo*)
cannam@89 293 echo 1>&2 "\
cannam@89 294 WARNING: \`$1' is $msg. You should only need it if
cannam@89 295 you modified a \`.texi' or \`.texinfo' file, or any other file
cannam@89 296 indirectly affecting the aspect of the manual. The spurious
cannam@89 297 call might also be the consequence of using a buggy \`make' (AIX,
cannam@89 298 DU, IRIX). You might want to install the \`Texinfo' package or
cannam@89 299 the \`GNU make' package. Grab either from any GNU archive site."
cannam@89 300 # The file to touch is that specified with -o ...
cannam@89 301 file=`echo "$*" | sed -n "$sed_output"`
cannam@89 302 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
cannam@89 303 if test -z "$file"; then
cannam@89 304 # ... or it is the one specified with @setfilename ...
cannam@89 305 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
cannam@89 306 file=`sed -n '
cannam@89 307 /^@setfilename/{
cannam@89 308 s/.* \([^ ]*\) *$/\1/
cannam@89 309 p
cannam@89 310 q
cannam@89 311 }' $infile`
cannam@89 312 # ... or it is derived from the source name (dir/f.texi becomes f.info)
cannam@89 313 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
cannam@89 314 fi
cannam@89 315 # If the file does not exist, the user really needs makeinfo;
cannam@89 316 # let's fail without touching anything.
cannam@89 317 test -f $file || exit 1
cannam@89 318 touch $file
cannam@89 319 ;;
cannam@89 320
cannam@89 321 tar*)
cannam@89 322 shift
cannam@89 323
cannam@89 324 # We have already tried tar in the generic part.
cannam@89 325 # Look for gnutar/gtar before invocation to avoid ugly error
cannam@89 326 # messages.
cannam@89 327 if (gnutar --version > /dev/null 2>&1); then
cannam@89 328 gnutar "$@" && exit 0
cannam@89 329 fi
cannam@89 330 if (gtar --version > /dev/null 2>&1); then
cannam@89 331 gtar "$@" && exit 0
cannam@89 332 fi
cannam@89 333 firstarg="$1"
cannam@89 334 if shift; then
cannam@89 335 case $firstarg in
cannam@89 336 *o*)
cannam@89 337 firstarg=`echo "$firstarg" | sed s/o//`
cannam@89 338 tar "$firstarg" "$@" && exit 0
cannam@89 339 ;;
cannam@89 340 esac
cannam@89 341 case $firstarg in
cannam@89 342 *h*)
cannam@89 343 firstarg=`echo "$firstarg" | sed s/h//`
cannam@89 344 tar "$firstarg" "$@" && exit 0
cannam@89 345 ;;
cannam@89 346 esac
cannam@89 347 fi
cannam@89 348
cannam@89 349 echo 1>&2 "\
cannam@89 350 WARNING: I can't seem to be able to run \`tar' with the given arguments.
cannam@89 351 You may want to install GNU tar or Free paxutils, or check the
cannam@89 352 command line arguments."
cannam@89 353 exit 1
cannam@89 354 ;;
cannam@89 355
cannam@89 356 *)
cannam@89 357 echo 1>&2 "\
cannam@89 358 WARNING: \`$1' is needed, and is $msg.
cannam@89 359 You might have modified some files without having the
cannam@89 360 proper tools for further handling them. Check the \`README' file,
cannam@89 361 it often tells you about the needed prerequisites for installing
cannam@89 362 this package. You may also peek at any GNU archive site, in case
cannam@89 363 some other package would contain this missing \`$1' program."
cannam@89 364 exit 1
cannam@89 365 ;;
cannam@89 366 esac
cannam@89 367
cannam@89 368 exit 0
cannam@89 369
cannam@89 370 # Local variables:
cannam@89 371 # eval: (add-hook 'write-file-hooks 'time-stamp)
cannam@89 372 # time-stamp-start: "scriptversion="
cannam@89 373 # time-stamp-format: "%:y-%02m-%02d.%02H"
cannam@89 374 # time-stamp-time-zone: "UTC"
cannam@89 375 # time-stamp-end: "; # UTC"
cannam@89 376 # End: