configure discards a user-supplied BASH_SHELL - #907
Merged
Conversation
AS_UNSET erased the variable before AC_PATH_PROGS could honour it, so "./configure BASH_SHELL=/path" had no effect and there was no way to point the build at a bash other than the first one on PATH. Nothing presets BASH_SHELL, which was the whole problem with BASH in #895, so declaring it precious is enough. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
An in-tree build leaves a config.status in srcdir, and autoconf then refuses the out-of-tree run the test needs. Every CI build leg builds in-tree, so the check failed there while passing on an out-of-tree tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
The nested configure ran without the flags the outer one was given, so on macOS it died at the openssl check that Homebrew paths satisfy. BASH_SHELL is resolved long before that, so assert on the trace and let the run fail. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
Reading the configure trace let a mutant through: resolve the override correctly, clobber BASH_SHELL one line later, and both assertions passed while every Makefile got the wrong shell. Prefer the generated Makefile and keep the trace only as a fallback for a configure that dies early. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #898, which introduced
BASH_SHELLand unset it first so a preset value could never defeat the search. That also threw away an explicit./configure BASH_SHELL=/path, so on a machine whose first bash onPATHis old or runs in POSIX mode there was no way to point the build elsewhere.BASHneeded the guard because bash presets it;BASH_SHELLis our own name and nothing presets it, soAC_ARG_VARis enough, and it documents the knob inconfigure --help.