+dnl ----- libXSLT
+AC_SUBST(XSLT_LIBS)
+AC_SUBST(XSLT_CFLAGS)
+xsltdir=yes
+AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
+if test "$xsltdir" = "yes"; then
+ for d in /usr /usr/local; do
+ if test -x $d/bin/xslt-config; then
+ xsltdir=$d
+ fi
+ done
+fi
+if test "$xsltdir" != "no"; then
+ AC_MSG_CHECKING(for libXSLT)
+
+ if test -x $xsltdir/bin/xslt-config; then
+ XSLT_VER=`$xsltdir/bin/xslt-config --version`
+ AC_MSG_RESULT($XSLT_VER)
+ have_xslt_version=`echo "$XSLT_VER" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
+ if test $have_xslt_version -lt 1001012; then
+ AC_MSG_WARN([libXSLT too old. Use 1.1.12 or later.])
+ XSLT_VER=""
+ else
+ XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
+ XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
+ AC_DEFINE(HAVE_XSLT)
+ fi
+ else
+ AC_MSG_RESULT(Not found)
+ fi
+fi