
On Tuesday 04 September 2007 19:24, Duncan Coutts wrote:
Well, if the library you're binding to happens to be one of the 350+ that use pkg-config then cabal can indeed find the paths to the headers and the varying linker options (by asking pkg-config).
pkgconfig-depends: gtk+-2.0 >= 2.8, cairo
This is a new feature in Cabal-1.2.
Of course it doesn't help for libs like GL that don't provide pkg-config files.
I once tried to use pkg-config, but it was a total desaster: It suffers from versionitis itself, various distros put various (sometimes wrong) things into the package configuration files, dynamic vs. static linking dependencies are usually totally broken, it is not available on Windows (Mac OS X?) etc. In general, I think that pkg-config is a nice idea, but typically poorly maintained. (Anyone remembers problems with xmkmf? ;-)
if the installed OpenAL's alcCloseDevice returns void or an int,
That's trickier.
the matching Haskell type for an ALuint, etc.
c2hs can do that.
Hmmm, just another build-time dependency... Note that I don't claim that autotools are perfect or beautiful, but I haven't seen something substantially better yet. (Yes, I know scons, cmake, ...) Cheers, S.