Index: configure.ac
===================================================================
--- configure.ac	(revision 529)
+++ configure.ac	(working copy)
@@ -128,7 +128,7 @@ AC_ARG_ENABLE([gtk-doc],
 AM_CONDITIONAL(BUILD_DOCS, [test "$enable_gtk_doc" = "yes"])
 
 dnl default bindings to build:
-default_bindings_on="applet gnomeprint gnomeprintui gtksourceview wnck totem_plparser gtop nautilusburn mediaprofiles rsvg gnomekeyring gnomedesktop bugbuddy metacity evolution evolution_ecal"
+default_bindings_on="applet gnomeprint gnomeprintui gtksourceview wnck totem_plparser gtop nautilusburn mediaprofiles rsvg gnomekeyring gnomedesktop bugbuddy metacity evolution evolution_ecal evince"
 default_bindings_off="metacity"
 default_bindings_all="$default_bindings_on $default_bindings_off"
 
@@ -398,6 +398,19 @@ fi
 AM_CONDITIONAL(BUILD_EVOLUTION, $build_evolution)
 AM_CONDITIONAL(BUILD_EVOLUTION_ECAL, $build_evolution_ecal)
 
+dnl should we build the evince module
+AC_ARG_BINDING([evince],[YES])
+if $build_evince; then
+    PKG_CHECK_MODULES(EVINCE, [evince-document-2.25 evince-view-2.25],
+      build_evince=true,
+      build_evince=false)
+    if test -n "$export_dynamic"; then
+      EVINCE_LIBS=`echo $EVINCE_LIBS | sed -e "s/$export_dynamic//"`
+    fi
+fi
+AM_CONDITIONAL(BUILD_EVINCE, $build_evince)
+
+
 dnl add required cflags ...
 JH_ADD_CFLAG([-Wall])
 JH_ADD_CFLAG([-std=c9x])
@@ -418,6 +431,7 @@ AC_CONFIG_FILES(
   gnomekeyring/Makefile
   gnomedesktop/Makefile
   evolution/Makefile
+  evince/Makefile
   gnome-python-desktop-2.0.pc
   tests/Makefile
   docs/Makefile
@@ -446,6 +460,7 @@ $build_gnomedesktop      && echo     gno
 $build_bugbuddy          && echo     bugbuddy
 $build_evolution         && echo     evolution
 $build_evolution_ecal    && echo     evolution ecal support
+$build_evince            && echo     evince
 echo
 
 echo "The following modules will NOT be built:"
@@ -466,6 +481,7 @@ $build_gnomedesktop      || echo     gno
 $build_bugbuddy          || echo     bugbuddy
 $build_evolution         || echo     evolution
 $build_evolution_ecal    || echo     evolution ecal support
+$build_evince            || echo     evince
 
 
 echo "*****************************************************************************"
Index: evince/Makefile.am
===================================================================
--- evince/Makefile.am	(revision 0)
+++ evince/Makefile.am	(revision 0)
@@ -0,0 +1,39 @@
+INCLUDES = $(PYTHON_INCLUDES) $(PYGTK_CFLAGS)
+
+defsdir = $(datadir)/pygtk/2.0/defs
+
+defs_DATA = evince.defs
+
+EXTRA_DIST = $(defs_DATA)
+
+common_ldflags = -module -avoid-version
+
+pkgpythondir = $(pyexecdir)/gtk-2.0
+pkgpyexecdir = $(pyexecdir)/gtk-2.0
+
+# evince binding
+
+if BUILD_EVINCE
+pkgpyexec_LTLIBRARIES = evince.la
+endif
+evince_la_CFLAGS = $(EVINCE_CFLAGS)
+evince_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initevince
+evince_la_LIBADD = $(EVINCE_LIBS)
+evince_la_SOURCES = evincemodule.c
+nodist_evince_la_SOURCES = evince.c
+CLEANFILES = evince.c
+EXTRA_DIST += evince.override  
+evince.c: evince.defs evince.override
+
+.defs.c:
+	(cd $(srcdir) \
+	 && $(PYGTK_CODEGEN) \
+            --register $(PYGTK_DEFSDIR)/gtk-types.defs \
+            --register $(PYGTK_DEFSDIR)/gdk-types.defs \
+	    --py_ssize_t-clean \
+	    --override $*.override \
+	    --prefix py$* $*.defs) > gen-$*.c \
+	&& cp gen-$*.c $*.c \
+	&& rm -f gen-$*.c
+
+EXTRA_DIST += wscript
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 529)
+++ Makefile.am	(working copy)
@@ -57,6 +57,10 @@ if BUILD_EVOLUTION
   SUBDIRS += evolution
 endif
 
+if BUILD_EVINCE
+  SUBDIRS += evince
+endif
+
 SUBDIRS +=  tests
 
 pkgconfigdir = $(libdir)/pkgconfig
