missing
author Sam Lantinga <slouken@libsdl.org>
Sun, 23 Sep 2001 21:09:08 +0000
changeset 194 ba9e0fcc2ae2
parent 0 74212992fb08
permissions -rwxr-xr-x
Oops, back out that SDL_main -> SDLMain conversion
slouken@0
     1
#! /bin/sh
slouken@0
     2
# Common stub for a few missing GNU programs while installing.
slouken@0
     3
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
slouken@0
     4
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
slouken@0
     5
slouken@0
     6
# This program is free software; you can redistribute it and/or modify
slouken@0
     7
# it under the terms of the GNU General Public License as published by
slouken@0
     8
# the Free Software Foundation; either version 2, or (at your option)
slouken@0
     9
# any later version.
slouken@0
    10
slouken@0
    11
# This program is distributed in the hope that it will be useful,
slouken@0
    12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
slouken@0
    14
# GNU General Public License for more details.
slouken@0
    15
slouken@0
    16
# You should have received a copy of the GNU General Public License
slouken@0
    17
# along with this program; if not, write to the Free Software
slouken@0
    18
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
slouken@0
    19
# 02111-1307, USA.
slouken@0
    20
slouken@0
    21
if test $# -eq 0; then
slouken@0
    22
  echo 1>&2 "Try \`$0 --help' for more information"
slouken@0
    23
  exit 1
slouken@0
    24
fi
slouken@0
    25
slouken@0
    26
case "$1" in
slouken@0
    27
slouken@0
    28
  -h|--h|--he|--hel|--help)
slouken@0
    29
    echo "\
slouken@0
    30
$0 [OPTION]... PROGRAM [ARGUMENT]...
slouken@0
    31
slouken@0
    32
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
slouken@0
    33
error status if there is no known handling for PROGRAM.
slouken@0
    34
slouken@0
    35
Options:
slouken@0
    36
  -h, --help      display this help and exit
slouken@0
    37
  -v, --version   output version information and exit
slouken@0
    38
slouken@0
    39
Supported PROGRAM values:
slouken@0
    40
  aclocal      touch file \`aclocal.m4'
slouken@0
    41
  autoconf     touch file \`configure'
slouken@0
    42
  autoheader   touch file \`config.h.in'
slouken@0
    43
  automake     touch all \`Makefile.in' files
slouken@0
    44
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
slouken@0
    45
  flex         create \`lex.yy.c', if possible, from existing .c
slouken@0
    46
  lex          create \`lex.yy.c', if possible, from existing .c
slouken@0
    47
  makeinfo     touch the output file
slouken@0
    48
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
slouken@0
    49
    ;;
slouken@0
    50
slouken@0
    51
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
slouken@0
    52
    echo "missing - GNU libit 0.0"
slouken@0
    53
    ;;
slouken@0
    54
slouken@0
    55
  -*)
slouken@0
    56
    echo 1>&2 "$0: Unknown \`$1' option"
slouken@0
    57
    echo 1>&2 "Try \`$0 --help' for more information"
slouken@0
    58
    exit 1
slouken@0
    59
    ;;
slouken@0
    60
slouken@0
    61
  aclocal)
slouken@0
    62
    echo 1>&2 "\
slouken@0
    63
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
    64
         you modified \`acinclude.m4' or \`configure.in'.  You might want
slouken@0
    65
         to install the \`Automake' and \`Perl' packages.  Grab them from
slouken@0
    66
         any GNU archive site."
slouken@0
    67
    touch aclocal.m4
slouken@0
    68
    ;;
slouken@0
    69
slouken@0
    70
  autoconf)
slouken@0
    71
    echo 1>&2 "\
slouken@0
    72
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
    73
         you modified \`configure.in'.  You might want to install the
slouken@0
    74
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
slouken@0
    75
         archive site."
slouken@0
    76
    touch configure
slouken@0
    77
    ;;
slouken@0
    78
slouken@0
    79
  autoheader)
slouken@0
    80
    echo 1>&2 "\
slouken@0
    81
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
    82
         you modified \`acconfig.h' or \`configure.in'.  You might want
slouken@0
    83
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
slouken@0
    84
         from any GNU archive site."
slouken@0
    85
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
slouken@0
    86
    test -z "$files" && files="config.h"
slouken@0
    87
    touch_files=
slouken@0
    88
    for f in $files; do
slouken@0
    89
      case "$f" in
slouken@0
    90
      *:*) touch_files="$touch_files "`echo "$f" |
slouken@0
    91
				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
slouken@0
    92
      *) touch_files="$touch_files $f.in";;
slouken@0
    93
      esac
slouken@0
    94
    done
slouken@0
    95
    touch $touch_files
slouken@0
    96
    ;;
slouken@0
    97
slouken@0
    98
  automake)
slouken@0
    99
    echo 1>&2 "\
slouken@0
   100
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
   101
         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
slouken@0
   102
         You might want to install the \`Automake' and \`Perl' packages.
slouken@0
   103
         Grab them from any GNU archive site."
slouken@0
   104
    find . -type f -name Makefile.am -print |
slouken@0
   105
	   sed 's/\.am$/.in/' |
slouken@0
   106
	   while read f; do touch "$f"; done
slouken@0
   107
    ;;
slouken@0
   108
slouken@0
   109
  bison|yacc)
slouken@0
   110
    echo 1>&2 "\
slouken@0
   111
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
   112
         you modified a \`.y' file.  You may need the \`Bison' package
slouken@0
   113
         in order for those modifications to take effect.  You can get
slouken@0
   114
         \`Bison' from any GNU archive site."
slouken@0
   115
    rm -f y.tab.c y.tab.h
slouken@0
   116
    if [ $# -ne 1 ]; then
slouken@0
   117
        eval LASTARG="\${$#}"
slouken@0
   118
	case "$LASTARG" in
slouken@0
   119
	*.y)
slouken@0
   120
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
slouken@0
   121
	    if [ -f "$SRCFILE" ]; then
slouken@0
   122
	         cp "$SRCFILE" y.tab.c
slouken@0
   123
	    fi
slouken@0
   124
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
slouken@0
   125
	    if [ -f "$SRCFILE" ]; then
slouken@0
   126
	         cp "$SRCFILE" y.tab.h
slouken@0
   127
	    fi
slouken@0
   128
	  ;;
slouken@0
   129
	esac
slouken@0
   130
    fi
slouken@0
   131
    if [ ! -f y.tab.h ]; then
slouken@0
   132
	echo >y.tab.h
slouken@0
   133
    fi
slouken@0
   134
    if [ ! -f y.tab.c ]; then
slouken@0
   135
	echo 'main() { return 0; }' >y.tab.c
slouken@0
   136
    fi
slouken@0
   137
    ;;
slouken@0
   138
slouken@0
   139
  lex|flex)
slouken@0
   140
    echo 1>&2 "\
slouken@0
   141
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
   142
         you modified a \`.l' file.  You may need the \`Flex' package
slouken@0
   143
         in order for those modifications to take effect.  You can get
slouken@0
   144
         \`Flex' from any GNU archive site."
slouken@0
   145
    rm -f lex.yy.c
slouken@0
   146
    if [ $# -ne 1 ]; then
slouken@0
   147
        eval LASTARG="\${$#}"
slouken@0
   148
	case "$LASTARG" in
slouken@0
   149
	*.l)
slouken@0
   150
	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
slouken@0
   151
	    if [ -f "$SRCFILE" ]; then
slouken@0
   152
	         cp "$SRCFILE" lex.yy.c
slouken@0
   153
	    fi
slouken@0
   154
	  ;;
slouken@0
   155
	esac
slouken@0
   156
    fi
slouken@0
   157
    if [ ! -f lex.yy.c ]; then
slouken@0
   158
	echo 'main() { return 0; }' >lex.yy.c
slouken@0
   159
    fi
slouken@0
   160
    ;;
slouken@0
   161
slouken@0
   162
  makeinfo)
slouken@0
   163
    echo 1>&2 "\
slouken@0
   164
WARNING: \`$1' is missing on your system.  You should only need it if
slouken@0
   165
         you modified a \`.texi' or \`.texinfo' file, or any other file
slouken@0
   166
         indirectly affecting the aspect of the manual.  The spurious
slouken@0
   167
         call might also be the consequence of using a buggy \`make' (AIX,
slouken@0
   168
         DU, IRIX).  You might want to install the \`Texinfo' package or
slouken@0
   169
         the \`GNU make' package.  Grab either from any GNU archive site."
slouken@0
   170
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
slouken@0
   171
    if test -z "$file"; then
slouken@0
   172
      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
slouken@0
   173
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
slouken@0
   174
    fi
slouken@0
   175
    touch $file
slouken@0
   176
    ;;
slouken@0
   177
slouken@0
   178
  *)
slouken@0
   179
    echo 1>&2 "\
slouken@0
   180
WARNING: \`$1' is needed, and you do not seem to have it handy on your
slouken@0
   181
         system.  You might have modified some files without having the
slouken@0
   182
         proper tools for further handling them.  Check the \`README' file,
slouken@0
   183
         it often tells you about the needed prerequirements for installing
slouken@0
   184
         this package.  You may also peek at any GNU archive site, in case
slouken@0
   185
         some other package would contain this missing \`$1' program."
slouken@0
   186
    exit 1
slouken@0
   187
    ;;
slouken@0
   188
esac
slouken@0
   189
slouken@0
   190
exit 0