Re: [PATCH] test : build fix when --enable-pdf=no

Bryce Harrington <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Tue, Aug 12, 2014 at 02:16:46PM +0530, Ravi Nanjundappa wrote:
> Though --enable-pdf=yes by default, when --enable-pdf=no, the cairo build
> fails due to unavailability of cairo-pdf.h and related cairo pdf's apis.
> The current changes fixes this issue by conditionally checking if PDF
> surface is enabled or not.
> 
> Signed-off-by: Ravi Nanjundappa <[email protected]>

Fixes the build for me.

Tested-by: Bryce Harrington <[email protected]>
Reviewed-by: Bryce Harrington <[email protected]>

Thanks, merged.
> ---
>  test/fallback-resolution.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c
> index df53e62..306a570 100644
> --- a/test/fallback-resolution.c
> +++ b/test/fallback-resolution.c
> @@ -32,7 +32,10 @@
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <cairo.h>
> +
> +#if CAIRO_HAS_PDF_SURFACE
>  #include <cairo-pdf.h>
> +#endif
>  
>  #ifdef HAVE_UNISTD_H
>  #include <unistd.h>
> @@ -280,9 +283,11 @@ generate_reference (double ppi_x, double ppi_y, const char *filename)
>  
>  	options = cairo_font_options_create ();
>  
> +#if CAIRO_HAS_PDF_SURFACE
>  	pdf = cairo_pdf_surface_create ("tmp.pdf", 1, 1);
>  	cairo_surface_get_font_options (pdf, options);
>  	cairo_surface_destroy (pdf);
> +#endif
>  
>  	cairo_set_font_options (cr, options);
>  	cairo_font_options_destroy (options);
> -- 
> 1.7.9.5
> 
> -- 
> cairo mailing list
> [email protected]
> http://lists.cairographics.org/mailman/listinfo/cairo
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.