Le 27 mars 2012 à 15:43, Akim Demaille a écrit : >>> +if `$LEX --version` 2>/dev/null | grep flex; then >>> >> Spurious command substitution here? > > *blush*...
Actually there are other issues. One is that $missing_dir, documented by Autoconf, does not seem to exist. Automake says nothing about missing's location. Reading configure, $MISSING seems to be what I am looking for, but maybe after all I could just really require flex and stop bothering with missing. I was reluctant to this move because historically Bison did not require it, but on second thought it was wrong. So that would be the updated proposal. From af673933e403f380954c3f726079e3273b837b83 Mon Sep 17 00:00:00 2001 From: Akim Demaille <[email protected]> Date: Tue, 27 Mar 2012 08:22:49 +0200 Subject: [PATCH] build: require flex. Since the generated files are included in the tarball, it is not strictly needed. Yet if the user touches the flex source files, the builds do not propagate the changes properly. Besides, the examples now uses flex on the user side, and it seems better to require flex rather than degrading the way the package builds itself. With help from Stefano Lattarini. * configure.ac: We need flex to build bison, lex does not suffice. * examples/calc++/local.mk: Comment changes. --- configure.ac | 3 +++ examples/calc++/local.mk | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 622da5d..5c97683 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,9 @@ AC_SUBST([YACC_LIBRARY]) # Checks for programs. AC_PROG_LEX +if $LEX --version 2>/dev/null | $EGREP 'f?lex 2\.5\.3' >/dev/null; then :; else + AC_MSG_ERROR([flex 2.5.3* is required]) +fi AC_PROG_YACC AC_PROG_RANLIB AC_PROG_GNU_M4 diff --git a/examples/calc++/local.mk b/examples/calc++/local.mk index 16f49c4..d426f7d 100644 --- a/examples/calc++/local.mk +++ b/examples/calc++/local.mk @@ -70,4 +70,4 @@ nodist_examples_calc___calc___SOURCES = \ examples_calc___calc___CPPFLAGS = -I$(top_builddir)/examples/calc++ dist_TESTS += examples/calc++/calc++.test -endif +endif BISON_CXX_WORKS -- 1.7.9.4
