From f2ba10497e9437b36a910cb980c6907b04844ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 19 Nov 2017 11:38:18 +0200 Subject: [PATCH] Make Flex and Bison tests inconditional By GNU/automake design, those tools have to be present when building from VCS, even if the generated code is not actually compiled. This fixes #19086. Also this potentially allows more than one module to use them. --- configure.ac | 4 ++-- modules/codec/Makefile.am | 2 -- modules/common.am | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 255e688e9b..af1b267096 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,8 @@ AC_PROG_EGREP AC_PROG_MAKE_SET AC_PROG_INSTALL AM_PROG_AS +AC_PROG_LEX +AC_PROG_YACC AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files]) AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :) @@ -2979,10 +2981,8 @@ dnl AC_ARG_ENABLE(css, [ --enable-css CSS selector engine (default auto)]) AS_IF([test "${enable_css}" != "no"], [ - AC_PROG_LEX with_css="no" AS_IF([test "x$LEX" != "x:"], [ - AC_PROG_YACC dnl can only accept bison or we need byacc feature test for %destructor AS_IF([test "x$YACC" = "xbison -y"], [ AC_DEFINE(HAVE_CSS, 1, [Define if CSS engine is built]) diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am index 20899d88d1..5044c06927 100644 --- a/modules/codec/Makefile.am +++ b/modules/codec/Makefile.am @@ -228,9 +228,7 @@ libwebvtt_plugin_la_SOURCES = codec/webvtt/subsvtt.c \ demux/webvtt.c \ demux/mp4/minibox.h codec_LTLIBRARIES += libwebvtt_plugin.la -AM_YFLAGS = -d if ENABLE_CSS -SUFFIXES += .l .y # dependency: we need grammar build first BUILT_SOURCES += codec/webvtt/CSSGrammar.h libwebvtt_plugin_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/codec/webvtt/ -I$(builddir)/codec/webvtt/ diff --git a/modules/common.am b/modules/common.am index 7d3ce16978..1b9117c98d 100644 --- a/modules/common.am +++ b/modules/common.am @@ -35,5 +35,6 @@ AM_LDFLAGS = \ if HAVE_WIN32 AM_LDFLAGS += $(top_builddir)/modules/module.rc.lo -Wc,-static endif +AM_YFLAGS = -d -SUFFIXES = +SUFFIXES = .l .y