-xml2dir=default
-AC_ARG_WITH(xml2,[[ --with-xml2[=PREFIX] use libxml2 in PREFIX]],xml2dir=$withval)
-dnl -- if no PREFIX or not specified we just search in default locations
-dnl -- try pkg-config. If not found, use xml2-config
-if test "$xml2dir" = "yes" -o "$xml2dir" = "default"; then
- if test "$pkgconfigpath" != "NONE"; then
- if $pkgconfigpath --exists libxml-2.0; then
- pkgmodule="libxml-2.0"
- fi
- fi
- if test -z "$pkgmodule"; then
- for d in /usr /usr/local; do
- if test -x $d/bin/xml2-config; then
- xml2dir=$d
- fi
- done
- fi
-fi
-dnl --- do the real check (pkg-config, xml2-config, not-found)
-if test "$xml2dir" != "no"; then
- AC_MSG_CHECKING(for libXML2)
- if test "$pkgmodule"; then
- XML2_LIBS=`$pkgconfigpath --libs $pkgmodule`
- XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule`
- XML2_VER=`$pkgconfigpath --modversion $pkgmodule`
- AC_MSG_RESULT($XML2_VER)
- AC_DEFINE(HAVE_XML2)
- elif test -x $xml2dir/bin/xml2-config; then
- XML2_LIBS=`$xml2dir/bin/xml2-config --libs`
- XML2_CFLAGS=`$xml2dir/bin/xml2-config --cflags`
- XML2_VER=`$xml2dir/bin/xml2-config --version`
- AC_MSG_RESULT($XML2_VER)
- AC_DEFINE(HAVE_XML2)
- else
- AC_MSG_RESULT(Not found)
-
- if test "$xml2dir" = "default"; then
- AC_MSG_WARN([libxml2 development libraries not found.])
- AC_MSG_WARN([YAZ will NOT support SRU.])
- else
- AC_MSG_ERROR([libxml2 development libraries not found.])
- fi
- fi
-fi
-
-dnl ----- libXSLT
-xsltdir=default
-pkgmodule=""
-AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libXSLT in PREFIX]],xsltdir=$withval)