+#! /bin/sh\r
+# Common stub for a few missing GNU programs while installing.\r
+\r
+scriptversion=2005-06-08.21\r
+\r
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005\r
+# Free Software Foundation, Inc.\r
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.\r
+\r
+# This program is free software; you can redistribute it and/or modify\r
+# it under the terms of the GNU General Public License as published by\r
+# the Free Software Foundation; either version 2, or (at your option)\r
+# any later version.\r
+\r
+# This program is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+# GNU General Public License for more details.\r
+\r
+# You should have received a copy of the GNU General Public License\r
+# along with this program; if not, write to the Free Software\r
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\r
+# 02110-1301, USA.\r
+\r
+# As a special exception to the GNU General Public License, if you\r
+# distribute this file as part of a program that contains a\r
+# configuration script generated by Autoconf, you may include it under\r
+# the same distribution terms that you use for the rest of that program.\r
+\r
+if test $# -eq 0; then\r
+ echo 1>&2 "Try \`$0 --help' for more information"\r
+ exit 1\r
+fi\r
+\r
+run=:\r
+\r
+# In the cases where this matters, `missing' is being run in the\r
+# srcdir already.\r
+if test -f configure.ac; then\r
+ configure_ac=configure.ac\r
+else\r
+ configure_ac=configure.in\r
+fi\r
+\r
+msg="missing on your system"\r
+\r
+case "$1" in\r
+--run)\r
+ # Try to run requested program, and just exit if it succeeds.\r
+ run=\r
+ shift\r
+ "$@" && exit 0\r
+ # Exit code 63 means version mismatch. This often happens\r
+ # when the user try to use an ancient version of a tool on\r
+ # a file that requires a minimum version. In this case we\r
+ # we should proceed has if the program had been absent, or\r
+ # if --run hadn't been passed.\r
+ if test $? = 63; then\r
+ run=:\r
+ msg="probably too old"\r
+ fi\r
+ ;;\r
+\r
+ -h|--h|--he|--hel|--help)\r
+ echo "\\r
+$0 [OPTION]... PROGRAM [ARGUMENT]...\r
+\r
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an\r
+error status if there is no known handling for PROGRAM.\r
+\r
+Options:\r
+ -h, --help display this help and exit\r
+ -v, --version output version information and exit\r
+ --run try to run the given command, and emulate it if it fails\r
+\r
+Supported PROGRAM values:\r
+ aclocal touch file \`aclocal.m4'\r
+ autoconf touch file \`configure'\r
+ autoheader touch file \`config.h.in'\r
+ automake touch all \`Makefile.in' files\r
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]\r
+ flex create \`lex.yy.c', if possible, from existing .c\r
+ help2man touch the output file\r
+ lex create \`lex.yy.c', if possible, from existing .c\r
+ makeinfo touch the output file\r
+ tar try tar, gnutar, gtar, then tar without non-portable flags\r
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]\r
+\r
+Send bug reports to <bug-automake@gnu.org>."\r
+ exit $?\r
+ ;;\r
+\r
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)\r
+ echo "missing $scriptversion (GNU Automake)"\r
+ exit $?\r
+ ;;\r
+\r
+ -*)\r
+ echo 1>&2 "$0: Unknown \`$1' option"\r
+ echo 1>&2 "Try \`$0 --help' for more information"\r
+ exit 1\r
+ ;;\r
+\r
+esac\r
+\r
+# Now exit if we have it, but it failed. Also exit now if we\r
+# don't have it and --version was passed (most likely to detect\r
+# the program).\r
+case "$1" in\r
+ lex|yacc)\r
+ # Not GNU programs, they don't have --version.\r
+ ;;\r
+\r
+ tar)\r
+ if test -n "$run"; then\r
+ echo 1>&2 "ERROR: \`tar' requires --run"\r
+ exit 1\r
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then\r
+ exit 1\r
+ fi\r
+ ;;\r
+\r
+ *)\r
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then\r
+ # We have it, but it failed.\r
+ exit 1\r
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then\r
+ # Could not run --version or --help. This is probably someone\r
+ # running `$TOOL --version' or `$TOOL --help' to check whether\r
+ # $TOOL exists and not knowing $TOOL uses missing.\r
+ exit 1\r
+ fi\r
+ ;;\r
+esac\r
+\r
+# If it does not exist, or fails to run (possibly an outdated version),\r
+# try to emulate it.\r
+case "$1" in\r
+ aclocal*)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want\r
+ to install the \`Automake' and \`Perl' packages. Grab them from\r
+ any GNU archive site."\r
+ touch aclocal.m4\r
+ ;;\r
+\r
+ autoconf)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified \`${configure_ac}'. You might want to install the\r
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU\r
+ archive site."\r
+ touch configure\r
+ ;;\r
+\r
+ autoheader)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want\r
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them\r
+ from any GNU archive site."\r
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`\r
+ test -z "$files" && files="config.h"\r
+ touch_files=\r
+ for f in $files; do\r
+ case "$f" in\r
+ *:*) touch_files="$touch_files "`echo "$f" |\r
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;\r
+ *) touch_files="$touch_files $f.in";;\r
+ esac\r
+ done\r
+ touch $touch_files\r
+ ;;\r
+\r
+ automake*)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.\r
+ You might want to install the \`Automake' and \`Perl' packages.\r
+ Grab them from any GNU archive site."\r
+ find . -type f -name Makefile.am -print |\r
+ sed 's/\.am$/.in/' |\r
+ while read f; do touch "$f"; done\r
+ ;;\r
+\r
+ autom4te)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is needed, but is $msg.\r
+ You might have modified some files without having the\r
+ proper tools for further handling them.\r
+ You can get \`$1' as part of \`Autoconf' from any GNU\r
+ archive site."\r
+\r
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`\r
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`\r
+ if test -f "$file"; then\r
+ touch $file\r
+ else\r
+ test -z "$file" || exec >$file\r
+ echo "#! /bin/sh"\r
+ echo "# Created by GNU Automake missing as a replacement of"\r
+ echo "# $ $@"\r
+ echo "exit 0"\r
+ chmod +x $file\r
+ exit 1\r
+ fi\r
+ ;;\r
+\r
+ bison|yacc)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' $msg. You should only need it if\r
+ you modified a \`.y' file. You may need the \`Bison' package\r
+ in order for those modifications to take effect. You can get\r
+ \`Bison' from any GNU archive site."\r
+ rm -f y.tab.c y.tab.h\r
+ if [ $# -ne 1 ]; then\r
+ eval LASTARG="\${$#}"\r
+ case "$LASTARG" in\r
+ *.y)\r
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`\r
+ if [ -f "$SRCFILE" ]; then\r
+ cp "$SRCFILE" y.tab.c\r
+ fi\r
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`\r
+ if [ -f "$SRCFILE" ]; then\r
+ cp "$SRCFILE" y.tab.h\r
+ fi\r
+ ;;\r
+ esac\r
+ fi\r
+ if [ ! -f y.tab.h ]; then\r
+ echo >y.tab.h\r
+ fi\r
+ if [ ! -f y.tab.c ]; then\r
+ echo 'main() { return 0; }' >y.tab.c\r
+ fi\r
+ ;;\r
+\r
+ lex|flex)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified a \`.l' file. You may need the \`Flex' package\r
+ in order for those modifications to take effect. You can get\r
+ \`Flex' from any GNU archive site."\r
+ rm -f lex.yy.c\r
+ if [ $# -ne 1 ]; then\r
+ eval LASTARG="\${$#}"\r
+ case "$LASTARG" in\r
+ *.l)\r
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`\r
+ if [ -f "$SRCFILE" ]; then\r
+ cp "$SRCFILE" lex.yy.c\r
+ fi\r
+ ;;\r
+ esac\r
+ fi\r
+ if [ ! -f lex.yy.c ]; then\r
+ echo 'main() { return 0; }' >lex.yy.c\r
+ fi\r
+ ;;\r
+\r
+ help2man)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified a dependency of a manual page. You may need the\r
+ \`Help2man' package in order for those modifications to take\r
+ effect. You can get \`Help2man' from any GNU archive site."\r
+\r
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`\r
+ if test -z "$file"; then\r
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`\r
+ fi\r
+ if [ -f "$file" ]; then\r
+ touch $file\r
+ else\r
+ test -z "$file" || exec >$file\r
+ echo ".ab help2man is required to generate this page"\r
+ exit 1\r
+ fi\r
+ ;;\r
+\r
+ makeinfo)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is $msg. You should only need it if\r
+ you modified a \`.texi' or \`.texinfo' file, or any other file\r
+ indirectly affecting the aspect of the manual. The spurious\r
+ call might also be the consequence of using a buggy \`make' (AIX,\r
+ DU, IRIX). You might want to install the \`Texinfo' package or\r
+ the \`GNU make' package. Grab either from any GNU archive site."\r
+ # The file to touch is that specified with -o ...\r
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`\r
+ if test -z "$file"; then\r
+ # ... or it is the one specified with @setfilename ...\r
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`\r
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`\r
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)\r
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info\r
+ fi\r
+ # If the file does not exist, the user really needs makeinfo;\r
+ # let's fail without touching anything.\r
+ test -f $file || exit 1\r
+ touch $file\r
+ ;;\r
+\r
+ tar)\r
+ shift\r
+\r
+ # We have already tried tar in the generic part.\r
+ # Look for gnutar/gtar before invocation to avoid ugly error\r
+ # messages.\r
+ if (gnutar --version > /dev/null 2>&1); then\r
+ gnutar "$@" && exit 0\r
+ fi\r
+ if (gtar --version > /dev/null 2>&1); then\r
+ gtar "$@" && exit 0\r
+ fi\r
+ firstarg="$1"\r
+ if shift; then\r
+ case "$firstarg" in\r
+ *o*)\r
+ firstarg=`echo "$firstarg" | sed s/o//`\r
+ tar "$firstarg" "$@" && exit 0\r
+ ;;\r
+ esac\r
+ case "$firstarg" in\r
+ *h*)\r
+ firstarg=`echo "$firstarg" | sed s/h//`\r
+ tar "$firstarg" "$@" && exit 0\r
+ ;;\r
+ esac\r
+ fi\r
+\r
+ echo 1>&2 "\\r
+WARNING: I can't seem to be able to run \`tar' with the given arguments.\r
+ You may want to install GNU tar or Free paxutils, or check the\r
+ command line arguments."\r
+ exit 1\r
+ ;;\r
+\r
+ *)\r
+ echo 1>&2 "\\r
+WARNING: \`$1' is needed, and is $msg.\r
+ You might have modified some files without having the\r
+ proper tools for further handling them. Check the \`README' file,\r
+ it often tells you about the needed prerequisites for installing\r
+ this package. You may also peek at any GNU archive site, in case\r
+ some other package would contain this missing \`$1' program."\r
+ exit 1\r
+ ;;\r
+esac\r
+\r
+exit 0\r
+\r
+# Local variables:\r
+# eval: (add-hook 'write-file-hooks 'time-stamp)\r
+# time-stamp-start: "scriptversion="\r
+# time-stamp-format: "%:y-%02m-%02d.%02H"\r
+# time-stamp-end: "$"\r
+# End:\r