missing
branchSDL-1.2
changeset 611 b39ee38ead19
parent 285 b3f70e3d7246
     1.1 --- a/missing	Wed Oct 17 01:00:32 2018 +0300
     1.2 +++ b/missing	Thu Oct 18 11:55:14 2018 +0300
     1.3 @@ -1,10 +1,9 @@
     1.4  #! /bin/sh
     1.5  # Common stub for a few missing GNU programs while installing.
     1.6  
     1.7 -scriptversion=2006-05-10.23
     1.8 +scriptversion=2012-01-06.18; # UTC
     1.9  
    1.10 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
    1.11 -#   Free Software Foundation, Inc.
    1.12 +# Copyright (C) 1996-2012 Free Software Foundation, Inc.
    1.13  # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
    1.14  
    1.15  # This program is free software; you can redistribute it and/or modify
    1.16 @@ -18,9 +17,7 @@
    1.17  # GNU General Public License for more details.
    1.18  
    1.19  # You should have received a copy of the GNU General Public License
    1.20 -# along with this program; if not, write to the Free Software
    1.21 -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    1.22 -# 02110-1301, USA.
    1.23 +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1.24  
    1.25  # As a special exception to the GNU General Public License, if you
    1.26  # distribute this file as part of a program that contains a
    1.27 @@ -28,7 +25,7 @@
    1.28  # the same distribution terms that you use for the rest of that program.
    1.29  
    1.30  if test $# -eq 0; then
    1.31 -  echo 1>&2 "Try \`$0 --help' for more information"
    1.32 +  echo 1>&2 "Try '$0 --help' for more information"
    1.33    exit 1
    1.34  fi
    1.35  
    1.36 @@ -36,7 +33,7 @@
    1.37  sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
    1.38  sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
    1.39  
    1.40 -# In the cases where this matters, `missing' is being run in the
    1.41 +# In the cases where this matters, 'missing' is being run in the
    1.42  # srcdir already.
    1.43  if test -f configure.ac; then
    1.44    configure_ac=configure.ac
    1.45 @@ -67,7 +64,7 @@
    1.46      echo "\
    1.47  $0 [OPTION]... PROGRAM [ARGUMENT]...
    1.48  
    1.49 -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
    1.50 +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
    1.51  error status if there is no known handling for PROGRAM.
    1.52  
    1.53  Options:
    1.54 @@ -76,18 +73,20 @@
    1.55    --run           try to run the given command, and emulate it if it fails
    1.56  
    1.57  Supported PROGRAM values:
    1.58 -  aclocal      touch file \`aclocal.m4'
    1.59 -  autoconf     touch file \`configure'
    1.60 -  autoheader   touch file \`config.h.in'
    1.61 +  aclocal      touch file 'aclocal.m4'
    1.62 +  autoconf     touch file 'configure'
    1.63 +  autoheader   touch file 'config.h.in'
    1.64    autom4te     touch the output file, or create a stub one
    1.65 -  automake     touch all \`Makefile.in' files
    1.66 -  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
    1.67 -  flex         create \`lex.yy.c', if possible, from existing .c
    1.68 +  automake     touch all 'Makefile.in' files
    1.69 +  bison        create 'y.tab.[ch]', if possible, from existing .[ch]
    1.70 +  flex         create 'lex.yy.c', if possible, from existing .c
    1.71    help2man     touch the output file
    1.72 -  lex          create \`lex.yy.c', if possible, from existing .c
    1.73 +  lex          create 'lex.yy.c', if possible, from existing .c
    1.74    makeinfo     touch the output file
    1.75 -  tar          try tar, gnutar, gtar, then tar without non-portable flags
    1.76 -  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
    1.77 +  yacc         create 'y.tab.[ch]', if possible, from existing .[ch]
    1.78 +
    1.79 +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
    1.80 +'g' are ignored when checking the name.
    1.81  
    1.82  Send bug reports to <bug-automake@gnu.org>."
    1.83      exit $?
    1.84 @@ -99,37 +98,35 @@
    1.85      ;;
    1.86  
    1.87    -*)
    1.88 -    echo 1>&2 "$0: Unknown \`$1' option"
    1.89 -    echo 1>&2 "Try \`$0 --help' for more information"
    1.90 +    echo 1>&2 "$0: Unknown '$1' option"
    1.91 +    echo 1>&2 "Try '$0 --help' for more information"
    1.92      exit 1
    1.93      ;;
    1.94  
    1.95  esac
    1.96  
    1.97 +# normalize program name to check for.
    1.98 +program=`echo "$1" | sed '
    1.99 +  s/^gnu-//; t
   1.100 +  s/^gnu//; t
   1.101 +  s/^g//; t'`
   1.102 +
   1.103  # Now exit if we have it, but it failed.  Also exit now if we
   1.104  # don't have it and --version was passed (most likely to detect
   1.105 -# the program).
   1.106 +# the program).  This is about non-GNU programs, so use $1 not
   1.107 +# $program.
   1.108  case $1 in
   1.109 -  lex|yacc)
   1.110 +  lex*|yacc*)
   1.111      # Not GNU programs, they don't have --version.
   1.112      ;;
   1.113  
   1.114 -  tar)
   1.115 -    if test -n "$run"; then
   1.116 -       echo 1>&2 "ERROR: \`tar' requires --run"
   1.117 -       exit 1
   1.118 -    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
   1.119 -       exit 1
   1.120 -    fi
   1.121 -    ;;
   1.122 -
   1.123    *)
   1.124      if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
   1.125         # We have it, but it failed.
   1.126         exit 1
   1.127      elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
   1.128         # Could not run --version or --help.  This is probably someone
   1.129 -       # running `$TOOL --version' or `$TOOL --help' to check whether
   1.130 +       # running '$TOOL --version' or '$TOOL --help' to check whether
   1.131         # $TOOL exists and not knowing $TOOL uses missing.
   1.132         exit 1
   1.133      fi
   1.134 @@ -138,30 +135,30 @@
   1.135  
   1.136  # If it does not exist, or fails to run (possibly an outdated version),
   1.137  # try to emulate it.
   1.138 -case $1 in
   1.139 +case $program in
   1.140    aclocal*)
   1.141      echo 1>&2 "\
   1.142 -WARNING: \`$1' is $msg.  You should only need it if
   1.143 -         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
   1.144 -         to install the \`Automake' and \`Perl' packages.  Grab them from
   1.145 +WARNING: '$1' is $msg.  You should only need it if
   1.146 +         you modified 'acinclude.m4' or '${configure_ac}'.  You might want
   1.147 +         to install the Automake and Perl packages.  Grab them from
   1.148           any GNU archive site."
   1.149      touch aclocal.m4
   1.150      ;;
   1.151  
   1.152 -  autoconf)
   1.153 +  autoconf*)
   1.154      echo 1>&2 "\
   1.155 -WARNING: \`$1' is $msg.  You should only need it if
   1.156 -         you modified \`${configure_ac}'.  You might want to install the
   1.157 -         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
   1.158 +WARNING: '$1' is $msg.  You should only need it if
   1.159 +         you modified '${configure_ac}'.  You might want to install the
   1.160 +         Autoconf and GNU m4 packages.  Grab them from any GNU
   1.161           archive site."
   1.162      touch configure
   1.163      ;;
   1.164  
   1.165 -  autoheader)
   1.166 +  autoheader*)
   1.167      echo 1>&2 "\
   1.168 -WARNING: \`$1' is $msg.  You should only need it if
   1.169 -         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
   1.170 -         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
   1.171 +WARNING: '$1' is $msg.  You should only need it if
   1.172 +         you modified 'acconfig.h' or '${configure_ac}'.  You might want
   1.173 +         to install the Autoconf and GNU m4 packages.  Grab them
   1.174           from any GNU archive site."
   1.175      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
   1.176      test -z "$files" && files="config.h"
   1.177 @@ -178,21 +175,21 @@
   1.178  
   1.179    automake*)
   1.180      echo 1>&2 "\
   1.181 -WARNING: \`$1' is $msg.  You should only need it if
   1.182 -         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
   1.183 -         You might want to install the \`Automake' and \`Perl' packages.
   1.184 +WARNING: '$1' is $msg.  You should only need it if
   1.185 +         you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
   1.186 +         You might want to install the Automake and Perl packages.
   1.187           Grab them from any GNU archive site."
   1.188      find . -type f -name Makefile.am -print |
   1.189  	   sed 's/\.am$/.in/' |
   1.190  	   while read f; do touch "$f"; done
   1.191      ;;
   1.192  
   1.193 -  autom4te)
   1.194 +  autom4te*)
   1.195      echo 1>&2 "\
   1.196 -WARNING: \`$1' is needed, but is $msg.
   1.197 +WARNING: '$1' is needed, but is $msg.
   1.198           You might have modified some files without having the
   1.199           proper tools for further handling them.
   1.200 -         You can get \`$1' as part of \`Autoconf' from any GNU
   1.201 +         You can get '$1' as part of Autoconf from any GNU
   1.202           archive site."
   1.203  
   1.204      file=`echo "$*" | sed -n "$sed_output"`
   1.205 @@ -210,15 +207,15 @@
   1.206      fi
   1.207      ;;
   1.208  
   1.209 -  bison|yacc)
   1.210 +  bison*|yacc*)
   1.211      echo 1>&2 "\
   1.212 -WARNING: \`$1' $msg.  You should only need it if
   1.213 -         you modified a \`.y' file.  You may need the \`Bison' package
   1.214 +WARNING: '$1' $msg.  You should only need it if
   1.215 +         you modified a '.y' file.  You may need the Bison package
   1.216           in order for those modifications to take effect.  You can get
   1.217 -         \`Bison' from any GNU archive site."
   1.218 +         Bison from any GNU archive site."
   1.219      rm -f y.tab.c y.tab.h
   1.220      if test $# -ne 1; then
   1.221 -        eval LASTARG="\${$#}"
   1.222 +        eval LASTARG=\${$#}
   1.223  	case $LASTARG in
   1.224  	*.y)
   1.225  	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
   1.226 @@ -240,15 +237,15 @@
   1.227      fi
   1.228      ;;
   1.229  
   1.230 -  lex|flex)
   1.231 +  lex*|flex*)
   1.232      echo 1>&2 "\
   1.233 -WARNING: \`$1' is $msg.  You should only need it if
   1.234 -         you modified a \`.l' file.  You may need the \`Flex' package
   1.235 +WARNING: '$1' is $msg.  You should only need it if
   1.236 +         you modified a '.l' file.  You may need the Flex package
   1.237           in order for those modifications to take effect.  You can get
   1.238 -         \`Flex' from any GNU archive site."
   1.239 +         Flex from any GNU archive site."
   1.240      rm -f lex.yy.c
   1.241      if test $# -ne 1; then
   1.242 -        eval LASTARG="\${$#}"
   1.243 +        eval LASTARG=\${$#}
   1.244  	case $LASTARG in
   1.245  	*.l)
   1.246  	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
   1.247 @@ -263,12 +260,12 @@
   1.248      fi
   1.249      ;;
   1.250  
   1.251 -  help2man)
   1.252 +  help2man*)
   1.253      echo 1>&2 "\
   1.254 -WARNING: \`$1' is $msg.  You should only need it if
   1.255 +WARNING: '$1' is $msg.  You should only need it if
   1.256  	 you modified a dependency of a manual page.  You may need the
   1.257 -	 \`Help2man' package in order for those modifications to take
   1.258 -	 effect.  You can get \`Help2man' from any GNU archive site."
   1.259 +	 Help2man package in order for those modifications to take
   1.260 +	 effect.  You can get Help2man from any GNU archive site."
   1.261  
   1.262      file=`echo "$*" | sed -n "$sed_output"`
   1.263      test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
   1.264 @@ -277,18 +274,18 @@
   1.265      else
   1.266  	test -z "$file" || exec >$file
   1.267  	echo ".ab help2man is required to generate this page"
   1.268 -	exit 1
   1.269 +	exit $?
   1.270      fi
   1.271      ;;
   1.272  
   1.273 -  makeinfo)
   1.274 +  makeinfo*)
   1.275      echo 1>&2 "\
   1.276 -WARNING: \`$1' is $msg.  You should only need it if
   1.277 -         you modified a \`.texi' or \`.texinfo' file, or any other file
   1.278 +WARNING: '$1' is $msg.  You should only need it if
   1.279 +         you modified a '.texi' or '.texinfo' file, or any other file
   1.280           indirectly affecting the aspect of the manual.  The spurious
   1.281 -         call might also be the consequence of using a buggy \`make' (AIX,
   1.282 -         DU, IRIX).  You might want to install the \`Texinfo' package or
   1.283 -         the \`GNU make' package.  Grab either from any GNU archive site."
   1.284 +         call might also be the consequence of using a buggy 'make' (AIX,
   1.285 +         DU, IRIX).  You might want to install the Texinfo package or
   1.286 +         the GNU make package.  Grab either from any GNU archive site."
   1.287      # The file to touch is that specified with -o ...
   1.288      file=`echo "$*" | sed -n "$sed_output"`
   1.289      test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
   1.290 @@ -310,49 +307,14 @@
   1.291      touch $file
   1.292      ;;
   1.293  
   1.294 -  tar)
   1.295 -    shift
   1.296 -
   1.297 -    # We have already tried tar in the generic part.
   1.298 -    # Look for gnutar/gtar before invocation to avoid ugly error
   1.299 -    # messages.
   1.300 -    if (gnutar --version > /dev/null 2>&1); then
   1.301 -       gnutar "$@" && exit 0
   1.302 -    fi
   1.303 -    if (gtar --version > /dev/null 2>&1); then
   1.304 -       gtar "$@" && exit 0
   1.305 -    fi
   1.306 -    firstarg="$1"
   1.307 -    if shift; then
   1.308 -	case $firstarg in
   1.309 -	*o*)
   1.310 -	    firstarg=`echo "$firstarg" | sed s/o//`
   1.311 -	    tar "$firstarg" "$@" && exit 0
   1.312 -	    ;;
   1.313 -	esac
   1.314 -	case $firstarg in
   1.315 -	*h*)
   1.316 -	    firstarg=`echo "$firstarg" | sed s/h//`
   1.317 -	    tar "$firstarg" "$@" && exit 0
   1.318 -	    ;;
   1.319 -	esac
   1.320 -    fi
   1.321 -
   1.322 -    echo 1>&2 "\
   1.323 -WARNING: I can't seem to be able to run \`tar' with the given arguments.
   1.324 -         You may want to install GNU tar or Free paxutils, or check the
   1.325 -         command line arguments."
   1.326 -    exit 1
   1.327 -    ;;
   1.328 -
   1.329    *)
   1.330      echo 1>&2 "\
   1.331 -WARNING: \`$1' is needed, and is $msg.
   1.332 +WARNING: '$1' is needed, and is $msg.
   1.333           You might have modified some files without having the
   1.334 -         proper tools for further handling them.  Check the \`README' file,
   1.335 +         proper tools for further handling them.  Check the 'README' file,
   1.336           it often tells you about the needed prerequisites for installing
   1.337           this package.  You may also peek at any GNU archive site, in case
   1.338 -         some other package would contain this missing \`$1' program."
   1.339 +         some other package would contain this missing '$1' program."
   1.340      exit 1
   1.341      ;;
   1.342  esac
   1.343 @@ -363,5 +325,6 @@
   1.344  # eval: (add-hook 'write-file-hooks 'time-stamp)
   1.345  # time-stamp-start: "scriptversion="
   1.346  # time-stamp-format: "%:y-%02m-%02d.%02H"
   1.347 -# time-stamp-end: "$"
   1.348 +# time-stamp-time-zone: "UTC"
   1.349 +# time-stamp-end: "; # UTC"
   1.350  # End: