[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.
This commit is contained in:
Chris Wilson 2007-07-05 15:24:11 +01:00
parent ef967be630
commit 7eaba5d5fb
2 changed files with 15 additions and 1 deletions

View file

@ -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,

View file

@ -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 ""