gst-plugins-nuvdemux/missing
author rosfran
Thu Oct 26 18:55:14 2006 +0100 (2006-10-26)
branchtrunk
changeset 56 24be83eaef89
permissions -rwxr-xr-x
[svn r57] Fixed problem with the audio frame timestamps.
melunko@47
     1
#! /bin/sh
melunko@47
     2
# Common stub for a few missing GNU programs while installing.
melunko@47
     3
melunko@47
     4
scriptversion=2003-09-02.23
melunko@47
     5
melunko@47
     6
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 
melunko@47
     7
#   Free Software Foundation, Inc.
melunko@47
     8
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
melunko@47
     9
melunko@47
    10
# This program is free software; you can redistribute it and/or modify
melunko@47
    11
# it under the terms of the GNU General Public License as published by
melunko@47
    12
# the Free Software Foundation; either version 2, or (at your option)
melunko@47
    13
# any later version.
melunko@47
    14
melunko@47
    15
# This program is distributed in the hope that it will be useful,
melunko@47
    16
# but WITHOUT ANY WARRANTY; without even the implied warranty of
melunko@47
    17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
melunko@47
    18
# GNU General Public License for more details.
melunko@47
    19
melunko@47
    20
# You should have received a copy of the GNU General Public License
melunko@47
    21
# along with this program; if not, write to the Free Software
melunko@47
    22
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
melunko@47
    23
# 02111-1307, USA.
melunko@47
    24
melunko@47
    25
# As a special exception to the GNU General Public License, if you
melunko@47
    26
# distribute this file as part of a program that contains a
melunko@47
    27
# configuration script generated by Autoconf, you may include it under
melunko@47
    28
# the same distribution terms that you use for the rest of that program.
melunko@47
    29
melunko@47
    30
if test $# -eq 0; then
melunko@47
    31
  echo 1>&2 "Try \`$0 --help' for more information"
melunko@47
    32
  exit 1
melunko@47
    33
fi
melunko@47
    34
melunko@47
    35
run=:
melunko@47
    36
melunko@47
    37
# In the cases where this matters, `missing' is being run in the
melunko@47
    38
# srcdir already.
melunko@47
    39
if test -f configure.ac; then
melunko@47
    40
  configure_ac=configure.ac
melunko@47
    41
else
melunko@47
    42
  configure_ac=configure.in
melunko@47
    43
fi
melunko@47
    44
melunko@47
    45
msg="missing on your system"
melunko@47
    46
melunko@47
    47
case "$1" in
melunko@47
    48
--run)
melunko@47
    49
  # Try to run requested program, and just exit if it succeeds.
melunko@47
    50
  run=
melunko@47
    51
  shift
melunko@47
    52
  "$@" && exit 0
melunko@47
    53
  # Exit code 63 means version mismatch.  This often happens
melunko@47
    54
  # when the user try to use an ancient version of a tool on
melunko@47
    55
  # a file that requires a minimum version.  In this case we
melunko@47
    56
  # we should proceed has if the program had been absent, or
melunko@47
    57
  # if --run hadn't been passed.
melunko@47
    58
  if test $? = 63; then
melunko@47
    59
    run=:
melunko@47
    60
    msg="probably too old"
melunko@47
    61
  fi
melunko@47
    62
  ;;
melunko@47
    63
esac
melunko@47
    64
melunko@47
    65
# If it does not exist, or fails to run (possibly an outdated version),
melunko@47
    66
# try to emulate it.
melunko@47
    67
case "$1" in
melunko@47
    68
melunko@47
    69
  -h|--h|--he|--hel|--help)
melunko@47
    70
    echo "\
melunko@47
    71
$0 [OPTION]... PROGRAM [ARGUMENT]...
melunko@47
    72
melunko@47
    73
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
melunko@47
    74
error status if there is no known handling for PROGRAM.
melunko@47
    75
melunko@47
    76
Options:
melunko@47
    77
  -h, --help      display this help and exit
melunko@47
    78
  -v, --version   output version information and exit
melunko@47
    79
  --run           try to run the given command, and emulate it if it fails
melunko@47
    80
melunko@47
    81
Supported PROGRAM values:
melunko@47
    82
  aclocal      touch file \`aclocal.m4'
melunko@47
    83
  autoconf     touch file \`configure'
melunko@47
    84
  autoheader   touch file \`config.h.in'
melunko@47
    85
  automake     touch all \`Makefile.in' files
melunko@47
    86
  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
melunko@47
    87
  flex         create \`lex.yy.c', if possible, from existing .c
melunko@47
    88
  help2man     touch the output file
melunko@47
    89
  lex          create \`lex.yy.c', if possible, from existing .c
melunko@47
    90
  makeinfo     touch the output file
melunko@47
    91
  tar          try tar, gnutar, gtar, then tar without non-portable flags
melunko@47
    92
  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
melunko@47
    93
melunko@47
    94
Send bug reports to <bug-automake@gnu.org>."
melunko@47
    95
    ;;
melunko@47
    96
melunko@47
    97
  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
melunko@47
    98
    echo "missing $scriptversion (GNU Automake)"
melunko@47
    99
    ;;
melunko@47
   100
melunko@47
   101
  -*)
melunko@47
   102
    echo 1>&2 "$0: Unknown \`$1' option"
melunko@47
   103
    echo 1>&2 "Try \`$0 --help' for more information"
melunko@47
   104
    exit 1
melunko@47
   105
    ;;
melunko@47
   106
melunko@47
   107
  aclocal*)
melunko@47
   108
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
melunko@47
   109
       # We have it, but it failed.
melunko@47
   110
       exit 1
melunko@47
   111
    fi
melunko@47
   112
melunko@47
   113
    echo 1>&2 "\
melunko@47
   114
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   115
         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
melunko@47
   116
         to install the \`Automake' and \`Perl' packages.  Grab them from
melunko@47
   117
         any GNU archive site."
melunko@47
   118
    touch aclocal.m4
melunko@47
   119
    ;;
melunko@47
   120
melunko@47
   121
  autoconf)
melunko@47
   122
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
melunko@47
   123
       # We have it, but it failed.
melunko@47
   124
       exit 1
melunko@47
   125
    fi
melunko@47
   126
melunko@47
   127
    echo 1>&2 "\
melunko@47
   128
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   129
         you modified \`${configure_ac}'.  You might want to install the
melunko@47
   130
         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
melunko@47
   131
         archive site."
melunko@47
   132
    touch configure
melunko@47
   133
    ;;
melunko@47
   134
melunko@47
   135
  autoheader)
melunko@47
   136
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
melunko@47
   137
       # We have it, but it failed.
melunko@47
   138
       exit 1
melunko@47
   139
    fi
melunko@47
   140
melunko@47
   141
    echo 1>&2 "\
melunko@47
   142
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   143
         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
melunko@47
   144
         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
melunko@47
   145
         from any GNU archive site."
melunko@47
   146
    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
melunko@47
   147
    test -z "$files" && files="config.h"
melunko@47
   148
    touch_files=
melunko@47
   149
    for f in $files; do
melunko@47
   150
      case "$f" in
melunko@47
   151
      *:*) touch_files="$touch_files "`echo "$f" |
melunko@47
   152
				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
melunko@47
   153
      *) touch_files="$touch_files $f.in";;
melunko@47
   154
      esac
melunko@47
   155
    done
melunko@47
   156
    touch $touch_files
melunko@47
   157
    ;;
melunko@47
   158
melunko@47
   159
  automake*)
melunko@47
   160
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
melunko@47
   161
       # We have it, but it failed.
melunko@47
   162
       exit 1
melunko@47
   163
    fi
melunko@47
   164
melunko@47
   165
    echo 1>&2 "\
melunko@47
   166
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   167
         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
melunko@47
   168
         You might want to install the \`Automake' and \`Perl' packages.
melunko@47
   169
         Grab them from any GNU archive site."
melunko@47
   170
    find . -type f -name Makefile.am -print |
melunko@47
   171
	   sed 's/\.am$/.in/' |
melunko@47
   172
	   while read f; do touch "$f"; done
melunko@47
   173
    ;;
melunko@47
   174
melunko@47
   175
  autom4te)
melunko@47
   176
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
melunko@47
   177
       # We have it, but it failed.
melunko@47
   178
       exit 1
melunko@47
   179
    fi
melunko@47
   180
melunko@47
   181
    echo 1>&2 "\
melunko@47
   182
WARNING: \`$1' is needed, but is $msg.
melunko@47
   183
         You might have modified some files without having the
melunko@47
   184
         proper tools for further handling them.
melunko@47
   185
         You can get \`$1' as part of \`Autoconf' from any GNU
melunko@47
   186
         archive site."
melunko@47
   187
melunko@47
   188
    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
melunko@47
   189
    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
melunko@47
   190
    if test -f "$file"; then
melunko@47
   191
	touch $file
melunko@47
   192
    else
melunko@47
   193
	test -z "$file" || exec >$file
melunko@47
   194
	echo "#! /bin/sh"
melunko@47
   195
	echo "# Created by GNU Automake missing as a replacement of"
melunko@47
   196
	echo "#  $ $@"
melunko@47
   197
	echo "exit 0"
melunko@47
   198
	chmod +x $file
melunko@47
   199
	exit 1
melunko@47
   200
    fi
melunko@47
   201
    ;;
melunko@47
   202
melunko@47
   203
  bison|yacc)
melunko@47
   204
    echo 1>&2 "\
melunko@47
   205
WARNING: \`$1' $msg.  You should only need it if
melunko@47
   206
         you modified a \`.y' file.  You may need the \`Bison' package
melunko@47
   207
         in order for those modifications to take effect.  You can get
melunko@47
   208
         \`Bison' from any GNU archive site."
melunko@47
   209
    rm -f y.tab.c y.tab.h
melunko@47
   210
    if [ $# -ne 1 ]; then
melunko@47
   211
        eval LASTARG="\${$#}"
melunko@47
   212
	case "$LASTARG" in
melunko@47
   213
	*.y)
melunko@47
   214
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
melunko@47
   215
	    if [ -f "$SRCFILE" ]; then
melunko@47
   216
	         cp "$SRCFILE" y.tab.c
melunko@47
   217
	    fi
melunko@47
   218
	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
melunko@47
   219
	    if [ -f "$SRCFILE" ]; then
melunko@47
   220
	         cp "$SRCFILE" y.tab.h
melunko@47
   221
	    fi
melunko@47
   222
	  ;;
melunko@47
   223
	esac
melunko@47
   224
    fi
melunko@47
   225
    if [ ! -f y.tab.h ]; then
melunko@47
   226
	echo >y.tab.h
melunko@47
   227
    fi
melunko@47
   228
    if [ ! -f y.tab.c ]; then
melunko@47
   229
	echo 'main() { return 0; }' >y.tab.c
melunko@47
   230
    fi
melunko@47
   231
    ;;
melunko@47
   232
melunko@47
   233
  lex|flex)
melunko@47
   234
    echo 1>&2 "\
melunko@47
   235
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   236
         you modified a \`.l' file.  You may need the \`Flex' package
melunko@47
   237
         in order for those modifications to take effect.  You can get
melunko@47
   238
         \`Flex' from any GNU archive site."
melunko@47
   239
    rm -f lex.yy.c
melunko@47
   240
    if [ $# -ne 1 ]; then
melunko@47
   241
        eval LASTARG="\${$#}"
melunko@47
   242
	case "$LASTARG" in
melunko@47
   243
	*.l)
melunko@47
   244
	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
melunko@47
   245
	    if [ -f "$SRCFILE" ]; then
melunko@47
   246
	         cp "$SRCFILE" lex.yy.c
melunko@47
   247
	    fi
melunko@47
   248
	  ;;
melunko@47
   249
	esac
melunko@47
   250
    fi
melunko@47
   251
    if [ ! -f lex.yy.c ]; then
melunko@47
   252
	echo 'main() { return 0; }' >lex.yy.c
melunko@47
   253
    fi
melunko@47
   254
    ;;
melunko@47
   255
melunko@47
   256
  help2man)
melunko@47
   257
    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
melunko@47
   258
       # We have it, but it failed.
melunko@47
   259
       exit 1
melunko@47
   260
    fi
melunko@47
   261
melunko@47
   262
    echo 1>&2 "\
melunko@47
   263
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   264
	 you modified a dependency of a manual page.  You may need the
melunko@47
   265
	 \`Help2man' package in order for those modifications to take
melunko@47
   266
	 effect.  You can get \`Help2man' from any GNU archive site."
melunko@47
   267
melunko@47
   268
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
melunko@47
   269
    if test -z "$file"; then
melunko@47
   270
	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
melunko@47
   271
    fi
melunko@47
   272
    if [ -f "$file" ]; then
melunko@47
   273
	touch $file
melunko@47
   274
    else
melunko@47
   275
	test -z "$file" || exec >$file
melunko@47
   276
	echo ".ab help2man is required to generate this page"
melunko@47
   277
	exit 1
melunko@47
   278
    fi
melunko@47
   279
    ;;
melunko@47
   280
melunko@47
   281
  makeinfo)
melunko@47
   282
    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
melunko@47
   283
       # We have makeinfo, but it failed.
melunko@47
   284
       exit 1
melunko@47
   285
    fi
melunko@47
   286
melunko@47
   287
    echo 1>&2 "\
melunko@47
   288
WARNING: \`$1' is $msg.  You should only need it if
melunko@47
   289
         you modified a \`.texi' or \`.texinfo' file, or any other file
melunko@47
   290
         indirectly affecting the aspect of the manual.  The spurious
melunko@47
   291
         call might also be the consequence of using a buggy \`make' (AIX,
melunko@47
   292
         DU, IRIX).  You might want to install the \`Texinfo' package or
melunko@47
   293
         the \`GNU make' package.  Grab either from any GNU archive site."
melunko@47
   294
    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
melunko@47
   295
    if test -z "$file"; then
melunko@47
   296
      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
melunko@47
   297
      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
melunko@47
   298
    fi
melunko@47
   299
    touch $file
melunko@47
   300
    ;;
melunko@47
   301
melunko@47
   302
  tar)
melunko@47
   303
    shift
melunko@47
   304
    if test -n "$run"; then
melunko@47
   305
      echo 1>&2 "ERROR: \`tar' requires --run"
melunko@47
   306
      exit 1
melunko@47
   307
    fi
melunko@47
   308
melunko@47
   309
    # We have already tried tar in the generic part.
melunko@47
   310
    # Look for gnutar/gtar before invocation to avoid ugly error
melunko@47
   311
    # messages.
melunko@47
   312
    if (gnutar --version > /dev/null 2>&1); then
melunko@47
   313
       gnutar "$@" && exit 0
melunko@47
   314
    fi
melunko@47
   315
    if (gtar --version > /dev/null 2>&1); then
melunko@47
   316
       gtar "$@" && exit 0
melunko@47
   317
    fi
melunko@47
   318
    firstarg="$1"
melunko@47
   319
    if shift; then
melunko@47
   320
	case "$firstarg" in
melunko@47
   321
	*o*)
melunko@47
   322
	    firstarg=`echo "$firstarg" | sed s/o//`
melunko@47
   323
	    tar "$firstarg" "$@" && exit 0
melunko@47
   324
	    ;;
melunko@47
   325
	esac
melunko@47
   326
	case "$firstarg" in
melunko@47
   327
	*h*)
melunko@47
   328
	    firstarg=`echo "$firstarg" | sed s/h//`
melunko@47
   329
	    tar "$firstarg" "$@" && exit 0
melunko@47
   330
	    ;;
melunko@47
   331
	esac
melunko@47
   332
    fi
melunko@47
   333
melunko@47
   334
    echo 1>&2 "\
melunko@47
   335
WARNING: I can't seem to be able to run \`tar' with the given arguments.
melunko@47
   336
         You may want to install GNU tar or Free paxutils, or check the
melunko@47
   337
         command line arguments."
melunko@47
   338
    exit 1
melunko@47
   339
    ;;
melunko@47
   340
melunko@47
   341
  *)
melunko@47
   342
    echo 1>&2 "\
melunko@47
   343
WARNING: \`$1' is needed, and is $msg.
melunko@47
   344
         You might have modified some files without having the
melunko@47
   345
         proper tools for further handling them.  Check the \`README' file,
melunko@47
   346
         it often tells you about the needed prerequisites for installing
melunko@47
   347
         this package.  You may also peek at any GNU archive site, in case
melunko@47
   348
         some other package would contain this missing \`$1' program."
melunko@47
   349
    exit 1
melunko@47
   350
    ;;
melunko@47
   351
esac
melunko@47
   352
melunko@47
   353
exit 0
melunko@47
   354
melunko@47
   355
# Local variables:
melunko@47
   356
# eval: (add-hook 'write-file-hooks 'time-stamp)
melunko@47
   357
# time-stamp-start: "scriptversion="
melunko@47
   358
# time-stamp-format: "%:y-%02m-%02d.%02H"
melunko@47
   359
# time-stamp-end: "$"
melunko@47
   360
# End: