Fix for autoconf misbehaviour caused by cabal #1021
Merged
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.
The autoconf generated configure script tries to automatically determine the
location of the configure script. If the name (argv[0]) of the configure script
does not include a path separator autoconf will first scan the path for a
file named "configure" before defaulting to the current directory.
Cabal previously called configure by doing "sh configure" this will result in
it finding any files named "configure" in the path and using the location of
that file as the basedir to look for (amongst other things) C sources. The
result is that any C sources in the unpacked cabal directories are not found,
resulting in configure/build failures for all such packages (e.g. unix-time)
and all packages depending on those.
Changing cabal to call "sh ./configure" will avoid this behaviour, the presence
of a path separator causes autoconf to default to checking the current
directory first.