-if ! which yacc > /dev/null 2>&1; then
- echo "WARNING: yacc not found!" >&2
- echo "Make sure that you have a GNU bison compatible tool available." >&2
-fi
+check_for_application ()
+{
+ for PROG in "$@"
+ do
+ which "$PROG" >/dev/null 2>&1
+ if test $? -ne 0; then
+ cat >&2 <<EOF
+WARNING: \`$PROG' not found!
+ Please make sure that \`$PROG' is installed and is in one of the
+ directories listed in the PATH environment variable.
+EOF
+ GLOBAL_ERROR_INDICATOR=1
+ fi
+ done
+}
+
+check_for_application lex bison autoheader aclocal automake autoconf pkg-config