From: Eric Blake Date: Sat, 6 Jun 2009 16:38:23 +0000 (-0600) Subject: Document fallback behavior of AC_PROG_LEX. X-Git-Tag: v2.64~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bef5cc354c3d837446ebb730426e7f9ab32622ec;p=thirdparty%2Fautoconf.git Document fallback behavior of AC_PROG_LEX. * doc/autoconf.texi (Particular Programs) : Mention why fallback is :, and that a --version check must be used to determine whether flex was found. Reported by Patrick Welche. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 8a994a972..45cc4b4a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-06-06 Eric Blake + + Document fallback behavior of AC_PROG_LEX. + * doc/autoconf.texi (Particular Programs) : Mention + why fallback is :, and that a --version check must be used to + determine whether flex was found. + Reported by Patrick Welche. + 2009-05-28 Jim Meyering Fix syntax errors in autoconf.texi. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 5eb8964ab..215c86475 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -3922,7 +3922,11 @@ configuration files. If @code{flex} is found, set output variable @code{LEX} to @samp{flex} and @code{LEXLIB} to @option{-lfl}, if that library is in a standard place. Otherwise set @code{LEX} to @samp{lex} and @code{LEXLIB} to -@option{-ll}. +@option{-ll}, if found. If neither variant is available, set @code{LEX} +to @samp{:}; for packages that ship the generated @file{file.yy.c} +alongside the source @file{file.l}, this default allows users without a +lexer generator to still build the package even if the timestamp for +@file{file.l} is inadvertantly changed. Define @code{YYTEXT_POINTER} if @code{yytext} defaults to @samp{char *} instead of to @samp{char []}. Also set output variable @code{LEX_OUTPUT_ROOT} to @@ -3952,6 +3956,11 @@ fi The shell script @command{missing} can be found in the Automake distribution. +Remember that the user may have supplied an alternate location in +@env{LEX}, so if Flex is required, it is better to check that the user +provided something sufficient by parsing the output of @samp{$LEX +--version} than by simply relying on @code{test "x$LEX" = xflex}. + To ensure backward compatibility, Automake's @code{AM_PROG_LEX} invokes (indirectly) this macro twice, which causes an annoying but benign ``@code{AC_PROG_LEX} invoked multiple times'' warning. Future versions