diff options
-rw-r--r-- | boilerplate/cairo-boilerplate-pdf.c | 9 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-private.h | 4 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-ps.c | 10 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-svg.c | 10 | ||||
-rw-r--r-- | boilerplate/cairo-boilerplate-win32-printing.c | 10 |
5 files changed, 34 insertions, 9 deletions
diff --git a/boilerplate/cairo-boilerplate-pdf.c b/boilerplate/cairo-boilerplate-pdf.c index 53bf55ba..9854344d 100644 --- a/boilerplate/cairo-boilerplate-pdf.c +++ b/boilerplate/cairo-boilerplate-pdf.c @@ -238,10 +238,8 @@ _cairo_boilerplate_pdf_force_fallbacks (cairo_surface_t *abstract_surface, x_pixels_per_inch, y_pixels_per_inch); } -#endif static const cairo_boilerplate_target_t targets[] = { -#if CAIRO_CAN_TEST_PDF_SURFACE { "pdf", "pdf", ".pdf", NULL, CAIRO_SURFACE_TYPE_PDF, @@ -269,6 +267,11 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_pdf_cleanup, NULL, NULL, FALSE, TRUE, TRUE }, -#endif }; CAIRO_BOILERPLATE (pdf, targets) + +#else + +CAIRO_NO_BOILERPLATE (pdf) + +#endif diff --git a/boilerplate/cairo-boilerplate-private.h b/boilerplate/cairo-boilerplate-private.h index a848aa1c..a7a2dd0e 100644 --- a/boilerplate/cairo-boilerplate-private.h +++ b/boilerplate/cairo-boilerplate-private.h @@ -44,6 +44,10 @@ void _register_##name__ (void) { \ sizeof (targets__) / sizeof (targets__[0])); \ } +#define CAIRO_NO_BOILERPLATE(name__) \ +void _register_##name__ (void); \ +void _register_##name__ (void) { } + CAIRO_END_DECLS #endif /* _CAIRO_BOILERPLATE_PRIVATE_H_ */ diff --git a/boilerplate/cairo-boilerplate-ps.c b/boilerplate/cairo-boilerplate-ps.c index a3f75077..c3f06941 100644 --- a/boilerplate/cairo-boilerplate-ps.c +++ b/boilerplate/cairo-boilerplate-ps.c @@ -26,6 +26,8 @@ #include "cairo-boilerplate-private.h" +#if CAIRO_CAN_TEST_PS_SURFACE + #include <cairo-ps.h> #include <cairo-ps-surface-private.h> @@ -302,7 +304,6 @@ _cairo_boilerplate_ps_force_fallbacks (cairo_surface_t *abstract_surface, } static const cairo_boilerplate_target_t targets[] = { -#if CAIRO_CAN_TEST_PS_SURFACE { "ps2", "ps", ".ps", NULL, CAIRO_SURFACE_TYPE_PS, @@ -357,6 +358,11 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_ps_cleanup, NULL, NULL, FALSE, TRUE, TRUE }, -#endif }; CAIRO_BOILERPLATE (ps, targets) + +#else + +CAIRO_NO_BOILERPLATE (ps) + +#endif diff --git a/boilerplate/cairo-boilerplate-svg.c b/boilerplate/cairo-boilerplate-svg.c index b5a7d0d7..10fddb6b 100644 --- a/boilerplate/cairo-boilerplate-svg.c +++ b/boilerplate/cairo-boilerplate-svg.c @@ -26,6 +26,8 @@ #include "cairo-boilerplate-private.h" +#if CAIRO_CAN_TEST_SVG_SURFACE + #include <cairo-svg.h> #include <cairo-svg-surface-private.h> #include <cairo-paginated-surface-private.h> @@ -274,7 +276,6 @@ _cairo_boilerplate_svg_force_fallbacks (cairo_surface_t *abstract_surface, } static const cairo_boilerplate_target_t targets[] = { -#if CAIRO_CAN_TEST_SVG_SURFACE /* It seems we should be able to round-trip SVG content perfectly * through librsvg and cairo, but for some mysterious reason, some * systems get an error of 1 for some pixels on some of the text @@ -332,6 +333,11 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_svg_cleanup, NULL, NULL, FALSE, TRUE, TRUE }, -#endif }; CAIRO_BOILERPLATE (svg, targets) + +#else + +CAIRO_NO_BOILERPLATE (svg) + +#endif diff --git a/boilerplate/cairo-boilerplate-win32-printing.c b/boilerplate/cairo-boilerplate-win32-printing.c index ee76bf64..0e54512a 100644 --- a/boilerplate/cairo-boilerplate-win32-printing.c +++ b/boilerplate/cairo-boilerplate-win32-printing.c @@ -36,6 +36,8 @@ #include "cairo-boilerplate-private.h" +#if CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE + #include <cairo-win32.h> #include <cairo-win32-private.h> #include <cairo-paginated-surface-private.h> @@ -343,7 +345,6 @@ _cairo_boilerplate_win32_printing_cleanup (void *closure) } static const cairo_boilerplate_target_t targets[] = { -#if CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE { "win32-printing", "win32", ".ps", NULL, CAIRO_SURFACE_TYPE_WIN32_PRINTING, @@ -369,6 +370,11 @@ static const cairo_boilerplate_target_t targets[] = { _cairo_boilerplate_win32_printing_cleanup, NULL, NULL, FALSE, TRUE, TRUE }, -#endif }; CAIRO_BOILERPLATE (win32_printing, targets) + +#else + +CAIRO_NO_BOILERPLATE (win32_printing) + +#endif |