From 7eaba5d5fbf83f66b39db42a89db3e7a892c2ea0 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 5 Jul 2007 15:24:11 +0100 Subject: [PATCH] [configure] Only run PostScript tests if we have ghostscript. During configure check for the ghostscript command line tool (gs) before enabling the PostScript surface tests for make check. --- boilerplate/cairo-boilerplate.c | 2 +- configure.in | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index 093a55aed..7a0f7e8e3 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -261,7 +261,7 @@ static cairo_boilerplate_target_t targets[] = _cairo_boilerplate_xlib_cleanup, _cairo_boilerplate_xlib_synchronize}, #endif -#if CAIRO_HAS_PS_SURFACE +#if CAIRO_HAS_PS_SURFACE && CAIRO_CAN_TEST_PS_SURFACE { "ps", CAIRO_SURFACE_TYPE_PS, CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED, 0, _cairo_boilerplate_ps_create_surface, diff --git a/configure.in b/configure.in index 6634c223a..9fd1942db 100644 --- a/configure.in +++ b/configure.in @@ -531,6 +531,19 @@ fi dnl =========================================================================== CAIRO_BACKEND_ENABLE(ps, PostScript, ps, PS_SURFACE, auto, [use_ps=yes]) +test_ps=no +if test "x$use_ps" = "xyes"; then + AC_CHECK_PROG(GS, gs, gs) + if test "$GS"; then + AC_DEFINE([CAIRO_CAN_TEST_PS_SURFACE], 1, [Define to 1 if the PS backend can be tested (needs ghostscript)]) + test_ps="yes" + else + AC_MSG_WARN([PS backend will not be tested since ghostscript is not available]) + test_ps="no (requires ghostscript)" + fi +fi + +AM_CONDITIONAL(CAIRO_CAN_TEST_PS_SURFACE, test "x$test_ps" = "xyes") dnl =========================================================================== @@ -969,6 +982,7 @@ echo "" echo "and the following debug options:" echo " gcov support: $use_gcov" echo " test surfaces: $use_test_surfaces" +echo " ps testing: $test_ps" echo " pdf testing: $test_pdf" echo " svg testing: $test_svg" echo ""