build: fix configure test for yacc It only works if 'bison' or 'byacc' are provided, but sometimes byacc is installed as plain 'yacc'. The check fails for that. I broke this in bdd8c11, restore Daniel's retrospectively clever check. Signed-off-by: Ran Benita <ran234@gmail.com>
diff --git a/configure.ac b/configure.ac
index 853ffe3..2c328e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,8 @@ PKG_PROG_PKG_CONFIG
# Note: we use some yacc extensions, which work with either GNU bison
# (preferred) or byacc. Other yacc's may or may not work.
AC_PROG_YACC
-AS_IF([test ! -f "src/xkbcomp/parser.c" -a "x$ac_cv_prog_YACC" = x], [
+AC_PATH_PROG([YACC_INST], [$YACC])
+AS_IF([test ! -f "src/xkbcomp/parser.c" -a "x$YACC_INST" = x], [
AC_MSG_ERROR([yacc not found - unable to compile src/xkbcomp/parser.y])
])