aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-xml-check.m4
diff options
context:
space:
mode:
authorJames Henstridge <jamesh@src.gnome.org>2000-02-13 19:05:13 +0800
committerJames Henstridge <jamesh@src.gnome.org>2000-02-13 19:05:13 +0800
commit25faacf1396a1221114733e7a12c89d502c7212d (patch)
treed59ad965d80be87e76b3e49c86aa728a783d8726 /macros/gnome-xml-check.m4
parent61657f8452b1c1b2829610af9d0efd30076c1798 (diff)
downloadgsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.tar
gsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.tar.gz
gsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.tar.bz2
gsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.tar.lz
gsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.tar.xz
gsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.tar.zst
gsoc2013-evolution-25faacf1396a1221114733e7a12c89d502c7212d.zip
I am sure that kabalak didn't mean to remove gnome-common/macros :)
svn path=/trunk/; revision=1747
Diffstat (limited to 'macros/gnome-xml-check.m4')
-rw-r--r--macros/gnome-xml-check.m430
1 files changed, 30 insertions, 0 deletions
diff --git a/macros/gnome-xml-check.m4 b/macros/gnome-xml-check.m4
new file mode 100644
index 0000000000..4bc91d124d
--- /dev/null
+++ b/macros/gnome-xml-check.m4
@@ -0,0 +1,30 @@
+dnl
+dnl GNOME_XML_HOOK (script-if-xml-found, failflag)
+dnl
+dnl If failflag is "failure", script aborts due to lack of XML
+dnl
+dnl Check for availability of the libxml library
+dnl the XML parser uses libz if available too
+dnl
+
+AC_DEFUN([GNOME_XML_HOOK],[
+ AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
+ if test "$GNOME_CONFIG" = no; then
+ if test x$2 = xfailure; then
+ AC_MSG_ERROR(Could not find gnome-config)
+ fi
+ fi
+ AC_CHECK_LIB(xml, xmlNewDoc, [
+ $1
+ GNOME_XML_LIB=`$GNOME_CONFIG --libs xml`
+ ], [
+ if test x$2 = xfailure; then
+ AC_MSG_ERROR(Could not link sample xml program)
+ fi
+ ], `$GNOME_CONFIG --libs xml`)
+ AC_SUBST(GNOME_XML_LIB)
+])
+
+AC_DEFUN([GNOME_XML_CHECK], [
+ GNOME_XML_HOOK([],failure)
+])