fixed compilation when configured --without-sax1 and other cleanups fixes

* SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c
  include/libxml/SAX2.h include/libxml/xmlregexp.h: fixed compilation
  when configured --without-sax1 and other cleanups fixes bug #172683
* doc/* elfgcchack.h: regenerated
Daniel
diff --git a/tree.c b/tree.c
index 6bd8d4e..b3aeaf2 100644
--- a/tree.c
+++ b/tree.c
@@ -1133,8 +1133,10 @@
 	return;
     }
 #ifdef LIBXML_DEBUG_RUNTIME
+#ifdef LIBXML_DEBUG_ENABLED
     xmlDebugCheckDocument(stderr, cur);
 #endif
+#endif
 
     if (cur != NULL) dict = cur->dict;