Okay this is scary but it is just adding a configure option to disable

* HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c
  encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c
  testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c
  testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c
  xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c
  example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h
  include/libxml/catalog.h include/libxml/debugXML.h
  include/libxml/entities.h include/libxml/nanohttp.h
  include/libxml/relaxng.h include/libxml/tree.h
  include/libxml/valid.h include/libxml/xmlIO.h
  include/libxml/xmlschemas.h include/libxml/xmlversion.h.in
  include/libxml/xpathInternals.h python/libxml.c:
  Okay this is scary but it is just adding a configure option
  to disable output, this touches most of the files.
Daniel
diff --git a/tree.c b/tree.c
index b372e43..8dd86d6 100644
--- a/tree.c
+++ b/tree.c
@@ -6789,6 +6789,7 @@
 }
 
 
+#ifdef LIBXML_OUTPUT_ENABLED
 /************************************************************************
  *									*
  *   		Dumping XML tree content to a simple buffer		*
@@ -7567,6 +7568,7 @@
 	}
     }
 }
+#endif /* LIBXML_OUTPUT_ENABLED */
 
 #ifdef LIBXML_HTML_ENABLED
 /************************************************************************
@@ -7615,6 +7617,7 @@
     return(0);
 }
 
+#ifdef LIBXML_OUTPUT_ENABLED
 /**
  * xhtmlIsEmpty:
  * @node:  the node
@@ -8059,8 +8062,10 @@
     xmlOutputBufferWriteString(buf, (const char *)cur->name);
     xmlOutputBufferWriteString(buf, ">");
 }
+#endif /* LIBXML_OUTPUT_ENABLED */
 #endif
 
+#ifdef LIBXML_OUTPUT_ENABLED
 /************************************************************************
  *									*
  *		Saving functions front-ends				*
@@ -8211,61 +8216,6 @@
 }
 
 /**
- * xmlGetDocCompressMode:
- * @doc:  the document
- *
- * get the compression ratio for a document, ZLIB based
- * Returns 0 (uncompressed) to 9 (max compression)
- */
-int
-xmlGetDocCompressMode (xmlDocPtr doc) {
-    if (doc == NULL) return(-1);
-    return(doc->compression);
-}
-
-/**
- * xmlSetDocCompressMode:
- * @doc:  the document
- * @mode:  the compression ratio
- *
- * set the compression ratio for a document, ZLIB based
- * Correct values: 0 (uncompressed) to 9 (max compression)
- */
-void
-xmlSetDocCompressMode (xmlDocPtr doc, int mode) {
-    if (doc == NULL) return;
-    if (mode < 0) doc->compression = 0;
-    else if (mode > 9) doc->compression = 9;
-    else doc->compression = mode;
-}
-
-/**
- * xmlGetCompressMode:
- *
- * get the default compression mode used, ZLIB based.
- * Returns 0 (uncompressed) to 9 (max compression)
- */
-int
-xmlGetCompressMode(void)
-{
-    return (xmlCompressMode);
-}
-
-/**
- * xmlSetCompressMode:
- * @mode:  the compression ratio
- *
- * set the default compression mode used, ZLIB based
- * Correct values: 0 (uncompressed) to 9 (max compression)
- */
-void
-xmlSetCompressMode(int mode) {
-    if (mode < 0) xmlCompressMode = 0;
-    else if (mode > 9) xmlCompressMode = 9;
-    else xmlCompressMode = mode;
-}
-
-/**
  * xmlDocFormatDump:
  * @f:  the FILE*
  * @cur:  the document
@@ -8463,3 +8413,60 @@
     return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
 }
 
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlGetDocCompressMode:
+ * @doc:  the document
+ *
+ * get the compression ratio for a document, ZLIB based
+ * Returns 0 (uncompressed) to 9 (max compression)
+ */
+int
+xmlGetDocCompressMode (xmlDocPtr doc) {
+    if (doc == NULL) return(-1);
+    return(doc->compression);
+}
+
+/**
+ * xmlSetDocCompressMode:
+ * @doc:  the document
+ * @mode:  the compression ratio
+ *
+ * set the compression ratio for a document, ZLIB based
+ * Correct values: 0 (uncompressed) to 9 (max compression)
+ */
+void
+xmlSetDocCompressMode (xmlDocPtr doc, int mode) {
+    if (doc == NULL) return;
+    if (mode < 0) doc->compression = 0;
+    else if (mode > 9) doc->compression = 9;
+    else doc->compression = mode;
+}
+
+/**
+ * xmlGetCompressMode:
+ *
+ * get the default compression mode used, ZLIB based.
+ * Returns 0 (uncompressed) to 9 (max compression)
+ */
+int
+xmlGetCompressMode(void)
+{
+    return (xmlCompressMode);
+}
+
+/**
+ * xmlSetCompressMode:
+ * @mode:  the compression ratio
+ *
+ * set the default compression mode used, ZLIB based
+ * Correct values: 0 (uncompressed) to 9 (max compression)
+ */
+void
+xmlSetCompressMode(int mode) {
+    if (mode < 0) xmlCompressMode = 0;
+    else if (mode > 9) xmlCompressMode = 9;
+    else xmlCompressMode = mode;
+}
+