Move headers from configure to compats.h #26
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.
configure currently has a lot of
${HAVE_...} -eq 0 ]
if blocks, printing out header code for compats.c, to config.h. This is a lot of repetition, does not allow for splitting the code up properly, and makes the configure code a bit less maintainable.Introduce instead a "compats.h" that should now be included by downstreams, alongside compats.c. Also, add Makefile.regen code to generate said file from the different compat_*.h parts, in the same way compats.c is generated.
The PR is doing this gradually, initially moving all the code that does:
Later on, the more tricky ones are being handled, one by one in a separate commit. This is a breaking change for downstreams, in the sense that they're going to need to add another file to their tree.
To review, it may be worth to look at
configure.in
at the end of the PR, and then review the commits one by one.I understand this is a wider change, and I expect it to be somewhat controversial :) I didn't open an issue first because I wanted to see how the end result will look like, and now that I see it I think it is much cleaner. YMMV, and no hard feelings if you outright reject it!