-if test "$with_xml" = yes; then
- have_xml=no
- have_old_xml=no
-
- # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
- # look in /foo/bin/ for for xml-config.
- #
- xml_path="$PATH"
-
- if test ! -z "$gtk_dir"; then
- # canonicalize slashes.
- foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
- xml_path="$foo:$xml_path"
- fi
-
- if test ! -z "$gnome_dir"; then
- # canonicalize slashes.
- foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
- xml_path="$foo:$xml_path"
- fi
-
- if test -n "$pkg_config" ; then
- #
- # the new way...
- # run pkg-config based tests.
- #
- pkgs=""
- ok="yes"
-
- # If we have Gtk 2.x, then *only* XML 2.x will work.
- # If we have Gtk 1.x, or don't have Gtk at all, then
- # either XML 1.x or 2.x will work.
-
- # First check for XML 2.x.
- #
- pkg_check_version libxml-2.0 2.4.6
-
- # If that didn't work (we don't have XML 2.x) and we *don't* have
- # Gtk 2.x, then check to see if we have XML 1.x
- #
- if test "$ok" = no -a "$have_gtk2" = no; then
- ok=yes
- pkg_check_version libxml 1.0
- fi
-
- have_xml="$ok"
-
- if test "$have_xml" = yes; then
- echo "$as_me:$LINENO: checking for XML includes" >&5
-echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
-if test "${ac_cv_xml_config_cflags+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
-fi
-echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
-echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
- echo "$as_me:$LINENO: checking for XML libs" >&5
-echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
-if test "${ac_cv_xml_config_libs+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
-fi
-echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
-echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
- ac_xml_config_cflags=$ac_cv_xml_config_cflags
- ac_xml_config_libs=$ac_cv_xml_config_libs
- fi
-
- else
- #
- # the old way...
- # run {xml2,xml}-config based tests.
- #
-
- for ac_prog in xml2-config xml-config
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_xml_config+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $xml_config in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $xml_path
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- ;;
-esac
-fi
-xml_config=$ac_cv_path_xml_config
-
-if test -n "$xml_config"; then
- echo "$as_me:$LINENO: result: $xml_config" >&5
-echo "${ECHO_T}$xml_config" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$xml_config" && break
-done
-
-
- # If we found the xml-config program, run it to get flags.
- #
- if test -n "$xml_config" ; then
- echo "$as_me:$LINENO: checking for XML includes" >&5
-echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
-if test "${ac_cv_xml_config_cflags+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_xml_config_cflags=`$xml_config --cflags`
-fi
-echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
-echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
- echo "$as_me:$LINENO: checking for XML libs" >&5
-echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
-if test "${ac_cv_xml_config_libs+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_xml_config_libs=`$xml_config --libs`
-fi
-echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
-echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
- ac_xml_config_cflags=$ac_cv_xml_config_cflags
- ac_xml_config_libs=$ac_cv_xml_config_libs
- fi
-
- ac_save_xml_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
-
- # first try <libxml/parser.h> which is the new way...
- #
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
- echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
-echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
-if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <libxml/parser.h>
-
-#include <libxml/xmlIO.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_libxml_xmlIO_h=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_header_libxml_xmlIO_h=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
-echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
-if test $ac_cv_header_libxml_xmlIO_h = yes; then
- have_xml=yes
-fi
-
-
- CPPFLAGS="$ac_save_CPPFLAGS"
-
- # if that didn't work, then try just <parser.h> which is the old way...
- #
- if test "$have_xml" = no; then
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
- echo "$as_me:$LINENO: checking for xmlIO.h" >&5
-echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
-if test "${ac_cv_header_xmlIO_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <parser.h>
-
-#include <xmlIO.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_xmlIO_h=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_header_xmlIO_h=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
-echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
-if test $ac_cv_header_xmlIO_h = yes; then
- have_xml=yes; have_old_xml=yes
-fi
-
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- fi
-
- CPPFLAGS="$ac_save_xml_CPPFLAGS"
- fi
-
-
- have_zlib=no
- if test "$have_xml" = yes; then
- # we have the XML headers; now make sure zlib is around.
- # yes, it's stupid we have to do this too, but there is
- # dependency screwage in Gnome.
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LDFLAGS="$LDFLAGS"
-# ac_save_LIBS="$LIBS"
-
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- # note: $X_CFLAGS includes $x_includes
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-
- if test \! -z "$libdir" ; then
- LDFLAGS="$LDFLAGS -L$libdir"
- fi
- # note: $X_LIBS includes $x_libraries
- LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"