[Cairo] Re: Patch for cairo --without-x

Sasha V. sasha at aftercode.net
Wed Nov 26 23:02:30 PST 2003


Ok, here is new version of the patch.
It does remove _xlib.c from compilation entirely,
but I had to keep cairo-xlib.h, but not just keep it, but rename 
it into cairo-xlib.h.in, so that configure could insert proper 
macro directly into it.
It might be a good idea to forcibly include cairo-xlib.h
in cairo.h.

I had to do diff -Nur to get the patch as cvs diff would not 
pick renamed file.



Carl Worth wrote:
> The first problem I have is an error from automake:
> 
> 	./autogen.sh: running `automake --add-missing'
> 	src/Makefile.am:2: `include_HEADERS' contains configure substitution,
> 	src/Makefile.am:2: but `EXTRA_HEADERS' not defined
> 

That is fixed as cairo-xlib.h is included in any case now.
But we could use conditional
( if cairo at cairographics.org
   else
   endif
)

in case we need to remove files from compilation now.


> 
> Second, rather than wrapping an entire C file in an #ifndef/#endif
> pair, can we just use the variables within Makefile.am so that some
> files are not compiled? I would greatly prefer that.

done

> And I'm still a little unclear on the implementation. Where does
> "X_DISPLAY_MISSING" get defined? I would rather have a more meaningful
> name like CAIRO_HAS_X_BACKEND or such.

done

> Oh, and similarly, when we do this the cairo.h file needs to advertise
> the set of supported backends, so we'll need to define some macros as
> appropriate there as well.

we should stick #include "cairo-xlib.h" into it now ( not done 
in the patch ) to achieve that.

> 
> I'll play with this a bit, and at least commit the obvious fixes. But
> I'd like to address some of the above issues before committing the
> rest.
> 
> -Carl
> 
> PS. Perhaps this discussion should be moved to the mailing list so we
> can get more input from others? Feel free to resend your patch, (or
> your next message) to cairo at cairographcs.org if you want.

done :)

Sasha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cairo_without_x.v3.patch.gz
Type: application/x-tar
Size: 2372 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20031127/45a710fc/cairo_without_x.v3.patch.tar


More information about the cairo mailing list