Index: configure.in
===================================================================
--- configure.in	(revision 1244)
+++ configure.in	(working copy)
@@ -203,6 +203,12 @@
 
 Pass "--without-gnome" to configure if you want to build libsoup
 without GNOME support.])])
+
+	AC_SUBST(GNOME_CHAPTER_BEGIN, "")
+	AC_SUBST(GNOME_CHAPTER_END, "")
+else
+	AC_SUBST(GNOME_CHAPTER_BEGIN, "<!-- ")
+	AC_SUBST(GNOME_CHAPTER_END, " -->")
 fi
 AC_SUBST(HAVE_GNOME)
 AC_SUBST(LIBPROXY_CFLAGS)
@@ -371,4 +377,5 @@
 	tests/httpd.conf
 	docs/Makefile
 	docs/reference/Makefile
+	docs/reference/libsoup-2.4-docs.sgml
 	])
Index: docs/reference/Makefile.am
===================================================================
--- docs/reference/Makefile.am	(revision 1244)
+++ docs/reference/Makefile.am	(working copy)
@@ -13,7 +13,7 @@
 DOC_SOURCE_DIR=../../libsoup
 
 # Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS=--deprecated-guards=LIBSOUP_DISABLE_DEPRECATED
+SCAN_OPTIONS=--deprecated-guards=LIBSOUP_DISABLE_DEPRECATED --rebuild-types
 
 # Extra options to supply to gtkdoc-scangobj.
 SCANGOBJ_OPTIONS=--type-init-func 'g_type_init(); g_thread_init(NULL)'
@@ -37,6 +37,11 @@
 	soup-message-queue.h soup-path-map.h soup-ssl.h \
 	soup-proxy-resolver-libproxy.h soup-proxy-resolver-static.h
 
+if !BUILD_LIBSOUP_GNOME
+IGNORE_HFILES += soup-cookie-jar-sqlite.h \
+	soup-gnome.h soup-gnome-features.h
+endif
+
 # Images to copy into HTML directory.
 HTML_IMAGES = 
 
@@ -60,7 +65,11 @@
 	$(GNUTLS_CFLAGS)		\
 	$(LIBPROXY_LIBS)
 
+if BUILD_LIBSOUP_GNOME
 GTKDOC_LIBS = $(top_builddir)/libsoup/libsoup-gnome-2.4.la
+else
+GTKDOC_LIBS = $(top_builddir)/libsoup/libsoup-2.4.la
+endif
 
 # include common portion ...
 include $(top_srcdir)/gtk-doc.make
Index: docs/reference/libsoup-2.4-docs.sgml.in
===================================================================
--- docs/reference/libsoup-2.4-docs.sgml.in	(revision 1244)
+++ docs/reference/libsoup-2.4-docs.sgml.in	(working copy)
@@ -47,11 +47,13 @@
     <xi:include href="xml/soup-value-utils.xml"/>
   </chapter>
 
+  @GNOME_CHAPTER_BEGIN@
   <chapter>
     <title>GNOME integration</title>
     <xi:include href="xml/soup-gnome-features.xml"/>
     <xi:include href="xml/soup-cookie-jar-sqlite.xml"/>
   </chapter>
+  @GNOME_CHAPTER_END@
 
   <chapter>
     <title>Low-level Networking API</title>
