From e2f9f51667cf88c398d4536cfcc6996e9d0aa62a Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Tue, 7 Dec 2010 10:59:13 -0500 Subject: [PATCH] config: allow to build tarball when yacc is missing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Acked-by: Daniel Stone Reviewed-by: Kristian Høgsberg Signed-off-by: Gaetan Nadon --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 AC_PROG_LIBTOOL -AC_PROG_YACC AC_PROG_LEX +AC_PROG_YACC +AC_PATH_PROG([YACC_INST], $YACC) +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 +fi m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([Could not locate the pkg-config autoconf macros. -- 2.7.4