1 # geda-cairo.m4 -*-Autoconf-*-
5 dnl Copyright (C) 2012 Peter Brett <peter@peter-b.co.uk>
7 dnl This program is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU General Public License as published by
9 dnl the Free Software Foundation; either version 2 of the License, or
10 dnl (at your option) any later version.
12 dnl This program is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 dnl GNU General Public License for more details.
17 dnl You should have received a copy of the GNU General Public License
18 dnl along with this program; if not, write to the Free Software
19 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 AC_DEFUN([AX_CHECK_CAIRO],
25 # In Cairo >= 1.10, need to check for Cairo PDF/SVG/PS/PNG support
27 PKG_CHECK_MODULES([CAIRO], [cairo >= 1.10], [CAIRO=yes], [CAIRO=no])
28 if test "$CAIRO" = "yes"; then
29 PKG_CHECK_MODULES([CAIRO_PNG], [cairo-png >= 1.10], ,
30 AC_MSG_ERROR([Cairo PNG support 1.10.0 or later is required.]))
31 PKG_CHECK_MODULES([CAIRO_PDF], [cairo-pdf >= 1.10], ,
32 AC_MSG_ERROR([Cairo PDF support 1.10.0 or later is required.]))
33 PKG_CHECK_MODULES([CAIRO_PS], [cairo-ps >= 1.10], ,
34 AC_MSG_ERROR([Cairo PostScript support 1.10.0 or later is required.]))
35 PKG_CHECK_MODULES([CAIRO_SVG], [cairo-svg >= 1.10], ,
36 AC_MSG_ERROR([Cairo SVG support 1.10.0 or later is required.]))
38 PKG_CHECK_MODULES([CAIRO], [cairo >= 1.8], [],
39 AC_MSG_ERROR([Cairo 1.8.0 or later is required.]))