Blame SOURCES/libsodium-1.0.18/missing

ca16be
#! /bin/sh
ca16be
# Common wrapper for a few potentially missing GNU programs.
ca16be
ca16be
scriptversion=2013-10-28.13; # UTC
ca16be
ca16be
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
ca16be
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
ca16be
ca16be
# This program is free software; you can redistribute it and/or modify
ca16be
# it under the terms of the GNU General Public License as published by
ca16be
# the Free Software Foundation; either version 2, or (at your option)
ca16be
# any later version.
ca16be
ca16be
# This program is distributed in the hope that it will be useful,
ca16be
# but WITHOUT ANY WARRANTY; without even the implied warranty of
ca16be
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ca16be
# GNU General Public License for more details.
ca16be
ca16be
# You should have received a copy of the GNU General Public License
ca16be
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
ca16be
ca16be
# As a special exception to the GNU General Public License, if you
ca16be
# distribute this file as part of a program that contains a
ca16be
# configuration script generated by Autoconf, you may include it under
ca16be
# the same distribution terms that you use for the rest of that program.
ca16be
ca16be
if test $# -eq 0; then
ca16be
  echo 1>&2 "Try '$0 --help' for more information"
ca16be
  exit 1
ca16be
fi
ca16be
ca16be
case $1 in
ca16be
ca16be
  --is-lightweight)
ca16be
    # Used by our autoconf macros to check whether the available missing
ca16be
    # script is modern enough.
ca16be
    exit 0
ca16be
    ;;
ca16be
ca16be
  --run)
ca16be
    # Back-compat with the calling convention used by older automake.
ca16be
    shift
ca16be
    ;;
ca16be
ca16be
  -h|--h|--he|--hel|--help)
ca16be
    echo "\
ca16be
$0 [OPTION]... PROGRAM [ARGUMENT]...
ca16be
ca16be
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
ca16be
to PROGRAM being missing or too old.
ca16be
ca16be
Options:
ca16be
  -h, --help      display this help and exit
ca16be
  -v, --version   output version information and exit
ca16be
ca16be
Supported PROGRAM values:
ca16be
  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
ca16be
  bison     yacc      flex         lex       help2man
ca16be
ca16be
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
ca16be
'g' are ignored when checking the name.
ca16be
ca16be
Send bug reports to <bug-automake@gnu.org>."
ca16be
    exit $?
ca16be
    ;;
ca16be
ca16be
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
ca16be
    echo "missing $scriptversion (GNU Automake)"
ca16be
    exit $?
ca16be
    ;;
ca16be
ca16be
  -*)
ca16be
    echo 1>&2 "$0: unknown '$1' option"
ca16be
    echo 1>&2 "Try '$0 --help' for more information"
ca16be
    exit 1
ca16be
    ;;
ca16be
ca16be
esac
ca16be
ca16be
# Run the given program, remember its exit status.
ca16be
"$@"; st=$?
ca16be
ca16be
# If it succeeded, we are done.
ca16be
test $st -eq 0 && exit 0
ca16be
ca16be
# Also exit now if we it failed (or wasn't found), and '--version' was
ca16be
# passed; such an option is passed most likely to detect whether the
ca16be
# program is present and works.
ca16be
case $2 in --version|--help) exit $st;; esac
ca16be
ca16be
# Exit code 63 means version mismatch.  This often happens when the user
ca16be
# tries to use an ancient version of a tool on a file that requires a
ca16be
# minimum version.
ca16be
if test $st -eq 63; then
ca16be
  msg="probably too old"
ca16be
elif test $st -eq 127; then
ca16be
  # Program was missing.
ca16be
  msg="missing on your system"
ca16be
else
ca16be
  # Program was found and executed, but failed.  Give up.
ca16be
  exit $st
ca16be
fi
ca16be
ca16be
perl_URL=http://www.perl.org/
ca16be
flex_URL=http://flex.sourceforge.net/
ca16be
gnu_software_URL=http://www.gnu.org/software
ca16be
ca16be
program_details ()
ca16be
{
ca16be
  case $1 in
ca16be
    aclocal|automake)
ca16be
      echo "The '$1' program is part of the GNU Automake package:"
ca16be
      echo "<$gnu_software_URL/automake>"
ca16be
      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
ca16be
      echo "<$gnu_software_URL/autoconf>"
ca16be
      echo "<$gnu_software_URL/m4/>"
ca16be
      echo "<$perl_URL>"
ca16be
      ;;
ca16be
    autoconf|autom4te|autoheader)
ca16be
      echo "The '$1' program is part of the GNU Autoconf package:"
ca16be
      echo "<$gnu_software_URL/autoconf/>"
ca16be
      echo "It also requires GNU m4 and Perl in order to run:"
ca16be
      echo "<$gnu_software_URL/m4/>"
ca16be
      echo "<$perl_URL>"
ca16be
      ;;
ca16be
  esac
ca16be
}
ca16be
ca16be
give_advice ()
ca16be
{
ca16be
  # Normalize program name to check for.
ca16be
  normalized_program=`echo "$1" | sed '
ca16be
    s/^gnu-//; t
ca16be
    s/^gnu//; t
ca16be
    s/^g//; t'`
ca16be
ca16be
  printf '%s\n' "'$1' is $msg."
ca16be
ca16be
  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
ca16be
  case $normalized_program in
ca16be
    autoconf*)
ca16be
      echo "You should only need it if you modified 'configure.ac',"
ca16be
      echo "or m4 files included by it."
ca16be
      program_details 'autoconf'
ca16be
      ;;
ca16be
    autoheader*)
ca16be
      echo "You should only need it if you modified 'acconfig.h' or"
ca16be
      echo "$configure_deps."
ca16be
      program_details 'autoheader'
ca16be
      ;;
ca16be
    automake*)
ca16be
      echo "You should only need it if you modified 'Makefile.am' or"
ca16be
      echo "$configure_deps."
ca16be
      program_details 'automake'
ca16be
      ;;
ca16be
    aclocal*)
ca16be
      echo "You should only need it if you modified 'acinclude.m4' or"
ca16be
      echo "$configure_deps."
ca16be
      program_details 'aclocal'
ca16be
      ;;
ca16be
   autom4te*)
ca16be
      echo "You might have modified some maintainer files that require"
ca16be
      echo "the 'autom4te' program to be rebuilt."
ca16be
      program_details 'autom4te'
ca16be
      ;;
ca16be
    bison*|yacc*)
ca16be
      echo "You should only need it if you modified a '.y' file."
ca16be
      echo "You may want to install the GNU Bison package:"
ca16be
      echo "<$gnu_software_URL/bison/>"
ca16be
      ;;
ca16be
    lex*|flex*)
ca16be
      echo "You should only need it if you modified a '.l' file."
ca16be
      echo "You may want to install the Fast Lexical Analyzer package:"
ca16be
      echo "<$flex_URL>"
ca16be
      ;;
ca16be
    help2man*)
ca16be
      echo "You should only need it if you modified a dependency" \
ca16be
           "of a man page."
ca16be
      echo "You may want to install the GNU Help2man package:"
ca16be
      echo "<$gnu_software_URL/help2man/>"
ca16be
    ;;
ca16be
    makeinfo*)
ca16be
      echo "You should only need it if you modified a '.texi' file, or"
ca16be
      echo "any other file indirectly affecting the aspect of the manual."
ca16be
      echo "You might want to install the Texinfo package:"
ca16be
      echo "<$gnu_software_URL/texinfo/>"
ca16be
      echo "The spurious makeinfo call might also be the consequence of"
ca16be
      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
ca16be
      echo "want to install GNU make:"
ca16be
      echo "<$gnu_software_URL/make/>"
ca16be
      ;;
ca16be
    *)
ca16be
      echo "You might have modified some files without having the proper"
ca16be
      echo "tools for further handling them.  Check the 'README' file, it"
ca16be
      echo "often tells you about the needed prerequisites for installing"
ca16be
      echo "this package.  You may also peek at any GNU archive site, in"
ca16be
      echo "case some other package contains this missing '$1' program."
ca16be
      ;;
ca16be
  esac
ca16be
}
ca16be
ca16be
give_advice "$1" | sed -e '1s/^/WARNING: /' \
ca16be
                       -e '2,$s/^/         /' >&2
ca16be
ca16be
# Propagate the correct exit status (expected to be 127 for a program
ca16be
# not found, 63 for a program that failed due to version mismatch).
ca16be
exit $st
ca16be
ca16be
# Local variables:
ca16be
# eval: (add-hook 'write-file-hooks 'time-stamp)
ca16be
# time-stamp-start: "scriptversion="
ca16be
# time-stamp-format: "%:y-%02m-%02d.%02H"
ca16be
# time-stamp-time-zone: "UTC"
ca16be
# time-stamp-end: "; # UTC"
ca16be
# End: