id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	difficulty	ghcversion	platform
208	Support program prefixes and suffixes	duncan		"GNU autoconf has these configure flags:

{{{
`--program-prefix=prefix'
    Specifies a prefix which should be added to the name of a program when
    installing it. For example, using `--program-prefix=g' when configuring
    a program normally named `tar' will cause the installed program to be
    named `gtar' instead.

`--program-suffix=suffix'
    Specifies a suffix which should be appended to the name of a program
    when installing it.
}}}

This would be handy for appending program versions to allow installing multiple versions of the same program. For example:

{{{
cabal configure --program-prefix='$version'
}}}

So I can end up with `haddock-0.9` and `haddock-2.0.0.0` in my `~/bin` dir.

Distros that use 'alternatives' systems might like to use this feature.

This should be fairly easy to implement, as the prefix/suffix can be parsed and represented as a `PathTemplate`, which handles `$version` vars etc. The prefix/suffix would need to be propagated into the `LocalBuildInfo` (and probably var-substituted into an ordinary `String` at that point) and then used when generating the binary name.

This would be particularly handy in combination with a cabal-install feature to symlink newly-installed versions of programs into an alternative directory. For example we might install versioned binaries into ~/.cabal/bin by default and symlink the latest into ~/bin. Or we might symlink versioned links to each version, and an unversioned link to the latest one that got installed. Anyway, there's room for exploration there as to the best default."	enhancement	closed	normal	Cabal-1.4	Cabal library	1.2.3.0	normal	fixed			easy (<4 hours)	6.8.2	
