diff -ru gst-plugins-base-0.10.32.orig/configure.ac gst-plugins-base-0.10.32.new/configure.ac
--- gst-plugins-base-0.10.32.orig/configure.ac	2012-06-28 21:25:07.192182542 +0200
+++ gst-plugins-base-0.10.32.new/configure.ac	2012-06-28 22:35:41.700396385 +0200
@@ -173,18 +173,8 @@
 dnl FIXME: could be fixed by redefining av_malloc and av_free to GLib's
 AC_CHECK_HEADERS([malloc.h])
 
-ac_cppflags_save="$CPPFLAGS"
-CPPFLAGS="`$PKG_CONFIG --cflags libxml-2.0`"
-AC_COMPILE_IFELSE(
-  AC_LANG_PROGRAM([
-#include <libxml/HTMLparser.h>
-                     ],[
-#ifndef LIBXML_HTML_ENABLED
-#error libxml2 has no HTML support
-#endif /* LIBXML_HTML_ENABLED */
-                   ]), HAVE_LIBXML_HTML="yes", HAVE_LIBXML_HTML="no")
-CPPFLAGS="$ac_cppflags_save"
-AM_CONDITIONAL(HAVE_LIBXML_HTML, test "x$HAVE_LIBXML_HTML" = "xyes")
+AG_GST_LIBXML2_CHECK
+AM_CONDITIONAL(HAVE_LIBXML2, test "x$HAVE_LIBXML2" = "xyes")
 
 dnl used in gst/tcp
 AC_CHECK_HEADERS([sys/socket.h], 
@@ -435,17 +425,6 @@
 AG_GST_CHECK_PLUGIN(videoscale)
 AG_GST_CHECK_PLUGIN(volume)
 
-dnl check for gstreamer core features (subsystems)
-dnl FIXME: this assumes srcdir == builddir for uninstalled setups
-GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-0.10`"/gst/gstconfig.h"
-AG_GST_PARSE_SUBSYSTEM_DISABLES($GST_CONFIGPATH)
-AM_CONDITIONAL(USE_XML, test $GST_DISABLE_XML != "1")
-
-dnl disable plug-ins that require libxml2's HTML support if it is not available
-if test "x$HAVE_LIBXML_HTML" != "xyes"; then
-  AG_GST_DISABLE_PLUGIN(subparse)
-fi
-
 dnl disable plug-ins that require sys/socket.h if it is not available
 if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then
   AG_GST_DISABLE_PLUGIN(tcp)
diff -ru gst-plugins-base-0.10.32.orig/gst/subparse/gstsubparse.c gst-plugins-base-0.10.32.new/gst/subparse/gstsubparse.c
--- gst-plugins-base-0.10.32.orig/gst/subparse/gstsubparse.c	2012-06-28 21:25:07.168182541 +0200
+++ gst-plugins-base-0.10.32.new/gst/subparse/gstsubparse.c	2012-06-28 22:33:11.356388792 +0200
@@ -55,7 +55,7 @@
     GValue * value, GParamSpec * pspec);
 
 
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
 static GstStaticPadTemplate sink_templ = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_SINK,
     GST_PAD_ALWAYS,
@@ -146,7 +146,7 @@
     case GST_SUB_PARSE_FORMAT_QTTEXT:
       qttext_context_deinit (&subparse->state);
       break;
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
     case GST_SUB_PARSE_FORMAT_SAMI:
       sami_context_deinit (&subparse->state);
       break;
@@ -1210,7 +1210,7 @@
   }
   if (state->user_data) {
     switch (self->parser_type) {
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
       case GST_SUB_PARSE_FORMAT_SAMI:
         sami_context_reset (state);
         break;
@@ -1318,7 +1318,7 @@
     GST_LOG ("MPSub (time based) format detected");
     return GST_SUB_PARSE_FORMAT_MPSUB;
   }
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
   if (strstr (match_str, "<SAMI>") != NULL ||
       strstr (match_str, "<sami>") != NULL) {
     GST_LOG ("SAMI (time based) format detected");
@@ -1380,7 +1380,7 @@
     case GST_SUB_PARSE_FORMAT_MPSUB:
       self->parse_line = parse_mpsub;
       return gst_caps_new_simple ("text/plain", NULL);
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
     case GST_SUB_PARSE_FORMAT_SAMI:
       self->parse_line = parse_sami;
       sami_context_init (&self->state);
@@ -1433,7 +1433,7 @@
     parser_state_init (&self->state);
     g_string_truncate (self->textbuf, 0);
     gst_adapter_clear (self->adapter);
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
     if (self->parser_type == GST_SUB_PARSE_FORMAT_SAMI)
       sami_context_reset (&self->state);
 #endif
@@ -1726,7 +1726,7 @@
 static GstStaticCaps sub_caps = GST_STATIC_CAPS ("application/x-subtitle");
 #define MPL2_CAPS (gst_static_caps_get (&mpl2_caps))
 
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
 static GstStaticCaps smi_caps = GST_STATIC_CAPS ("application/x-subtitle-sami");
 #define SAMI_CAPS (gst_static_caps_get (&smi_caps))
 #endif
@@ -1817,7 +1817,7 @@
       GST_DEBUG ("MPSub format detected");
       caps = SUB_CAPS;
       break;
-#ifndef GST_DISABLE_XML
+#ifdef HAVE_LIBXML2
     case GST_SUB_PARSE_FORMAT_SAMI:
       GST_DEBUG ("SAMI (time-based) format detected");
       caps = SAMI_CAPS;
diff -ru gst-plugins-base-0.10.32.orig/gst/subparse/Makefile.am gst-plugins-base-0.10.32.new/gst/subparse/Makefile.am
--- gst-plugins-base-0.10.32.orig/gst/subparse/Makefile.am	2012-06-28 21:25:07.168182541 +0200
+++ gst-plugins-base-0.10.32.new/gst/subparse/Makefile.am	2012-06-28 22:34:00.524391276 +0200
@@ -1,17 +1,10 @@
 plugin_LTLIBRARIES = libgstsubparse.la
 
-if USE_XML
-SAMIPARSE_SOURCES = samiparse.c samiparse.h
-else
-SAMIPARSE_SOURCES = 
-endif
-
 libgstsubparse_la_SOURCES = \
 	gstssaparse.c \
 	gstssaparse.h \
 	gstsubparse.c \
 	gstsubparse.h \
-	$(SAMIPARSE_SOURCES) \
 	tmplayerparse.c \
 	tmplayerparse.h \
 	mpl2parse.c \
@@ -24,6 +17,12 @@
 libgstsubparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
 libgstsubparse_la_LIBTOOLFLAGS = --tag=disable-static
 
+if HAVE_LIBXML2
+libgstsubparse_la_SOURCES += samiparse.c samiparse.h
+libgstsubparse_la_CFLAGS += $(XML_CFLAGS)
+libgstsubparse_la_LIBADD += $(XML_LIBS)
+endif
+
 noinst_HEADERS = \
 	gstssaparse.h \
 	gstsubparse.h \
