On 10.12.2011 00:26, Ian MacArthur wrote: > > On 9 Dec 2011, at 12:29, Albrecht Schlosser wrote: >> >> Maybe Ian could tell us something about the dependency - ISTR that he >> used to use Cairo in (some of) his builds. Ian, any info about this? > > > I do use cairo in some projects, but not via the fltk-cairo hooks, I have my > own hooks that predate the addition of the fltk-cairo mechanism. > > In my Makefiles I use something of the form: > > CCFLAGS += $(shell pkg-config --cflags cairo) > LDFLAGS += $(shell pkg-config --libs cairo) > > So that I use pkg-config to get the Right Libs for cairo to work. In my case, > that obviated the need to explicitly call pixman (or not) in the Makefile.
I remember that Fabien (who implemented the current FLTK cairo support) wrote a comment somewhere that pkg-config was used and that he wanted to get rid of it, maybe some time in the future. But your way looks good. How common is pkg-config these days? Can we assume that it is installed (or easily installable) and working everywhere? Trying configure --enable-cairo on my Ubuntu 11.10 (currently w/o cairo) we can see that pkg-config is indeed used in configure: $ ./configure --enable-cairo Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containing `cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found I'm going to install cairo now and I'll report what happens ... > FWIW I generally link cairo in static, so that I don't depend on the system > provided libs, and my "old" systems are locked down to a version of cairo > that does use pixman. > > On the other hand, my ubuntu 11.10 box is a "recent" cairo that seems to have > pixman in the inclue path, but only needs -lcairo in the libs, so... > > Anyway, using pkg-config may be a way forward? It works well for me on linux, > OK under mingw, and, well, I'm not currently using it on OSX, though I am > told that it does work now, though it was problematic way back when... Well, since we're using it in configure already, the only thing we need to do is probably something like your Makefile rules above to check the pixman dependency instead of hard-coding it, as it seems to be now (dependent on --enable-cairo, of course). Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

