On 2007-06-02 21:06-0400 Hazen Babcock wrote:

>
> Hello,
>
> I've moved xwinttf.c to cairo.c and now I want to add some of the
> other cairo devices (ps, pdf, etc..) to this file. Since some users
> may have Cairo but not xwindows I'm trying to use preprocessor
> directives in cairo.c so that they won't get error messages when
> xwindows does not exist, i.e.:
>
> #if defined(PLD_xwinttf)
> #include <X11/X.h>
> #include <X11/Xlib.h>
> #include <X11/Xutil.h>
> #include <X11/cursorfont.h>
> #endif
>
> However, this fails because apparently PLD_xwinttf is not defined in
> the context of the compilation of cairo.c. This is puzzling to me
> since a very similar approach seems to work fine for the gd drivers:
>
> #if defined(PLD_png) || defined(PLD_jpeg) || defined(PLD_gif)
>
> #include "plplotP.h"
> #include "drivers.h"
>
> ...
>
> Any idea what I might be missing?

Have you remembered to follow the gd style in
cmake/modules/drivers-init.cmake?

That means

"xwinttf:xwinttf:OFF"

must be replaced by

"xcairo:cairo:OFF" "pscairo:cairo:OFF" "pdfcairo:cairo:OFF" ....

I am guessing at the names you want for the X, ps and pdf cairo devices so
that xcairo would replace your current xwinttf, etc.  If you prefer a
different naming convention, that is fine, but I do suggest you use the same
convention for all cairo-related devices so that xwinttf should be due for a
name change regardless, and PLD_xwinttf would be replaced by PLD_xcairo
(or whatever) in your code, and you will have to make corresponding
changes in config.h.cmake

BTW, to confirm the cmake results on the PLD_* variables, you should check
config.h in the top of the build tree.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to