]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
build: Allow building from tarballs without yacc/lex
authorMatt Turner <mattst88@gmail.com>
Tue, 7 Apr 2020 20:23:37 +0000 (13:23 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 19 Apr 2020 16:41:35 +0000 (18:41 +0200)
The generated files are included in the tarballs already, but
configure.ac was coded to fail if yacc/lex were not found regardless.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac

index a04d94bc757c9e98220142404ddda5958b74c5df..3496e410dbbe2276b533d5bfbfa53ef565e78648 100644 (file)
@@ -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."