|
From: | Akim Demaille |
Subject: | Re: RFC: build: be robust to missing flex |
Date: | Tue, 10 Apr 2012 21:43:21 +0200 |
[This started in bison-patches]. Le 27 mars 2012 à 16:27, Stefano Lattarini a écrit : > On 03/27/2012 04:16 PM, Akim Demaille wrote: >> >> [BIG SNIP] >> >> 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 >> > I think the best fix in the long term would be to enhance AC_PROG_LEX to set > a variable telling whether $LEX is flex or not (similarly to what is done by > AC_PROG_CC etc.). The Bison's configure could simply use this variable to > determine whether a good-enough flex has been found. > > Would you think it worthwhile to submit a patch to Autoconf before 2.69 gets > released? hi Stefano, What do you think about this? If this suits Autoconfers, I can provide a more complete patch for Autoconf. And if good enough, AC_PROG_YACC will follow with Bison. I confess I am a bit frustrated to define FLEX to yes/'', as I'd be happy to use $(FLEX) in my Makefiles, but that's ok. It hurts much more in the context of Bison, since the command line behavior is quite different in that case, so defining $(YACC) to be 'bison' and $(BISON) to be yes will probably be a bit weird.
0001-build-flex.m4.patch
Description: Binary data
0002-build-flex.m4-quote-properly.patch
Description: Binary data
0003-build-flex.m4-check-for-Flex.patch
Description: Binary data
0004-build-require-Flex.patch
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |