diff options
author | Dan Winship <danw@src.gnome.org> | 2002-03-06 00:57:29 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-03-06 00:57:29 +0800 |
commit | 60eaaca663551f03031a82cc4a135e5ac668dd90 (patch) | |
tree | f85f905e02753177fac47a46b0f015e17d960d1f /macros/gnome-xml-check.m4 | |
parent | 33c3f207a59810fa1323454d3afd015bcba1184b (diff) | |
download | gsoc2013-evolution-60eaaca663551f03031a82cc4a135e5ac668dd90.tar.gz gsoc2013-evolution-60eaaca663551f03031a82cc4a135e5ac668dd90.tar.zst gsoc2013-evolution-60eaaca663551f03031a82cc4a135e5ac668dd90.zip |
I'm not dead yet!
svn path=/trunk/; revision=15919
Diffstat (limited to 'macros/gnome-xml-check.m4')
-rw-r--r-- | macros/gnome-xml-check.m4 | 32 |
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) +]) |