aboutsummaryrefslogtreecommitdiffstats
path: root/macros/gnome-xml-check.m4
diff options
context:
space:
mode:
authorJames Henstridge <jamesh@src.gnome.org>2001-12-05 12:54:00 +0800
committerJames Henstridge <jamesh@src.gnome.org>2001-12-05 12:54:00 +0800
commit64262ad7f2c7f72a3dffc5aa39372dbb41bdd451 (patch)
tree8e4c0b994170318d2cd7917d15826f07e92cabd6 /macros/gnome-xml-check.m4
parentdbfa5bf980f3032503c71c6b1d88239c7c501eb9 (diff)
downloadgsoc2013-evolution-64262ad7f2c7f72a3dffc5aa39372dbb41bdd451.tar.gz
gsoc2013-evolution-64262ad7f2c7f72a3dffc5aa39372dbb41bdd451.tar.zst
gsoc2013-evolution-64262ad7f2c7f72a3dffc5aa39372dbb41bdd451.zip
back again !!!
svn path=/trunk/; revision=14875
Diffstat (limited to 'macros/gnome-xml-check.m4')
-rw-r--r--macros/gnome-xml-check.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/macros/gnome-xml-check.m4 b/macros/gnome-xml-check.m4
new file mode 100644
index 0000000000..1caad1009f
--- /dev/null
+++ b/macros/gnome-xml-check.m4
@@ -0,0 +1,32 @@
+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
+ GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml`
+ AC_SUBST(GNOME_XML_CFLAGS)
+ 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)
+])