meson: fix handling feature options
There's a couple of cases where we have restrictions placed on the enabled case, that are not also enforced for the auto case. This means that sometimes things become enabled with auto where they should have become disabled. Fortunately Meson actually has a mechanism to simplify this problem, feature_options have .require()
and .allowed()
methods starting in Meson 0.59, which specifically do the right thing in the auto, disabled, and enabled case automatically. This reduces the amount of code and prevents accidents like the first couple of patches fix.
I've split the use of .require()
out into it's own patch, since it does require a Meson bump, and that may not be desirable. The first two patches should land regardless.