summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2021-12-16 17:05:11 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2021-12-17 12:58:47 +0100
commitddd47f70f21ebded4c1a79c13ebb8fc51af158f1 (patch)
tree0b15022db204e58cbf2b75846946cfb308707db3
parente83beca64100992d58f86dd8680e6a3ef30554fb (diff)
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 <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--configure.ac4
1 files 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."