-case "$xml2" in
-no)
- ;;
-*)
- case "$xml2_includes" in
- yes|no)
- xml2_include_path=""
- ;;
- *)
- xml2_include_path="-I$xml2_includes"
- ;;
- esac
- case "$xml2_lib" in
- yes)
- case "$xml2" in
- yes|maybe)
- xml2_library="-lxml2"
- ;;
- *)
- xml2_library="-L$xml2/lib -lxml2"
- ;;
- esac
- ;;
- no)
- ;;
- *)
- xml2_library="-L$xml2_lib -lxml2"
- ;;
- esac
-
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $xml2_include_path"
- saved_LIBS="$LIBS"
- LIBS="$LIBS $xml2_library"
-
- AC_CHECK_HEADER(libxml/parser.h)
- case "$ac_cv_header_libxml_parser_h" in
- no)
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- xml2=no
- ;;
- yes)
- AC_CHECK_FUNCS(xmlInitParser)
- case "$ac_cv_func_xmlInitParser" in
- no)
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- xml2=no
- ;;
- yes)
- HAVE_XML2=1
- AC_SUBST(HAVE_XML2)
- AC_DEFINE_UNQUOTED(HAVE_XML2,$HAVE_XML2)
- expat=no
- ;;
- esac
- ;;
- esac
- ;;
-esac