
droundy:
On Fri, Apr 13, 2007 at 06:04:46PM -0600, Jason Creighton wrote:
I poked around the cabal docs for a bit, and I didn't see any obvious way to get cabal to check for the presence of certain headers. Also, if the headers weren't there, we couldn't really do anything anyway, other than fail with a friendlier error.
Argh! That seems crazy. How can cabal not have support for looking for libraries? It's not so hard to write, but this seems like it'd be critical--certainly it'll be critical if we're going to use cabal for darcs (as Eric is in the process of doing).
Well, it does via ./configure scripts.
I wonder if the Xinerama module should be a separate package anyway. What do you guys think about that?
It could be, but then we'd still depend on the module, unless cabal supports optional package dependencies. I'd rather have a compile-time
Right, which it doesn't. This is what the cabal configurations stuff is proposed to solve.
check whether xinerama is present, and preferably if it's not present then we should emit a warning (WARNING: compiling without xinerama support!!!) and compile an X11-extras with the same API, but which assumes just one screen. It doesn't seem like it should be that hard, and reducing the number of libraries required would definitely be a Good Thing. Most people don't actually have two monitors.
Ok. This is possible. We use a ./configure script, emit a warning, set a cpp define in config.h, then compile with or without xinerama. -- Don