[conntrack-tools PATCH 1/3] build: only require bison and flex if the generated files do not exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3a3af4549162..a20c6bb4ca1c 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."
-- 
2.34.1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux