
Unless you think that extra-libraries is a good long term solution, I'll still investigate on how to add pkg-config generation to configuration scripts and try to send a sugestion with a patch to maintainers of libraries wrapped in bindings-*.
It is not practical to use pkg-config for such libraries. After you persuade the reference code[1] of lapack to use pkg-config, are you going to make ATLAS[2] do it also? And what about Intel's mkl[3]? Or even lapack bindings provided by Nvidia's CUDA[4]?
Sure. But only for packages we have direct Haskell bindings to. You only need pkg-config available for the libraries you directly need for a cabal package. For complicated dependencies, just rely on your OS distribution (or Haskell Platform etc.).
I know it's hard to include every possibilities. But I prefer some configuration switch that I can tune when building the library.
The idea is just to provide a default, working configuration. Anyway, I imagine this tunning should be done in a way that is transparent to a cabal package.
That's been said, it is still your package. And people can always change the build scripts for their own needs.
Not actually! I didn't work on bindings-levmar. I'm just the guy who started the idea of having low level bindings packages as basis for higher level bindings (so that this kind of problem can be solved at the same time for many, say, levmar high level bindings). That's why I would like to help acchieving good general guides for easy building. Wrapping of levmar is entirely van Dijk brothers' work. http://hackage.haskell.org/package/bindings-common Best, Maurício