annotate src/portaudio_20161030/missing @ 169:223a55898ab9 tip default

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