diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-10-24 23:18:34 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2011-12-04 13:22:00 +0100 |
commit | ca0ba5df0fb8d3a62919b878ee30fa573dde6f93 (patch) | |
tree | c902e5c98559fd61be8129ebc55faaf71690db1a /lib | |
parent | 053534fc5718ad3aea4f2f1c5817d2a114fe5699 (diff) | |
download | automake-ca0ba5df0fb8d3a62919b878ee30fa573dde6f93.tar.gz |
tests: fix spurious failures due to missing 'yywrap()' function
The AC_PROG_LEX Autoconf macro does not diagnose a failure to find
the "lex library" expected to provide a `yywrap' function (function
which is required to link most lex-generated programs). On the
contrary, when all the link attempts (i.e., with `-ll' and `-lfl')
fail, configure declares that no lex library is needed, and simply
proceeds with the configuration process -- only for the build to
possibly fail later, at make time.
This behaviour is intended; the Autoconf manual reads:
``You are encouraged to use Flex in your sources, since it is
both more pleasant to use than plain Lex and the C source it
produces is portable. In order to ensure portability, however,
you must either provide a function `yywrap' or, if you don't use
it (e.g., your scanner has no `#include'-like feature), simply
include a `%noyywrap' statement in the scanner's source.''
This AC_PROG_LEX behaviour is causing some spurious failures of
the Automake testsuite in environments which lack a proper library
providing `yywrap' (this happens for example on Fedora-based
systems). The proper workaround is to simply provide a fall-back
implementation of `yywrap' in our lexers.
* tests/cond35.test: Provide a dummy `yywrap' function.
* tests/lex3.test: Likewise.
* tests/silent-lex-generic.test: Likewise.
* tests/silent-lex-gcc.test: Likewise.
* tests/silent-many-generic.test: Likewise.
* tests/silent-many-gcc.test: Likewise.
Reported by Jim Meyering:
<http://lists.gnu.org/archive/html/automake-patches/2011-10/msg00092.html>
Cherry-picked (with some edits) from commits `v1.11-1085-gb5c3968'
(master) and `v1.11-871-geb147a1' (testsuite-work).
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions