medit/m4/moo-xml.m4

39 lines
1.1 KiB
Plaintext
Raw Normal View History

2005-10-30 21:16:22 +00:00
##############################################################################
# MOO_AC_XML([])
#
AC_DEFUN_ONCE([MOO_AC_XML],[
2008-05-22 22:40:19 -05:00
AC_REQUIRE([MOO_AC_CHECK_OS])
AC_REQUIRE([MOO_COMPONENTS])
MOO_USE_XML="no"
AC_ARG_WITH([xml],[
AC_HELP_STRING([--with-xml], [whether to use libxml2 (default = YES)])
],[
MOO_USE_XML=$withval
],[
MOO_USE_XML=auto
])
2008-08-30 17:55:39 -05:00
if test x$MOO_USE_XML != "xno"; then
PKG_CHECK_MODULES(XML,[libxml-2.0],[moo_found_xml=yes],[moo_found_xml=no])
fi
2005-10-30 21:16:22 +00:00
2008-08-30 17:55:39 -05:00
if test x$MOO_USE_XML = "xyes" -a x$moo_found_xml = "xno"; then
AC_MSG_ERROR([libxml2 library not found])
elif test x$MOO_USE_XML != "xno" -a x$moo_found_xml = "xno" -a $MOO_BUILD_EDIT; then
AC_MSG_WARN([libxml2 library not found, syntax highlighting in the editor will be disabled])
fi
2005-10-30 21:16:22 +00:00
2008-08-30 17:55:39 -05:00
if test x$moo_found_xml = "xyes"; then
MOO_USE_XML=yes
AC_MSG_NOTICE([compiling with xml support])
AC_DEFINE(MOO_USE_XML, 1, [use libxml])
else
MOO_USE_XML=no
AC_MSG_NOTICE([compiling without xml support])
2008-05-22 22:40:19 -05:00
fi
2005-10-30 21:16:22 +00:00
2008-05-22 22:40:19 -05:00
AM_CONDITIONAL(MOO_USE_XML, test x$MOO_USE_XML = xyes)
2005-10-30 21:16:22 +00:00
])