[PATCH app-xkbcomp] config: allow to build tarball when yacc is missing

Gaetan Nadon memsize at videotron.ca
Thu Jul 8 13:12:59 PDT 2010


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 <jcristau at debian.org>
Signed-off-by: Gaetan Nadon <memsize at 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



More information about the xorg-devel mailing list