--- configure.in.old	2008-02-18 12:12:11.000000000 +0100
+++ configure.in	2008-02-18 12:13:02.000000000 +0100
@@ -66,8 +66,14 @@
 localedir='${prefix}/${DATADIRNAME}/locale'
 AC_SUBST(localedir)
 
+dnl Crazy hack for dropping the dep on gtk-doc
+AC_DEFUN(GTK_DOC_CHECK, [])
 GTK_DOC_CHECK([1.0])
 
+dnl Crazy hack for dropping the dep on gtk-doc
+AM_CONDITIONAL(ENABLE_GTK_DOC, 0, [])
+AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, 0, [])
+
 AC_PATH_XTRA
 
 if test x$no_x = xyes ; then
--- Makefile.am.old	2008-02-18 12:13:08.000000000 +0100
+++ Makefile.am	2008-02-18 12:13:59.000000000 +0100
@@ -1,4 +1,8 @@
-SUBDIRS = docs idl libspi login-helper registryd atk-bridge cspi pyatspi test po
+SUBDIRS = idl libspi login-helper registryd atk-bridge cspi pyatspi test po
+
+if ENABLE_GTK_DOC
+SUBDIRS += docs
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libspi-1.0.pc cspi-1.0.pc libloginhelper-1.0.pc