2009-08-11 Chris Toshok <toshok@ximian.com>
[moon.git] / m4 / cairo.m4
blob5a195d2a3e5c2a680eb3a0b7798414d9e7a0e9fa
1 AC_DEFUN([MOONLIGHT_CHECK_CAIRO],
3         AC_ARG_WITH(cairo, AC_HELP_STRING([--with-cairo=embedded|system],
4                 [Enable linking against system cairo]),
5                 [], [with_cairo=embedded])
7         if test x$with_cairo = xembedded; then
8                 ac_configure_args="$ac_configure_args --with-pic=yes --disable-pdf --disable-svg --disable-ps --disable-png --disable-xcb"
9                 AC_CONFIG_SUBDIRS([pixman cairo])
10                 
11                 dnl hackish but I couldn't get AC_EGREP_HEADER to work with our embedded cairo :(
12                 if grep CAIRO_LINE_CAP_TRIANGLE $srcdir/cairo/src/cairo.h >/dev/null 2>&1; then
13                         AC_DEFINE(HAVE_CAIRO_LINE_CAP_TRIANGLE, [], [Define if cairo has CAIRO_LINE_CAP_TRIANGLE as a cairo_line_cap_t enum member])
14                 fi
15                 
16                 CAIRO_CFLAGS='-I$(top_srcdir)/cairo/src'
17                 CAIRO_LIBS='$(top_builddir)/cairo/src/libcairo.la'
18         else
19                 PKG_CHECK_MODULES(CAIRO,cairo >= 1.8)
20         fi