[cairo] cairo.h in /usr/include

Vladimir Vukicevic vladimir at pobox.com
Tue Sep 7 10:35:23 PDT 2004


Bill Spitzak wrote:

>It seems to me the only purpose of your suggestion is that you want to use 
>the -I switch to the compiler to control which version is used. I'm not 
>really thrilled with this idea.
>
>Mostly because it requires another -I switch even if I don't change the 
>versions.
>  
>
Well, it would be a `pkg-config --cflags cairo2` :)

>Also, if the interface is not compatable, I have to rewrite my program 
>anyway, so I don't see what the difficulty is in changing the name of the 
>include file at the same time.
>  
>
The base interface might be compatible "enough" that you'd get 
source-level compatability with the old API, but it would include 
additional interfaces that aren't compatible with the new version.  
Rebuilding your program to work with the new cairo would then just be a 
matter of changing your pkg-config/cflags.

>Also you could just change cairo.h to read:
>
>#ifdef CAIRO2
>#include "cairo2.h"
>#else
>#include "cairo1.h"
>/* the file cairo1.h contains the old cairo.h */
>#endif
>
>And then use -DCAIRO2 instead of -I/usr/include/cairo2 as the compiler switch 
>to get exactly the same result. I fail to see how this is any harder.
>  
>
This is very bad from a packaging standpoint; does cairo1-devel or 
cairo2-devel own cairo.h?  Also, what happens if I #define CAIRO3, do I 
just get a #error?

    - Vlad




More information about the cairo mailing list