annotate src/fftw-3.3.5/missing @ 42:2cd0e3b3e1fd

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