diff --git a/configure.ac b/configure.ac
index 228127d..1481799 100644
--- a/configure.ac
+++ b/configure.ac
@@ -405,14 +405,11 @@ AG_GST_CHECK_PLUGIN(videorate)
 AG_GST_CHECK_PLUGIN(videoscale)
 AG_GST_CHECK_PLUGIN(volume)
 
-dnl FIXME 0.11: check for libxml, split subparse and move libxml parts to ext/
-AM_CONDITIONAL(USE_XML, false)
-AC_DEFINE([GST_DISABLE_XML], [1], [set to disable libxml2-dependent code in subparse])
-
-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 sami parsing that requires libxml2's HTML support if it is not available
+dnl FIXME: split subparse and move libxml parts to ext/
+AM_COND_IF(HAVE_LIBXML_HTML, 
+  [PKG_CHECK_MODULES(LIBXML, libxml-2.0)],
+  [AC_DEFINE([GST_DISABLE_XML], [], [set to disable libxml2-dependent code in subparse])])
 
 dnl iso-codes is optional, used by libgsttag
 AC_ARG_ENABLE(iso-codes,
diff --git a/gst/subparse/Makefile.am b/gst/subparse/Makefile.am
index 4a33bd4..9a87a4d 100644
--- a/gst/subparse/Makefile.am
+++ b/gst/subparse/Makefile.am
@@ -1,9 +1,13 @@
 plugin_LTLIBRARIES = libgstsubparse.la
 
-if USE_XML
+if HAVE_LIBXML_HTML
 SAMIPARSE_SOURCES = samiparse.c samiparse.h
+SAMIPARSE_CFLAGS = $(LIBXML_CFLAGS)
+SAMIPARSE_LIBS = $(LIBXML_LIBS)
 else
 SAMIPARSE_SOURCES = 
+SAMIPARSE_CFLAGS =
+SAMIPARSE_LIBS =
 endif
 
 libgstsubparse_la_SOURCES = \
@@ -19,9 +23,9 @@ libgstsubparse_la_SOURCES = \
         qttextparse.c \
         qttextparse.h
 
-libgstsubparse_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS)
+libgstsubparse_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(SAMIPARSE_CFLAGS)
 libgstsubparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgstsubparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
+libgstsubparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(SAMIPARSE_LIBS)
 libgstsubparse_la_LIBTOOLFLAGS = --tag=disable-static
 
 noinst_HEADERS = \
