(Imported from Trac #819, reported by guest on 2011-03-22)
Non-standard options to 'configure' are not supported by Cabal; to accept new options requires writing a custom version of Cabal's 'defaultMain'. It would be useful to provide some support for extending the command-line parser, or at least passing unrecognized arguments to user hooks.
To motivate this feature, here's my use case. During the build phase, my package builds an executable, then uses the executable to build some data files. The executable and data files are installed together. If the executable needs extra arguments (e.g., search paths) to run, they can be supplied as command-line parameters to 'configure'. Supporting these extra parameters required some changes to Cabal.
I did it by copying 'defaultMainWithHooks' and some 200-odd lines of non-exported functions from Distribution.Simple into my package's Setup.hs so that I could override 'configureCommand'. This gave me access to the command-line parser. Relatively little code was actually changed, so hopefully this feature would fit nicely into the current codebase.
Lodged in 2011. No feedback. Close.