[RFC] cleanup cairo detection

Michael Stahl mstahl at redhat.com
Mon May 14 03:25:10 PDT 2012


On 11/05/12 18:43, Riccardo Magliocchetti wrote:
> Hello,
> 
> finally managed to get back to libo after a few and found that cairo is 
> needed even with --disable-cairo-canvas.
> 
> The situation is a bit more convoluted than last time so while at move 
> all the cairo related machinery in the same place and try to make easier 
> to follow the various cases.

hi Riccardo,

> +dnl Check and warn is cairo has been enabled by mistake
> +CAIRO_BY_MISTAKE=no
> +if test $_os = Darwin -o $_os = WINNT; then
> +    CAIRO_BY_MISTAKE=yes
> +    enable_cairo_canvas=no
> +    if test $_os = WINNT; then
> +        dnl We only need cairo for Windows if we
> +        dnl build librsvg or directx disabled
> +        if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
> +            enable_cairo_canvas=yes
> +            CAIRO_BY_MISTAKE=no

it seems to me that this ^^^ ...

> +        fi
> +    fi
> +elif test -z "$enable_cairo_canvas"; then
> +    enable_cairo_canvas=yes
> +fi
>  
> -SYSTEM_CAIRO=""
> +if test "$ENABLE_LIBRSVG" != NO; then
> +    enable_cairo_canvas=yes
> +fi
> +
> +if test "$CAIRO_BY_MISTAKE" = "yes" -a "$enable_cairo_canvas" != "yes"; then

... and this ^^^ will cause the cairo canvas to be sometimes enabled on
Windows, where it was intentionally always disabled before.

> +    AC_MSG_ERROR([The cairo canvas should not be used for this platform])
> +    enable_cairo_canvas=no
> +fi

hmm... i don't know why we don't have an ENABLE_CAIRO variable
independent from ENABLE_CAIRO_CANVAS (i think this existed some time in
the past), but perhaps adding CAIRO to BUILD_TYPE serves the same purpose...



More information about the LibreOffice mailing list