From ddd47f70f21ebded4c1a79c13ebb8fc51af158f1 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Thu, 16 Dec 2021 17:05:11 +0000 Subject: build: only require bison and flex if the generated files do not exist automake recommends including the files generated by bison and flex in distribution tar-balls and runs bison and flex during `make dist` to generate them. Thus, in the normal case where the software is being compiled by an end-user, the generated files already exist and bison and flex are not required. Therefore, amend the configure script only to require them if the generated files do not exist. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 3a3af45..a20c6bb 100644 --- a/configure.ac +++ b/configure.ac @@ -26,13 +26,13 @@ case "$host" in esac dnl Dependencies -if test -z "$ac_cv_prog_YACC" +if test -z "$ac_cv_prog_YACC" -a ! -f "${srcdir}/src/read_config_yy.c" then echo "*** Error: No suitable bison/yacc found. ***" echo " Please install the 'bison' package." exit 1 fi -if test -z "$ac_cv_prog_LEX" +if test -z "$ac_cv_prog_LEX" -a ! -f "${srcdir}/src/read_config_lex.c" then echo "*** Error: No suitable flex/lex found. ***" echo " Please install the 'flex' package." -- cgit v1.2.3