From a012540d990f9baeccf8b7441c27a11acbc2a672 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 19 Dec 2020 11:10:13 +0100 Subject: [PATCH] autoconf: Reject --enable-xml --disable-png MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The xml surface depends on png. Before this commit, configuring with autogen.sh --disable-png --disable-svg --enable-xml resulted in a failing build: src/cairo-xml-surface.c: In function ‘_cairo_xml_emit_image’: src/cairo-xml-surface.c:673:14: error: implicit declaration of function ‘cairo_surface_write_to_png_stream’ After this commit, configure instead rejects this combination with: checking whether cairo's xml surface backend feature could be enabled... no (requires --enable-png) configure: error: xml surface backend feature could not be enabled Noticed-at: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/67#note_644347 Signed-off-by: Uli Schlachter --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 8d23ae0c1..a0a06d109 100644 --- a/configure.ac +++ b/configure.ac @@ -715,8 +715,12 @@ CAIRO_ENABLE_SURFACE_BACKEND(recording, recording, always) CAIRO_ENABLE_SURFACE_BACKEND(observer, observer, always) CAIRO_ENABLE_SURFACE_BACKEND(tee, tee, no) CAIRO_ENABLE_SURFACE_BACKEND(xml, xml, no, [ - use_xml=$have_libz - xml_NONPKGCONFIG_LIBS=-lz + if test "x$use_png" != "xyes"; then + use_xml="no (requires --enable-png)" + else + use_xml=$have_libz + xml_NONPKGCONFIG_LIBS=-lz + fi ]) dnl ===========================================================================