]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document fallback behavior of AC_PROG_LEX.
authorEric Blake <ebb9@byu.net>
Sat, 6 Jun 2009 16:38:23 +0000 (10:38 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 6 Jun 2009 16:41:47 +0000 (10:41 -0600)
* doc/autoconf.texi (Particular Programs) <AC_PROG_LEX>: 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 <ebb9@byu.net>
ChangeLog
doc/autoconf.texi

index 8a994a97286609d640a2b63394067e8396473b70..45cc4b4a2ad1822c3b52c74ad8f44c70d231a463 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-06  Eric Blake  <ebb9@byu.net>
+
+       Document fallback behavior of AC_PROG_LEX.
+       * doc/autoconf.texi (Particular Programs) <AC_PROG_LEX>: 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  <meyering@redhat.com>
 
        Fix syntax errors in autoconf.texi.
index 5eb8964ab0c1778bb3d7ed44cd9217984fa0aee0..215c864759434b8da80d6a710125c55e2df43fb9 100644 (file)
@@ -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