From: Arlindo da S. <da...@al...> - 2010-10-05 14:03:39
|
On Tue, Oct 5, 2010 at 5:16 AM, Patrice Dumas <per...@fr...> wrote: > On Mon, Oct 04, 2010 at 04:40:17PM -0400, Jennifer Adams wrote: > > > > > >Regarding the supplibs, I have been working on the switch to cairo > > >for graphics rendering. At the moment, I am only working in the > > >mac environment, using the macports installation of cairo, so I > > >don't really know what the issues are regarding building from > > >source, or for the autoconfiguration. If any of you can provide > > >some guidance, especially for the autoconf stuff, it would be most > > >welcome. There must be some existing code out there that does > > >this, maybe already in opengrads, but I haven't looked for it yet. > > cairo uses pkgconfig. So something like > > cairo_pkgconfig=yes > PKG_CHECK_MODULES([CAIRO],[cairo >= $cairo_min_version],, > [cairo_pkgconfig=no]) > > should set CAIRO_LIBS and CAIRO_CFLAGS. This should be enough for > linking dynamically against the system library. > > > The libs it requires when statically linking should be listed in > Requires.private:. To link statically against the supplibs, I guess that > you have 2 options. Either simply supply the right link flags and > include dirs, either hardcoded or using GA_SET_FLAGS and similar. Or > put the .pc files obtained when compiling supplibs in a specific > directory in the supplibs, set PKG_CONFIG_PATH to this directory, and > use a pkg-config call, like > pkg-config --static cairo --libs > > I don't know if you'd want to put pkg-config in the supplibs too, then, > but, in case you wonder, on my debian squeeze box, pkg-config links against > glib, which in turns requires libpcre, and no other dependency (besides > a C library) seems to be involved. > > > (Cairo, however needs quite a bit of depednecies, but it is not clear to me > how you want to handle the backends of cairo? On my box, the xcb backend > is used: > > pkg-config --static cairo --libs > -lcairo -lpixman-1 -lfontconfig -lexpat -lfreetype -lpng12 -lz -lm > -lxcb-render-util -lXrender -lxcb-render -lX11 -lpthread -lxcb -lXau -lXdmcp > > But I guess that on MacOSX the Quartz backend should be used, on Windows > the win32 backend, on other UNIX the xlib backend?) > > Nice to hear form you! The opengrads supplibs includes pkg-config and builds (whenever possible) builds all packages with it. The main reason being this autoconf integration. As for my experience building cairo in the supplibs. This is the only library that I have *not* succeeded to build statically on all platforms. Not quite sure what the issues are. Since the opengrads wrappers automatically sets LD_LIBRARY_PATH, this have not been a problem. So far I have used cairo primarily for gxyat with only 4 backends: PNG, SVG, ps and pdf. I disable everything else to avoid any unnecessary dependency. Jennifer: which back ends do you intend to use? Arlindo -- Arlindo da Silva da...@al... |