[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_PROG_LEX behavior
From: |
Eric Blake |
Subject: |
Re: AC_PROG_LEX behavior |
Date: |
Sat, 06 Jun 2009 10:44:05 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[moving to autoconf-patches]
According to Ralf Wildenhues on 6/4/2009 3:05 PM:
> Hi Patrick,
Hi Ralf, Patrick,
>>>
>>> Is this intentional ? Is it documented somewhere ? In other words, is it
>>> ok for me to check for "test $LEX != ':'" to discover success ?
>
> Hmm. I'd probably say that would be ok. Not because I think it is a
> good idea to document that LEX is set to ':' when not found, but because
> I think we cannot change that anyway because software relies on it.
>
> So, if Eric wants to adjust the documentation to reflect the ':' value
> of LEX here, I'd be fine with that.
Sounds good. I'm applying the patch below.
> then but of course the user could still fool you by adding a wrapper
> script for a non-flex lex or some other program. Thus I think the
> configure.ac test should just try to execute `$LEX --version' or look
> for some needed option in the --help output or so.
I think I covered this issue, too.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoqnNUACgkQ84KuGfSFAYB5cwCguS5ewzHS0pcEKnN2Djr6hV00
DAAAn0u6wz31EBVMTR9dMdxOuTbHVO9C
=5cvR
-----END PGP SIGNATURE-----
>From bef5cc354c3d837446ebb730426e7f9ab32622ec Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 6 Jun 2009 10:38:23 -0600
Subject: [PATCH] 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.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 8 ++++++++
doc/autoconf.texi | 11 ++++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8a994a9..45cc4b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-06-06 Eric Blake <address@hidden>
+
+ 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 <address@hidden>
Fix syntax errors in autoconf.texi.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 5eb8964..215c864 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -3922,7 +3922,11 @@ Particular Programs
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
address@hidden
address@hidden, 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
address@hidden 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 @@ Particular Programs
The shell script @command{missing} can be found in the Automake
distribution.
+Remember that the user may have supplied an alternate location in
address@hidden, 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
address@hidden invoked multiple times'' warning. Future versions
--
1.6.3.rc3.2.g4b51
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: AC_PROG_LEX behavior,
Eric Blake <=