[MLton] Support for link options in ML Basis files
Matthew Fluet
fluet@cs.cornell.edu
Mon, 17 Jan 2005 09:34:34 -0500 (EST)
> I wonder then how you guys would feel about using Pkgconfig
> (http://www.freedesktop.org/Software/pkgconfig).
I suppose it is an option.
> Pkgconfig in
> combination with mlbs would provide you a fully functional packaging
> system with minimal effort. For example, with my SDL bindings I would
> just install a file such as "mlton-sdl.pc" in /usr/lib/pkgconfig/. An
> example of what this might look like:
>
> Name: MLSDL
> Description: SDL bindings for the MLton compiler
> Version: 0.1
> Libs: -L/usr/lib/mlton/sml/sdl -lSDL -lpthread
^^^^^^^^^^^^^^^^^^^^^^
I don't think you want /usr/lib/mlton/sml/sdl, as there shouldn't be any
sdl libraries in that directory, just your SML bindings.
I think you want a Requires: line to pull in the SDL cflags and libs.
On the other hand, I can't find a pkgconfig .pc for SDL in any of the
boxes I have access to.
And, I think this just demonstrates that there really is no universal
solution. A pkgconfig solution might work well for a .mlb that provides
SML bindings for a C-library that itself uses pkgconfig, but if that C-lib
doesn't have a pkgconfig, then someone still needs to do some manual
tweaking to align things correctly.