Very old shells suffered from bugs which meant that prefixing variables with an “x” to ensure that the lefthand side of a comparison always started with an alphanumeric character was needed. Modern shells don’t suffer from this issue (i.e Bash was fixed in 1996).
In any case, we’ve already got unprefixed checks used in our codebase, i.e https://github.com/bitcoin/bitcoin/blob/681b25e3cd7d084f642693152322ed9a40f33ba0/configure.ac#L292 and have libs (in depends) that also use unprefixed comparisons in their configure scripts.
I think it’s time that we consolidate on not using the x-prefix workaround. At best it’s mostly just confusing. Could simplify some of these checks further in future.
More info: https://github.com/koalaman/shellcheck/wiki/SC2268 https://www.vidarholen.net/contents/blog/?p=1035