From dbcf80a3bd16de893722ce140c98fd2437e331ff Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 29 Apr 2021 08:50:47 +0000 Subject: [PATCH] configure: Drop custom bison make rules Signed-off-by: Michael Tremer --- Makefile.am | 11 ++++------- configure.ac | 13 ++++++++++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index d7e808832..6c12e603c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,6 +63,10 @@ AM_LDFLAGS = $(OUR_LDFLAGS) \ -Wl,--gc-sections \ -Wl,--as-needed +AM_YFLAGS = \ + -d \ + -Wno-yacc + PAKFIRE_CPPFLAGS = -I$(top_srcdir)/src/libpakfire/include PAKFIRE_LIBS = libpakfire.la @@ -229,13 +233,6 @@ libpakfire_parser_la_CPPFLAGS = \ -include $(top_builddir)/config.h \ -DPAKFIRE_PRIVATE -src/libpakfire/parser/scanner.c: src/libpakfire/parser/grammar.h - -src/libpakfire/parser/grammar.h: src/libpakfire/parser/grammar.c - -src/libpakfire/parser/grammar.c: src/libpakfire/parser/grammar.y Makefile - $(AM_V_GEN) $(BISON) -Wall -t -d -o $@ $< - BUILT_SOURCES += \ src/libpakfire/parser/grammar.h diff --git a/configure.ac b/configure.ac index 6f32e90ca..0a8b12bba 100644 --- a/configure.ac +++ b/configure.ac @@ -109,11 +109,22 @@ AC_SUBST([OUR_LDFLAGS], $with_ldflags) # Bison AC_PROG_YACC -AC_PATH_PROG([BISON],[bison]) + +if test -z "${ac_cv_prog_YACC}"; then + echo "*** Error: No suitable bison/yacc found. ***" + echo " Please install the 'bison' package." + exit 1 +fi # Flex AM_PROG_LEX +if test -z "${ac_cv_prog_LEX}"; then + echo "*** Error: No suitable flex/lex found. ***" + echo " Please install the 'flex' package." + exit 1 +fi + # Python AM_PATH_PYTHON([3.6]) -- 2.47.3