+if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then
+ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = "1"; then
+ cat >>confdefs.h <<\_ACEOF
+#define wxUSE_GRAPHICS_CONTEXT 1
+_ACEOF
+
+ elif test "$wxUSE_GTK" != 1; then
+ cat >>confdefs.h <<\_ACEOF
+#define wxUSE_GRAPHICS_CONTEXT 1
+_ACEOF
+
+ else
+
+pkg_failed=no
+echo "$as_me:$LINENO: checking for CAIRO" >&5
+echo $ECHO_N "checking for CAIRO... $ECHO_C" >&6
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_CFLAGS"; then
+ pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo\"") >&5
+ ($PKG_CONFIG --exists --print-errors "cairo") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$CAIRO_LIBS"; then
+ pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"cairo\"") >&5
+ ($PKG_CONFIG --exists --print-errors "cairo") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo"`
+ else
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CAIRO_PKG_ERRORS" >&5
+
+
+ { echo "$as_me:$LINENO: WARNING: Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT" >&5
+echo "$as_me: WARNING: Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT" >&2;}
+
+
+elif test $pkg_failed = untried; then
+
+ { echo "$as_me:$LINENO: WARNING: Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT" >&5
+echo "$as_me: WARNING: Cairo library not found, unable to set wxUSE_GRAPHICS_CONTEXT" >&2;}
+
+
+else
+ CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
+ CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+ cat >>confdefs.h <<\_ACEOF
+#define wxUSE_GRAPHICS_CONTEXT 1
+_ACEOF
+
+
+fi
+ fi
+fi
+
+