-xml2dir=default
-AC_ARG_WITH(xml2, [ --with-xml2[=PREFIX] use libxml2 in PREFIX],[xml2dir=$withval])
-if test "$xml2dir" = "yes" -o "$xml2dir" = "default"; then
- for d in /usr /usr/local; do
- if test -x $d/bin/xml2-config; then
- xml2dir=$d
- fi
- done
-fi
-if test "$xml2dir" != "no"; then
- AC_MSG_CHECKING(for libXML2)
- if test -x $xml2dir/bin/xml2-config; then
- XML2_LIBS=`$xml2dir/bin/xml2-config --libs`
- LIBS="$XML2_LIBS $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 SRW/SRU.])
- else
- AC_MSG_ERROR([libXML2 development libraries not found.])
- fi
- fi