diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-11 18:10:16 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-11 19:01:43 +0100 |
commit | 6736faba3ebe4eae4c1d2aeeb3153eb6f12a32de (patch) | |
tree | 32adcd99cefaa11ceee454dd0970b4bd88f47e33 /test/any2ppm.c | |
parent | b35871116243724b59738fce00b512818c83ea17 (diff) | |
download | cairo-6736faba3ebe4eae4c1d2aeeb3153eb6f12a32de.tar.gz |
[test/any2ppm] Do not attempt to compile PS without spectre
Since CAN_TEST_PS_SURFACE does not currently require spectre, we were
attempting to compile in spectre support for any2ppm even on systems
without libspectre installed. Fix that by adding a separate flag for
CAIRO_HAS_SPECTRE.
Diffstat (limited to 'test/any2ppm.c')
-rw-r--r-- | test/any2ppm.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c index 36c742fcb..94450b2f9 100644 --- a/test/any2ppm.c +++ b/test/any2ppm.c @@ -72,7 +72,7 @@ #include <librsvg/rsvg-cairo.h> #endif -#if CAIRO_CAN_TEST_PS_SURFACE +#if CAIRO_HAS_SPECTRE #include <libspectre/spectre.h> #endif @@ -293,6 +293,12 @@ pdf_convert (char **argv, int fd) return err; } +#else +static const char * +pdf_convert (char **argv, int fd) +{ + return "compiled without PDF support."; +} #endif #if CAIRO_CAN_TEST_SVG_SURFACE @@ -347,9 +353,15 @@ svg_convert (char **argv, int fd) return err; } +#else +static const char * +svg_convert (char **argv, int fd) +{ + return "compiled without SVG support."; +} #endif -#if CAIRO_CAN_TEST_PS_SURFACE +#if CAIRO_HAS_SPECTRE static const char * _spectre_render_page (const char *filename, const char *page_label, @@ -422,6 +434,12 @@ ps_convert (char **argv, int fd) return err; } +#else +static const char * +ps_convert (char **argv, int fd) +{ + return "compiled without PostScript support."; +} #endif static const char * @@ -431,15 +449,9 @@ convert (char **argv, int fd) const char *type; const char *(*func) (char **, int); } converters[] = { -#if CAIRO_CAN_TEST_PDF_SURFACE { "pdf", pdf_convert }, -#endif -#if CAIRO_CAN_TEST_PS_SURFACE { "ps", ps_convert }, -#endif -#if CAIRO_CAN_TEST_SVG_SURFACE { "svg", svg_convert }, -#endif { NULL, NULL } }; const struct converter *converter = converters; |