Commit 1aabc5223550fa05e7f33f5cf167efc572b4dccc

Ran Benita 2014-02-10T20:50:58

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>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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])
 ])