annotate src/opus-1.3/missing @ 70:9e21af8f0420

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