Blame gettext-tools/examples/hello-c++-kde/admin/missing

Packit Bot 06c835
#! /bin/sh
Packit Bot 06c835
# Common stub for a few missing GNU programs while installing.
Packit Bot 06c835
# Copyright (C) 1996-1997, 1999-2000, 2002, 2015 Free Software
Packit Bot 06c835
# Foundation, Inc.
Packit Bot 06c835
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
Packit Bot 06c835
Packit Bot 06c835
# This program is free software; you can redistribute it and/or modify
Packit Bot 06c835
# it under the terms of the GNU General Public License as published by
Packit Bot 06c835
# the Free Software Foundation; either version 2, or (at your option)
Packit Bot 06c835
# any later version.
Packit Bot 06c835
Packit Bot 06c835
# This program is distributed in the hope that it will be useful,
Packit Bot 06c835
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Bot 06c835
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Bot 06c835
# GNU General Public License for more details.
Packit Bot 06c835
Packit Bot 06c835
# You should have received a copy of the GNU General Public License
Packit Bot 06c835
# along with this program; if not, write to the Free Software
Packit Bot 06c835
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Packit Bot 06c835
# 02111-1307, USA.
Packit Bot 06c835
Packit Bot 06c835
# As a special exception to the GNU General Public License, if you
Packit Bot 06c835
# distribute this file as part of a program that contains a
Packit Bot 06c835
# configuration script generated by Autoconf, you may include it under
Packit Bot 06c835
# the same distribution terms that you use for the rest of that program.
Packit Bot 06c835
Packit Bot 06c835
if test $# -eq 0; then
Packit Bot 06c835
  echo 1>&2 "Try \`$0 --help' for more information"
Packit Bot 06c835
  exit 1
Packit Bot 06c835
fi
Packit Bot 06c835
Packit Bot 06c835
run=:
Packit Bot 06c835
Packit Bot 06c835
# In the cases where this matters, `missing' is being run in the
Packit Bot 06c835
# srcdir already.
Packit Bot 06c835
if test -f configure.ac; then
Packit Bot 06c835
  configure_ac=configure.ac
Packit Bot 06c835
else
Packit Bot 06c835
  configure_ac=configure.in
Packit Bot 06c835
fi
Packit Bot 06c835
Packit Bot 06c835
case "$1" in
Packit Bot 06c835
--run)
Packit Bot 06c835
  # Try to run requested program, and just exit if it succeeds.
Packit Bot 06c835
  run=
Packit Bot 06c835
  shift
Packit Bot 06c835
  "$@" && exit 0
Packit Bot 06c835
  ;;
Packit Bot 06c835
esac
Packit Bot 06c835
Packit Bot 06c835
# If it does not exist, or fails to run (possibly an outdated version),
Packit Bot 06c835
# try to emulate it.
Packit Bot 06c835
case "$1" in
Packit Bot 06c835
Packit Bot 06c835
  -h|--h|--he|--hel|--help)
Packit Bot 06c835
    echo "\
Packit Bot 06c835
$0 [OPTION]... PROGRAM [ARGUMENT]...
Packit Bot 06c835
Packit Bot 06c835
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
Packit Bot 06c835
error status if there is no known handling for PROGRAM.
Packit Bot 06c835
Packit Bot 06c835
Options:
Packit Bot 06c835
  -h, --help      display this help and exit
Packit Bot 06c835
  -v, --version   output version information and exit
Packit Bot 06c835
  --run           try to run the given command, and emulate it if it fails
Packit Bot 06c835
Packit Bot 06c835
Supported PROGRAM values:
Packit Bot 06c835
  aclocal      touch file \`aclocal.m4'
Packit Bot 06c835
  autoconf     touch file \`configure'
Packit Bot 06c835
  autoheader   touch file \`config.h.in'
Packit Bot 06c835
  automake     touch all \`Makefile.in' files
Packit Bot 06c835
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
Packit Bot 06c835
  flex         create \`lex.yy.c', if possible, from existing .c
Packit Bot 06c835
  help2man     touch the output file
Packit Bot 06c835
  lex          create \`lex.yy.c', if possible, from existing .c
Packit Bot 06c835
  makeinfo     touch the output file
Packit Bot 06c835
  tar          try tar, gnutar, gtar, then tar without non-portable flags
Packit Bot 06c835
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
Packit Bot 06c835
    echo "missing 0.4 - GNU automake"
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  -*)
Packit Bot 06c835
    echo 1>&2 "$0: Unknown \`$1' option"
Packit Bot 06c835
    echo 1>&2 "Try \`$0 --help' for more information"
Packit Bot 06c835
    exit 1
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  aclocal*)
Packit Bot 06c835
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have it, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
Packit Bot 06c835
         to install the \`Automake' and \`Perl' packages.  Grab them from
Packit Bot 06c835
         any GNU archive site."
Packit Bot 06c835
    touch aclocal.m4
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  autoconf)
Packit Bot 06c835
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have it, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified \`${configure_ac}'.  You might want to install the
Packit Bot 06c835
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
Packit Bot 06c835
         archive site."
Packit Bot 06c835
    touch configure
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  autoheader)
Packit Bot 06c835
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have it, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
Packit Bot 06c835
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
Packit Bot 06c835
         from any GNU archive site."
Packit Bot 06c835
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
Packit Bot 06c835
    test -z "$files" && files="config.h"
Packit Bot 06c835
    touch_files=
Packit Bot 06c835
    for f in $files; do
Packit Bot 06c835
      case "$f" in
Packit Bot 06c835
      *:*) touch_files="$touch_files "`echo "$f" |
Packit Bot 06c835
				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
Packit Bot 06c835
      *) touch_files="$touch_files $f.in";;
Packit Bot 06c835
      esac
Packit Bot 06c835
    done
Packit Bot 06c835
    touch $touch_files
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  automake*)
Packit Bot 06c835
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have it, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
Packit Bot 06c835
         You might want to install the \`Automake' and \`Perl' packages.
Packit Bot 06c835
         Grab them from any GNU archive site."
Packit Bot 06c835
    find . -type f -name Makefile.am -print |
Packit Bot 06c835
	   sed 's/\.am$/.in/' |
Packit Bot 06c835
	   while read f; do touch "$f"; done
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  autom4te)
Packit Bot 06c835
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have it, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is needed, and you do not seem to have it handy on your
Packit Bot 06c835
         system.  You might have modified some files without having the
Packit Bot 06c835
         proper tools for further handling them.
Packit Bot 06c835
         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
Packit Bot 06c835
         archive site."
Packit Bot 06c835
Packit Bot 06c835
    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
Packit Bot 06c835
    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
Packit Bot 06c835
    if test -f "$file"; then
Packit Bot 06c835
	touch $file
Packit Bot 06c835
    else
Packit Bot 06c835
	test -z "$file" || exec >$file
Packit Bot 06c835
	echo "#! /bin/sh"
Packit Bot 06c835
	echo "# Created by GNU Automake missing as a replacement of"
Packit Bot 06c835
	echo "#  $ $@"
Packit Bot 06c835
	echo "exit 0"
Packit Bot 06c835
	chmod +x $file
Packit Bot 06c835
	exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  bison|yacc)
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified a \`.y' file.  You may need the \`Bison' package
Packit Bot 06c835
         in order for those modifications to take effect.  You can get
Packit Bot 06c835
         \`Bison' from any GNU archive site."
Packit Bot 06c835
    rm -f y.tab.c y.tab.h
Packit Bot 06c835
    if [ $# -ne 1 ]; then
Packit Bot 06c835
        eval LASTARG="\${$#}"
Packit Bot 06c835
	case "$LASTARG" in
Packit Bot 06c835
	*.y)
Packit Bot 06c835
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
Packit Bot 06c835
	    if [ -f "$SRCFILE" ]; then
Packit Bot 06c835
	         cp "$SRCFILE" y.tab.c
Packit Bot 06c835
	    fi
Packit Bot 06c835
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
Packit Bot 06c835
	    if [ -f "$SRCFILE" ]; then
Packit Bot 06c835
	         cp "$SRCFILE" y.tab.h
Packit Bot 06c835
	    fi
Packit Bot 06c835
	  ;;
Packit Bot 06c835
	esac
Packit Bot 06c835
    fi
Packit Bot 06c835
    if [ ! -f y.tab.h ]; then
Packit Bot 06c835
	echo >y.tab.h
Packit Bot 06c835
    fi
Packit Bot 06c835
    if [ ! -f y.tab.c ]; then
Packit Bot 06c835
	echo 'main() { return 0; }' >y.tab.c
Packit Bot 06c835
    fi
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  lex|flex)
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified a \`.l' file.  You may need the \`Flex' package
Packit Bot 06c835
         in order for those modifications to take effect.  You can get
Packit Bot 06c835
         \`Flex' from any GNU archive site."
Packit Bot 06c835
    rm -f lex.yy.c
Packit Bot 06c835
    if [ $# -ne 1 ]; then
Packit Bot 06c835
        eval LASTARG="\${$#}"
Packit Bot 06c835
	case "$LASTARG" in
Packit Bot 06c835
	*.l)
Packit Bot 06c835
	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
Packit Bot 06c835
	    if [ -f "$SRCFILE" ]; then
Packit Bot 06c835
	         cp "$SRCFILE" lex.yy.c
Packit Bot 06c835
	    fi
Packit Bot 06c835
	  ;;
Packit Bot 06c835
	esac
Packit Bot 06c835
    fi
Packit Bot 06c835
    if [ ! -f lex.yy.c ]; then
Packit Bot 06c835
	echo 'main() { return 0; }' >lex.yy.c
Packit Bot 06c835
    fi
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  help2man)
Packit Bot 06c835
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have it, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
	 you modified a dependency of a manual page.  You may need the
Packit Bot 06c835
	 \`Help2man' package in order for those modifications to take
Packit Bot 06c835
	 effect.  You can get \`Help2man' from any GNU archive site."
Packit Bot 06c835
Packit Bot 06c835
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
Packit Bot 06c835
    if test -z "$file"; then
Packit Bot 06c835
	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
Packit Bot 06c835
    fi
Packit Bot 06c835
    if [ -f "$file" ]; then
Packit Bot 06c835
	touch $file
Packit Bot 06c835
    else
Packit Bot 06c835
	test -z "$file" || exec >$file
Packit Bot 06c835
	echo ".ab help2man is required to generate this page"
Packit Bot 06c835
	exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  makeinfo)
Packit Bot 06c835
    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
Packit Bot 06c835
       # We have makeinfo, but it failed.
Packit Bot 06c835
       exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is missing on your system.  You should only need it if
Packit Bot 06c835
         you modified a \`.texi' or \`.texinfo' file, or any other file
Packit Bot 06c835
         indirectly affecting the aspect of the manual.  The spurious
Packit Bot 06c835
         call might also be the consequence of using a buggy \`make' (AIX,
Packit Bot 06c835
         DU, IRIX).  You might want to install the \`Texinfo' package or
Packit Bot 06c835
         the \`GNU make' package.  Grab either from any GNU archive site."
Packit Bot 06c835
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
Packit Bot 06c835
    if test -z "$file"; then
Packit Bot 06c835
      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
Packit Bot 06c835
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
Packit Bot 06c835
    fi
Packit Bot 06c835
    touch $file
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  tar)
Packit Bot 06c835
    shift
Packit Bot 06c835
    if test -n "$run"; then
Packit Bot 06c835
      echo 1>&2 "ERROR: \`tar' requires --run"
Packit Bot 06c835
      exit 1
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    # We have already tried tar in the generic part.
Packit Bot 06c835
    # Look for gnutar/gtar before invocation to avoid ugly error
Packit Bot 06c835
    # messages.
Packit Bot 06c835
    if (gnutar --version > /dev/null 2>&1;; then
Packit Bot 06c835
       gnutar "$@" && exit 0
Packit Bot 06c835
    fi
Packit Bot 06c835
    if (gtar --version > /dev/null 2>&1;; then
Packit Bot 06c835
       gtar "$@" && exit 0
Packit Bot 06c835
    fi
Packit Bot 06c835
    firstarg="$1"
Packit Bot 06c835
    if shift; then
Packit Bot 06c835
	case "$firstarg" in
Packit Bot 06c835
	*o*)
Packit Bot 06c835
	    firstarg=`echo "$firstarg" | sed s/o//`
Packit Bot 06c835
	    tar "$firstarg" "$@" && exit 0
Packit Bot 06c835
	    ;;
Packit Bot 06c835
	esac
Packit Bot 06c835
	case "$firstarg" in
Packit Bot 06c835
	*h*)
Packit Bot 06c835
	    firstarg=`echo "$firstarg" | sed s/h//`
Packit Bot 06c835
	    tar "$firstarg" "$@" && exit 0
Packit Bot 06c835
	    ;;
Packit Bot 06c835
	esac
Packit Bot 06c835
    fi
Packit Bot 06c835
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: I can't seem to be able to run \`tar' with the given arguments.
Packit Bot 06c835
         You may want to install GNU tar or Free paxutils, or check the
Packit Bot 06c835
         command line arguments."
Packit Bot 06c835
    exit 1
Packit Bot 06c835
    ;;
Packit Bot 06c835
Packit Bot 06c835
  *)
Packit Bot 06c835
    echo 1>&2 "\
Packit Bot 06c835
WARNING: \`$1' is needed, and you do not seem to have it handy on your
Packit Bot 06c835
         system.  You might have modified some files without having the
Packit Bot 06c835
         proper tools for further handling them.  Check the \`README' file,
Packit Bot 06c835
         it often tells you about the needed prerequirements for installing
Packit Bot 06c835
         this package.  You may also peek at any GNU archive site, in case
Packit Bot 06c835
         some other package would contain this missing \`$1' program."
Packit Bot 06c835
    exit 1
Packit Bot 06c835
    ;;
Packit Bot 06c835
esac
Packit Bot 06c835
Packit Bot 06c835
exit 0