| 1 | #! /bin/sh
|
|---|
| 2 | # Common stub for a few missing GNU programs while installing.
|
|---|
| 3 | # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
|
|---|
| 4 | # Originally by Fran,cois Pinard <[email protected]>, 1996.
|
|---|
| 5 |
|
|---|
| 6 | # This program is free software; you can redistribute it and/or modify
|
|---|
| 7 | # it under the terms of the GNU General Public License as published by
|
|---|
| 8 | # the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 9 | # any later version.
|
|---|
| 10 |
|
|---|
| 11 | # This program is distributed in the hope that it will be useful,
|
|---|
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 14 | # GNU General Public License for more details.
|
|---|
| 15 |
|
|---|
| 16 | # You should have received a copy of the GNU General Public License
|
|---|
| 17 | # along with this program; if not, write to the Free Software
|
|---|
| 18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|---|
| 19 | # 02111-1307, USA.
|
|---|
| 20 |
|
|---|
| 21 | # As a special exception to the GNU General Public License, if you
|
|---|
| 22 | # distribute this file as part of a program that contains a
|
|---|
| 23 | # configuration script generated by Autoconf, you may include it under
|
|---|
| 24 | # the same distribution terms that you use for the rest of that program.
|
|---|
| 25 |
|
|---|
| 26 | if test $# -eq 0; then
|
|---|
| 27 | echo 1>&2 "Try \`$0 --help' for more information"
|
|---|
| 28 | exit 1
|
|---|
| 29 | fi
|
|---|
| 30 |
|
|---|
| 31 | run=:
|
|---|
| 32 |
|
|---|
| 33 | # In the cases where this matters, `missing' is being run in the
|
|---|
| 34 | # srcdir already.
|
|---|
| 35 | if test -f configure.ac; then
|
|---|
| 36 | configure_ac=configure.ac
|
|---|
| 37 | else
|
|---|
| 38 | configure_ac=configure.in
|
|---|
| 39 | fi
|
|---|
| 40 |
|
|---|
| 41 | case "$1" in
|
|---|
| 42 | --run)
|
|---|
| 43 | # Try to run requested program, and just exit if it succeeds.
|
|---|
| 44 | run=
|
|---|
| 45 | shift
|
|---|
| 46 | "$@" && exit 0
|
|---|
| 47 | ;;
|
|---|
| 48 | esac
|
|---|
| 49 |
|
|---|
| 50 | # If it does not exist, or fails to run (possibly an outdated version),
|
|---|
| 51 | # try to emulate it.
|
|---|
| 52 | case "$1" in
|
|---|
| 53 |
|
|---|
| 54 | -h|--h|--he|--hel|--help)
|
|---|
| 55 | echo "\
|
|---|
| 56 | $0 [OPTION]... PROGRAM [ARGUMENT]...
|
|---|
| 57 |
|
|---|
| 58 | Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
|---|
| 59 | error status if there is no known handling for PROGRAM.
|
|---|
| 60 |
|
|---|
| 61 | Options:
|
|---|
| 62 | -h, --help display this help and exit
|
|---|
|
|---|