[PATCH libxkbcommon 4/6] config: allow to build tarball when yacc is missing

Gaetan Nadon memsize at videotron.ca
Tue Dec 7 13:41:25 PST 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.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
 configure.ac |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 61d6f2f..920e1a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,8 +35,14 @@ AM_MAINTAINER_MODE
 # Initialize libtool
+if test ! -f "src/xkbcomp/xkbparse.c"; then
+   if test -z "$YACC_INST"; then
+      AC_MSG_ERROR([yacc not found - unable to compile src/xkbcomp/xkbparse.y])
+   fi
     [m4_fatal([Could not locate the pkg-config autoconf macros.

More information about the xorg-devel mailing list