Autoconf does not handle this scenario as well as Automake does.
If xkbparse.c is already there, do not abort the configuration
if yacc is missing as it is not needed.

If both xkbparse.c and yacc are missing, abort configuration.
Yacc is a required tool to build the package.

Reported-by: Julien Cristau <jcris...@debian.org>
Signed-off-by: Gaetan Nadon <mems...@videotron.ca>
---
 configure.ac |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3ad342c..eae4640 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,8 @@ AM_CONFIG_HEADER(config.h)
 AC_PROG_CC
 AC_PROG_YACC
 AC_PATH_PROG([YACC_INST], $YACC)
-test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable to compile 
xkbparse.y])
+AC_CHECK_FILE([xkbparse.c], [],
+              [test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable 
to compile xkbparse.y])])
 AC_PROG_INSTALL
 
 
-- 
1.6.0.4

It turns out to be a one liner. It's a big hole in autoconf. I check other 
packages, this is the only
tool we use in this way and the AC_PROG_YACC macro happened to be flaky. It is 
quite a coincidence.

Same story here:
app/xkbevd
app/xgc
app/twm

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to