But here's the thing: when configure doesn't find lex or flex, it
sets the value of the program to ":". wth? Wouldn't "false" be
a far more effective substitute? If there's a way to tell configure
to change that behavior, we should consider it.
This behavior is part of autoconf. From the documentation for AC_PROG_LEX:
If flex is found, set output variable LEX to ‘flex’ and LEXLIB
to -lfl, if that library is in a standard place. Otherwise set LEX
to ‘lex’ and LEXLIB to -ll, if found. If neither variant is
available, set LEX to ‘:’; for packages that ship the generated
file.yy.c alongside the source file.l, this default allows users
without a lexer generator to still build the package even if the
timestamp for file.l is inadvertently changed.
We're in this situation; we ship the flex output in distribution tar
files (Automake does that for us). Where this fails is when you build
directly from a repo checkout, as the generates flex/bison output isn't
there.
Fixing this for the general case would be a bit of a pain; I'm not
sure there's a wonderful answer. We could do something like outputting
a warning in configure if LEX equals ':' warning that you will need that
tool if you are building from a repository checkout, but that presumes
that people would actually read such a message :-)
--Ken