cabal and conditional build-depends

Hi Cafe, I have a package that depends on several other Haskell libraries. One of these libraries depends on some native libraries (and associated headers) to build. I would like to make this dependency optional in my package if the libraries don't exist. To do this, I tried to switch my build-type from Simple to Configure in my .cabal file. Then I made a configure script that generates a <pkg>.buildinfo file as suggested in the cabal guide. The buildinfo file is generated and looks as I would expect. If the library is found on the system, it has a "build-info: ..." line. Unfortunately, when Cabal processes it, it says: Warning: archive-inspection.buildinfo: Unknown fields: build-depends (line 2) Fields allowed in this section: buildable, build-tools, cpp-options, cc-options, ld-options, pkgconfig-depends, frameworks, c-sources, default-language, other-languages, default-extensions, other-extensions, extensions, extra-libraries, extra-lib-dirs, includes, install-includes, include-dirs, hs-source-dirs, other-modules, ghc-prof-options, ghc-shared-options, ghc-options, hugs-options, nhc98-options, jhc-options It really doesn't seem to like conditional build-depends entries. Is this expected behavior? And is there a better way to go about having conditional build-time dependencies on Haskell libraries using Cabal? I guess I could start playing with a custom Setup.hs, but I always hate doing that unless absolutely necessary. Thanks
participants (1)
-
Tristan Ravitch