Skip to contentSkip to conversation

build: Allow building from tarballs without yacc/lex

PATCH In review Matt Turner 2 participants 3 messages Apr 7, 2020 – Apr 19, 2020 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Allow building from tarballs without yacc/lex

The generated files are included in the tarballs already, but configure.ac was coded to fail if yacc/lex were not found regardless.

---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
index a04d94bc..3496e410 100644
@@ -29,13 +29,13 @@ AC_PROG_SED
 AM_PROG_LEX
 AC_PROG_YACC
 
-if test -z "$ac_cv_prog_YACC"
+if test -z "$ac_cv_prog_YACC" -a ! -f "${srcdir}/src/parser_bison.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/scanner.c"
 then
         echo "*** Error: No suitable flex/lex found. ***"
         echo "    Please install the 'flex' package."
Signature · 1 line
2.24.1
#2 lore raw
In reply to Matt Turner
Quoted 2 lines · Matt Turner

The generated files are included in the tarballs already, but configure.ac was coded to fail if yacc/lex were not found regardless.

Also applied, thanks.