diff -pruN gstreamer-0.10.21.orig/Makefile.am gstreamer-0.10.21/Makefile.am
--- gstreamer-0.10.21.orig/Makefile.am	2008-10-05 06:46:38.927467878 +0000
+++ gstreamer-0.10.21/Makefile.am	2008-10-05 07:22:48.398353143 +0000
@@ -12,17 +12,23 @@ aclocal_DATA = gst-element-check-@GST_MA
 
 SUBDIRS = \
 	gst libs plugins tools tests \
-	docs \
 	pkgconfig po \
 	common
 
+if ENABLE_GTK_DOC
+	SUBDIRS += docs
+endif
+
 # These are all the possible subdirs
 DIST_SUBDIRS = \
 	gst libs plugins tools tests \
-	docs \
 	pkgconfig po \
 	common
 
+if ENABLE_GTK_DOC
+        DIST_SUBDIRS += docs
+endif
+
 # include before EXTRA_DIST for win32 assignment
 include $(top_srcdir)/common/win32.mak
 
