annotate src/portaudio_20161030_catalina_patch/missing @ 162:d43aab368df9

Duplicate for patch testing
author Chris Cannam <cannam@all-day-breakfast.com>
date Wed, 30 Oct 2019 11:25:10 +0000
parents
children
rev   line source
cannam@162 1 #! /bin/sh
cannam@162 2 # Common wrapper for a few potentially missing GNU programs.
cannam@162 3
cannam@162 4 scriptversion=2013-10-28.13; # UTC
cannam@162 5
cannam@162 6 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
cannam@162 7 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
cannam@162 8
cannam@162 9 # This program is free software; you can redistribute it and/or modify
cannam@162 10 # it under the terms of the GNU General Public License as published by
cannam@162 11 # the Free Software Foundation; either version 2, or (at your option)
cannam@162 12 # any later version.
cannam@162 13
cannam@162 14 # This program is distributed in the hope that it will be useful,
cannam@162 15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@162 16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@162 17 # GNU General Public License for more details.
cannam@162 18
cannam@162 19 # You should have received a copy of the GNU General Public License
cannam@162 20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
cannam@162 21
cannam@162 22 # As a special exception to the GNU General Public License, if you
cannam@162 23 # distribute this file as part of a program that contains a
cannam@162 24 # configuration script generated by Autoconf, you may include it under
cannam@162 25 # the same distribution terms that you use for the rest of that program.
cannam@162 26
cannam@162 27 if test $# -eq 0; then
cannam@162 28 echo 1>&2 "Try '$0 --help' for more information"
cannam@162 29 exit 1
cannam@162 30 fi
cannam@162 31
cannam@162 32 case $1 in
cannam@162 33
cannam@162 34 --is-lightweight)
cannam@162 35 # Used by our autoconf macros to check whether the available missing
cannam@162 36 # script is modern enough.
cannam@162 37 exit 0
cannam@162 38 ;;
cannam@162 39
cannam@162 40 --run)
cannam@162 41 # Back-compat with the calling convention used by older automake.
cannam@162 42 shift
cannam@162 43 ;;
cannam@162 44
cannam@162 45 -h|--h|--he|--hel|--help)
cannam@162 46 echo "\
cannam@162 47 $0 [OPTION]... PROGRAM [ARGUMENT]...
cannam@162 48
cannam@162 49 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
cannam@162 50 to PROGRAM being missing or too old.
cannam@162 51
cannam@162 52 Options:
cannam@162 53 -h, --help display this help and exit
cannam@162 54 -v, --version output version information and exit
cannam@162 55
cannam@162 56 Supported PROGRAM values:
cannam@162 57 aclocal autoconf autoheader autom4te automake makeinfo
cannam@162 58 bison yacc flex lex help2man
cannam@162 59
cannam@162 60 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
cannam@162 61 'g' are ignored when checking the name.
cannam@162 62
cannam@162 63 Send bug reports to <bug-automake@gnu.org>."
cannam@162 64 exit $?
cannam@162 65 ;;
cannam@162 66
cannam@162 67 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
cannam@162 68 echo "missing $scriptversion (GNU Automake)"
cannam@162 69 exit $?
cannam@162 70 ;;
cannam@162 71
cannam@162 72 -*)
cannam@162 73 echo 1>&2 "$0: unknown '$1' option"
cannam@162 74 echo 1>&2 "Try '$0 --help' for more information"
cannam@162 75 exit 1
cannam@162 76 ;;
cannam@162 77
cannam@162 78 esac
cannam@162 79
cannam@162 80 # Run the given program, remember its exit status.
cannam@162 81 "$@"; st=$?
cannam@162 82
cannam@162 83 # If it succeeded, we are done.
cannam@162 84 test $st -eq 0 && exit 0
cannam@162 85
cannam@162 86 # Also exit now if we it failed (or wasn't found), and '--version' was
cannam@162 87 # passed; such an option is passed most likely to detect whether the
cannam@162 88 # program is present and works.
cannam@162 89 case $2 in --version|--help) exit $st;; esac
cannam@162 90
cannam@162 91 # Exit code 63 means version mismatch. This often happens when the user
cannam@162 92 # tries to use an ancient version of a tool on a file that requires a
cannam@162 93 # minimum version.
cannam@162 94 if test $st -eq 63; then
cannam@162 95 msg="probably too old"
cannam@162 96 elif test $st -eq 127; then
cannam@162 97 # Program was missing.
cannam@162 98 msg="missing on your system"
cannam@162 99 else
cannam@162 100 # Program was found and executed, but failed. Give up.
cannam@162 101 exit $st
cannam@162 102 fi
cannam@162 103
cannam@162 104 perl_URL=http://www.perl.org/
cannam@162 105 flex_URL=http://flex.sourceforge.net/
cannam@162 106 gnu_software_URL=http://www.gnu.org/software
cannam@162 107
cannam@162 108 program_details ()
cannam@162 109 {
cannam@162 110 case $1 in
cannam@162 111 aclocal|automake)
cannam@162 112 echo "The '$1' program is part of the GNU Automake package:"
cannam@162 113 echo "<$gnu_software_URL/automake>"
cannam@162 114 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
cannam@162 115 echo "<$gnu_software_URL/autoconf>"
cannam@162 116 echo "<$gnu_software_URL/m4/>"
cannam@162 117 echo "<$perl_URL>"
cannam@162 118 ;;
cannam@162 119 autoconf|autom4te|autoheader)
cannam@162 120 echo "The '$1' program is part of the GNU Autoconf package:"
cannam@162 121 echo "<$gnu_software_URL/autoconf/>"
cannam@162 122 echo "It also requires GNU m4 and Perl in order to run:"
cannam@162 123 echo "<$gnu_software_URL/m4/>"
cannam@162 124 echo "<$perl_URL>"
cannam@162 125 ;;
cannam@162 126 esac
cannam@162 127 }
cannam@162 128
cannam@162 129 give_advice ()
cannam@162 130 {
cannam@162 131 # Normalize program name to check for.
cannam@162 132 normalized_program=`echo "$1" | sed '
cannam@162 133 s/^gnu-//; t
cannam@162 134 s/^gnu//; t
cannam@162 135 s/^g//; t'`
cannam@162 136
cannam@162 137 printf '%s\n' "'$1' is $msg."
cannam@162 138
cannam@162 139 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
cannam@162 140 case $normalized_program in
cannam@162 141 autoconf*)
cannam@162 142 echo "You should only need it if you modified 'configure.ac',"
cannam@162 143 echo "or m4 files included by it."
cannam@162 144 program_details 'autoconf'
cannam@162 145 ;;
cannam@162 146 autoheader*)
cannam@162 147 echo "You should only need it if you modified 'acconfig.h' or"
cannam@162 148 echo "$configure_deps."
cannam@162 149 program_details 'autoheader'
cannam@162 150 ;;
cannam@162 151 automake*)
cannam@162 152 echo "You should only need it if you modified 'Makefile.am' or"
cannam@162 153 echo "$configure_deps."
cannam@162 154 program_details 'automake'
cannam@162 155 ;;
cannam@162 156 aclocal*)
cannam@162 157 echo "You should only need it if you modified 'acinclude.m4' or"
cannam@162 158 echo "$configure_deps."
cannam@162 159 program_details 'aclocal'
cannam@162 160 ;;
cannam@162 161 autom4te*)
cannam@162 162 echo "You might have modified some maintainer files that require"
cannam@162 163 echo "the 'autom4te' program to be rebuilt."
cannam@162 164 program_details 'autom4te'
cannam@162 165 ;;
cannam@162 166 bison*|yacc*)
cannam@162 167 echo "You should only need it if you modified a '.y' file."
cannam@162 168 echo "You may want to install the GNU Bison package:"
cannam@162 169 echo "<$gnu_software_URL/bison/>"
cannam@162 170 ;;
cannam@162 171 lex*|flex*)
cannam@162 172 echo "You should only need it if you modified a '.l' file."
cannam@162 173 echo "You may want to install the Fast Lexical Analyzer package:"
cannam@162 174 echo "<$flex_URL>"
cannam@162 175 ;;
cannam@162 176 help2man*)
cannam@162 177 echo "You should only need it if you modified a dependency" \
cannam@162 178 "of a man page."
cannam@162 179 echo "You may want to install the GNU Help2man package:"
cannam@162 180 echo "<$gnu_software_URL/help2man/>"
cannam@162 181 ;;
cannam@162 182 makeinfo*)
cannam@162 183 echo "You should only need it if you modified a '.texi' file, or"
cannam@162 184 echo "any other file indirectly affecting the aspect of the manual."
cannam@162 185 echo "You might want to install the Texinfo package:"
cannam@162 186 echo "<$gnu_software_URL/texinfo/>"
cannam@162 187 echo "The spurious makeinfo call might also be the consequence of"
cannam@162 188 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
cannam@162 189 echo "want to install GNU make:"
cannam@162 190 echo "<$gnu_software_URL/make/>"
cannam@162 191 ;;
cannam@162 192 *)
cannam@162 193 echo "You might have modified some files without having the proper"
cannam@162 194 echo "tools for further handling them. Check the 'README' file, it"
cannam@162 195 echo "often tells you about the needed prerequisites for installing"
cannam@162 196 echo "this package. You may also peek at any GNU archive site, in"
cannam@162 197 echo "case some other package contains this missing '$1' program."
cannam@162 198 ;;
cannam@162 199 esac
cannam@162 200 }
cannam@162 201
cannam@162 202 give_advice "$1" | sed -e '1s/^/WARNING: /' \
cannam@162 203 -e '2,$s/^/ /' >&2
cannam@162 204
cannam@162 205 # Propagate the correct exit status (expected to be 127 for a program
cannam@162 206 # not found, 63 for a program that failed due to version mismatch).
cannam@162 207 exit $st
cannam@162 208
cannam@162 209 # Local variables:
cannam@162 210 # eval: (add-hook 'write-file-hooks 'time-stamp)
cannam@162 211 # time-stamp-start: "scriptversion="
cannam@162 212 # time-stamp-format: "%:y-%02m-%02d.%02H"
cannam@162 213 # time-stamp-time-zone: "UTC"
cannam@162 214 # time-stamp-end: "; # UTC"
cannam@162 215 # End: