configure script does not accept non-absolute GHC variable
Summary
Passing ./configure GHC=ghc-9.8.2
silently switches back to whatever ghc
is in PATH, potentially leading to further compile failures.
This is a result of the combination of the following autotools macros:
AC_ARG_VAR(GHC,[Use as the full path to GHC. [default=autodetect]])
AC_PATH_PROG([GHC], [ghc])
In my opinion, we should be using AC_CHECK_PROG([GHC], [ghc], [ghc])
. I see no reason for the "absolute path" requirement, especially given the silent and possibly wrong fallback.
Steps to reproduce
- unpack GHC
- run
./configure GHC=ghc-9.8.2
while some other ghc is the PATH default - observe the configure script picking the
ghc
in PATH as opposed to what was explicitly specified
Expected behavior
Either fail properly if GHC
is a non-absolute path variable or relax the constraints. I propose the latter.
Environment
- GHC version used: any recent
Optional:
- Operating System: Linux
- System Architecture: x86_64