-if test "$XSLT_VER"; then
- def="shared"
-else
- def="disabled"
-fi
-ZEBRA_MODULE(alvis,[$def], [ --enable-mod-alvis ALVIS filter (Requires libxslt)])
+oldCPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $YAZINC"
+AC_PREPROC_IFELSE(
+ [AC_LANG_PROGRAM([[
+#if YAZ_HAVE_XML2
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+#else
+#error Libxml2 not available
+#endif
+]],[[
+#if LIBXML_VERSION < 20615
+#error Libxml2 version < 2.6.15. xmlreader not reliable/present
+#endif
+]])],
+ [def="shared"],
+ [def="disabled"])
+CPPFLAGS=$oldCPPFLAGS
+AC_DEFINE([IDZEBRA_STATIC_DOM],[0],[Whether module dom is static])
+ZEBRA_MODULE(dom,[$def], [ --enable-mod-dom XML/XSLT filter (Requires libxslt)])
+AC_DEFINE([IDZEBRA_STATIC_ALVIS],[0],[Whether module alvis is static])
+ZEBRA_MODULE(alvis,[$def], [ --enable-mod-alvis ALVIS filter (Requires libxslt)])
+AC_DEFINE([IDZEBRA_STATIC_SAFARI],[0],[Whether module safari is static])
+ZEBRA_MODULE(safari,shared,[ --enable-mod-safari Safari filter (DBC)])
+