annotate src/portaudio_20140130/missing @ 77:4edcd14160a5 pa_catalina

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