Index: ChangeLog =================================================================== RCS file: /cvs/cairo/pycairo/ChangeLog,v retrieving revision 1.121 diff -u -p -d -r1.121 ChangeLog --- ChangeLog 20 May 2005 11:07:31 -0000 1.121 +++ ChangeLog 22 May 2005 15:40:51 -0000 @@ -1,3 +1,11 @@ +2005-05-22 Gustavo J. A. M. Carneiro + + * cairo/cairogtkmodule.c (gdk_cairo_create): Don't define + gdk_cairo_create if compiling agains gtk+ 2.8 API. + + * configure.ac (export_dynamic): Define HAVE_GTK28 if gtk+ > 2.7 + is found. + === Pycairo 0.5.0 === 2005-05-20 Steve Chaplin Index: configure.ac =================================================================== RCS file: /cvs/cairo/pycairo/configure.ac,v retrieving revision 1.24 diff -u -p -d -r1.24 configure.ac --- configure.ac 20 May 2005 11:07:31 -0000 1.24 +++ configure.ac 22 May 2005 15:40:51 -0000 @@ -65,6 +65,15 @@ else fi AM_CONDITIONAL(WITH_PYGTK, $with_pygtk) +dnl Define HAVE_GTK28 if gtk+ > 2.7 is found +AC_MSG_CHECKING([for gtk+ 2.8 API]) +if $PKG_CONFIG --modversion "gtk+-2.0 >= 2.7.0" > /dev/null 2>&1; then + AC_MSG_RESULT([found]) + AC_DEFINE([HAVE_GTK28], [], [Defined if gtk+ 2.8 API is found]) +else + AC_MSG_RESULT([not found]) +fi + # Numeric Python save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" Index: cairo/cairogtkmodule.c =================================================================== RCS file: /cvs/cairo/pycairo/cairo/cairogtkmodule.c,v retrieving revision 1.25 diff -u -p -d -r1.25 cairogtkmodule.c --- cairo/cairogtkmodule.c 19 May 2005 04:47:56 -0000 1.25 +++ cairo/cairogtkmodule.c 22 May 2005 15:40:52 -0000 @@ -88,6 +88,7 @@ surface_create_for_pixbuf(PyObject *self (PyObject *)py_pixbuf); } +#ifndef HAVE_GTK28 /* copied from gtk+/gdk/gdkcairo.c and gtk+/gdk/x11/gdkdrawable-x11.c * gdk_cairo_create() should be available in gtk 2.8 */ @@ -144,7 +145,7 @@ gdk_cairo_create(PyObject *self, PyObjec } return PycairoContext_FromContext (cr, (PyObject *)py_drawable); } - +#endif static PyMethodDef cairogtk_functions[] = { { "gdk_cairo_create", (PyCFunction)gdk_cairo_create, METH_VARARGS },