diff --git a/configure b/configure index 0113ad1754..5da619e4f8 100755 --- a/configure +++ b/configure @@ -40126,12 +40126,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cairo") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo" 2>/dev/null` + pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo >= 1.2" 2>/dev/null` else pkg_failed=yes fi @@ -40144,12 +40144,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_CAIRO_LIBS="$CAIRO_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cairo") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo >= 1.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cairo >= 1.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo" 2>/dev/null` + pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo >= 1.2" 2>/dev/null` else pkg_failed=yes fi @@ -40168,9 +40168,9 @@ 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"` + CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "cairo >= 1.2"` else - CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo"` + CAIRO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "cairo >= 1.2"` fi # Put the nasty error message in config.log where it belongs echo "$CAIRO_PKG_ERRORS" >&5 @@ -40187,28 +40187,8 @@ else CAIRO_LIBS=$pkg_cv_CAIRO_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - wx_has_cairo=1 -fi - if test "$wx_has_cairo" = 1; then - save_LIBS="$LIBS" - LIBS="$LIBS $CAIRO_LIBS" - for ac_func in cairo_push_group -do : - ac_fn_c_check_func "$LINENO" "cairo_push_group" "ac_cv_func_cairo_push_group" -if test "x$ac_cv_func_cairo_push_group" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CAIRO_PUSH_GROUP 1 -_ACEOF -fi -done - - LIBS="$save_LIBS" - if test "$ac_cv_func_cairo_push_group" = "no"; then - wx_has_cairo=0 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cairo library is too old and misses cairo_push_group()" >&5 -$as_echo "$as_me: WARNING: Cairo library is too old and misses cairo_push_group()" >&2;} - else + wx_has_cairo=1 $as_echo "#define wxUSE_CAIRO 1" >>confdefs.h @@ -40216,8 +40196,8 @@ $as_echo "$as_me: WARNING: Cairo library is too old and misses cairo_push_group( CXXFLAGS="$CXXFLAGS $CAIRO_CFLAGS" GUI_TK_LIBRARY="$GUI_TK_LIBRARY $CAIRO_LIBS" fi - fi - fi + +fi fi if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then diff --git a/configure.in b/configure.in index e5daa36694..c911a509f9 100644 --- a/configure.in +++ b/configure.in @@ -7157,22 +7157,9 @@ if test "$wx_needs_cairo_for_gc" = 1 -a "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then fi if test "$wxUSE_CAIRO" = "yes" -o "$wx_needs_cairo" = 1; then - PKG_CHECK_MODULES(CAIRO, cairo, - [wx_has_cairo=1], - [AC_MSG_RESULT(no)] - ) - if test "$wx_has_cairo" = 1; then - dnl Check that Cairo library is new enough: wxGraphicsContext - dnl won't compile without cairo_push_group() and - dnl cairo_pop_group_to_source() which are new in 1.2. - save_LIBS="$LIBS" - LIBS="$LIBS $CAIRO_LIBS" - AC_CHECK_FUNCS([cairo_push_group]) - LIBS="$save_LIBS" - if test "$ac_cv_func_cairo_push_group" = "no"; then - wx_has_cairo=0 - AC_MSG_WARN([Cairo library is too old and misses cairo_push_group()]) - else + PKG_CHECK_MODULES(CAIRO, [cairo >= 1.2], + [ + wx_has_cairo=1 AC_DEFINE(wxUSE_CAIRO) dnl We don't need to do this for wxGTK as we already get Cairo @@ -7181,8 +7168,9 @@ if test "$wxUSE_CAIRO" = "yes" -o "$wx_needs_cairo" = 1; then CXXFLAGS="$CXXFLAGS $CAIRO_CFLAGS" GUI_TK_LIBRARY="$GUI_TK_LIBRARY $CAIRO_LIBS" fi - fi - fi + ], + [AC_MSG_RESULT(no)] + ) fi if test "$wxUSE_GRAPHICS_CONTEXT" = "yes"; then