make building work again when flex is not installed #189
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This explicitly reverts commit 3f89340 because it was a bad idea.
The motivating bug report was #124 and the issue there occurred when building from a git clone, running ./bootstrap && ./configure && make, and having:
The autoconf manual has always documented the correct way to handle this is to check if lex is unavailable, and set it to the famous automake wrapper "missing", which checks if a program is missing at build time rather than at ./configure time, and fails the build if the rule cannot be run. This means:
When building from a git clone, if flex is not available then
The previous attempt to fix the highly confusing error instead resulted in configure erroring out, and saying flex is required, even when it is not required because a
make dist
tarball was used, which contains pregenerated tokenparser.c for the express purpose of making flex unnecessary.See autoconf documentation on $LEX:
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/html_node/Particular-Programs.html#index-AC_005fPROG_005fLEX-1
And automake documentation on why to use "missing": https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html