1 #! /bin/sh
3 GLOBAL_ERROR_INDICATOR=0
5 check_for_application ()
6 {
7 for PROG in "$@"
8 do
9 if ! which "$PROG" >/dev/null 2>&1; then
10 cat >&2 <<EOF
11 WARNING: \`$PROG' not found!
12 Please make sure that \`$PROG' is installed and is in one of the
13 directories listed in the PATH environment variable.
14 EOF
15 GLOBAL_ERROR_INDICATOR=1
16 fi
17 done
18 }
20 check_for_application lex yacc autoheader aclocal automake autoconf
22 # Actually we don't need the pkg-config executable, but we need the M4 macros.
23 # We check for `pkg-config' here and hope that M4 macros will then be
24 # available, too.
25 check_for_application pkg-config
27 libtoolize=""
28 if which libtoolize >/dev/null 2>&1
29 then
30 libtoolize=libtoolize
31 else if which glibtoolize >/dev/null 2>&1
32 then
33 libtoolize=glibtoolize
34 else
35 cat >&2 <<EOF
36 WARNING: Neither \`libtoolize' nor \`glibtoolize' have been found!
37 Please make sure that one of them is installed and is in one of the
38 directories listed in the PATH environment variable.
39 EOF
40 GLOBAL_ERROR_INDICATOR=1
41 fi; fi
43 if test "$GLOBAL_ERROR_INDICATOR" != "0"
44 then
45 exit 1
46 fi
48 set -x
50 autoheader \
51 && aclocal \
52 && $libtoolize --ltdl --copy --force \
53 && automake --add-missing --copy \
54 && autoconf