Cabal package description sytax

Ross Paterson ross at soi.city.ac.uk
Mon Nov 29 08:34:05 EST 2004


On Mon, Nov 29, 2004 at 01:59:45PM +0200, Einar Karttunen wrote:
> Ross Paterson <ross at soi.city.ac.uk> writes:
> > There's an opportunity here to make another small extension to the
> > simple build infrastructure, namely to preprocess package descriptions
> > with cpp, possibly using header files generated by the configure step.
> > That would be enough for the simple build to handle packages like X11,
> > HGL, GLUT, OpenGL and OpenAL, where building is system-dependent.  Indeed
> > almost all of the packages in fptools/libraries could be handled this
> > way.
> 
> Using cpp does not help with many packages, using e.g. programs like
> foo-config. This is true for at least gtk, fltk, and so on.  Also to 
> include the headers containing the definitions on needs system dependent 
> -I options for cpp...

True, simple will only get you so far, but the point is you can get quite
a bit further for a small cost.  (But if you only need the -I options
for source files, not Setup.description, then cpp can put them in an
extra-cc-opts field.)  You could have a configure that calls fltk-config
--libs and stashes the result -- a bit clunky, but fits the interface.


More information about the Libraries mailing list