From: Patrice D. <per...@fr...> - 2010-10-05 10:02:12
|
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?) -- Pat |