summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavi Nanjundappa <nravi.n@samsung.com>2014-08-12 14:16:46 +0530
committerBryce Harrington <bryce@osg.samsung.com>2014-11-06 17:12:55 -0800
commitc61b3e0838e0474f365ac6bd6b77bed32333c5c0 (patch)
tree2c4de8207df3ccb7b4888f7b3ebde7faa128739e
parent8fd32bf158f39bb73609d905d9f2b3420a3d6f37 (diff)
test : build fix when --enable-pdf=no
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 <nravi.n@samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Tested-by: Bryce Harrington <bryce@osg.samsung.com>
-rw-r--r--test/fallback-resolution.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c
index 138b3a4ba..6c5d960ec 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);