[test] Win32 printing backend testing depends upon ghostscript

Using the Win32 printing backend requires ghostscript, so only enable
those tests if we detect 'gs' during configure.
This commit is contained in:
Chris Wilson 2008-01-10 15:30:42 +00:00
parent 02b0743458
commit 755a4bb51b
2 changed files with 19 additions and 0 deletions

View file

@ -222,6 +222,7 @@ static cairo_boilerplate_target_t targets[] =
{ "win32", CAIRO_SURFACE_TYPE_WIN32, CAIRO_CONTENT_COLOR_ALPHA, 0,
_cairo_boilerplate_win32_create_surface,
cairo_surface_write_to_png },
#if CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE
{ "win32-printing", CAIRO_SURFACE_TYPE_WIN32_PRINTING,
CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED, 0,
_cairo_boilerplate_win32_printing_create_surface,
@ -234,6 +235,7 @@ static cairo_boilerplate_target_t targets[] =
_cairo_boilerplate_win32_printing_cleanup,
NULL, TRUE },
#endif
#endif
#if CAIRO_HAS_XCB_SURFACE
/* Acceleration architectures may make the results differ by a
* bit, so we set the error tolerance to 1. */

View file

@ -364,6 +364,20 @@ CAIRO_BACKEND_ENABLE(win32_font, Microsoft Windows font, win32-font, WIN32_FONT,
use_win32_font=$use_win32
])
test_win32_printing=no
if test "x$use_win32" = "xyes"; then
AC_CHECK_PROG(GS, gs, gs)
if test "$GS"; then
AC_DEFINE([CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE], 1, [Define to 1 if the Win32 Printing backend can be tested (needs ghostscript)])
test_win32_printing="yes"
else
AC_MSG_WARN([Win32 Printing backend will not be tested since ghostscript is not available])
test_win32_printing="no (requires ghostscript)"
fi
fi
AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printing" = "xyes")
dnl ===========================================================================
CAIRO_BACKEND_ENABLE(os2, OS/2, os2, OS2_SURFACE, no, [
@ -1028,6 +1042,9 @@ echo " test surfaces: $use_test_surfaces"
echo " ps testing: $test_ps"
echo " pdf testing: $test_pdf"
echo " svg testing: $test_svg"
if test x"$use_win32" = "xyes"; then
echo " win32 printing testing: $test_win32_printing"
fi
echo ""
echo "using CFLAGS:"
echo $CAIRO_CFLAGS