[Mesa-dev] [PATCH] autoconf: bail out if flex isn't found
Gaetan Nadon
memsize at videotron.ca
Wed Mar 14 08:10:20 PDT 2012
On 12-03-14 10:20 AM, Brian Paul wrote:
> On Tue, Mar 13, 2012 at 9:14 PM, Matt Turner <mattst88 at gmail.com> wrote:
>> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47248
>> Signed-off-by: Matt Turner <mattst88 at gmail.com>
>> ---
>> configure.ac | 3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index a2d906a..e7994b0 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -66,6 +66,9 @@ if test ! -f "$srcdir/src/glsl/glcpp/glcpp-parse.y"; then
>> fi
>> fi
>> AC_PROG_LEX
>> +if test "x$LEX" != xflex; then
>> + AC_MSG_ERROR([flex not found - unable to compile glcpp-lex.l])
>> +fi
>
> What if the system actually has lex? Would that work? Do our .l
> files use any flex-specific features?
>
> -Brian
>
There has been a similar discussion on xorg-devel when a developer
wished to use bison specific features. The BSD systems such as FreeBSD
or MAC use the base O/S without additional packages (that they call
"ports"). The base OS does not include GNU versions of lex & yacc.
In the light of this discussion I rephrased the xorg wiki for the lex &
yacc tools requirements. I suppose mesa is targeting most if not all
platforms that xorg builds on. Here it goes:
*
yacc <http://en.wikipedia.org/wiki/Yacc> The original AT&T parser
generator or an upward compatible version such as bison
<http://www.gnu.org/software/bison/> or byacc
<http://invisible-island.net/byacc/> whitout using its specific
features
*
lex <http://en.wikipedia.org/wiki/Lex_%28software%29> The original
AT&T lexical analyser generator or an upward compatible version such
as flex <http://flex.sourceforge.net/> whitout using its specific
features
http://www.x.org/wiki/ModularDevelopersGuide#Required_Tools
In the case where mesa, for the moment, is limited to flex, would there
be a scenario where a builder configures the module such that the glcpp
subdir is not build? If so, the configuration should not abort.
When building from a tarball which includes the flex generated code, the
configuration should not abort if flex is missing as it is not required
to have a successful build. This will allow all those systems without
flex to build from a tarball.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120314/d530e76c/attachment.htm>
More information about the mesa-dev
mailing list