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