aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-xml-check.m4
diff options
context:
space:
mode:
Diffstat (limited to 'macros/gnome-xml-check.m4')
-rw-r--r--macros/gnome-xml-check.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/macros/gnome-xml-check.m4 b/macros/gnome-xml-check.m4
new file mode 100644
index 0000000000..6649890fb6
--- /dev/null
+++ b/macros/gnome-xml-check.m4
@@ -0,0 +1,17 @@
+dnl
+dnl Check for availability of the libxml library
+dnl the XML parser uses libz if available too
+dnl
+AC_DEFUN([GNOME_XML_CHECK],[
+ dnl Checks for zlib library.
+ Z_LIBS=
+ AC_CHECK_LIB(z, inflate,
+ AC_CHECK_HEADER(zlib.h, Z_LIBS="-lz"))
+
+ AC_REQUIRE([GNOME_INIT_HOOK])
+ GNOME_XML_LIB=""
+ AC_CHECK_LIB(xml, xmlNewDoc, GNOME_XML_LIB="-lxml",
+ ,-L$gnome_prefix $Z_LIBS)
+ AC_SUBST(GNOME_XML_LIB)
+ AC_PROVIDE([GNOME_XML_CHECK])
+])