summaryrefslogtreecommitdiff
path: root/macros/gnome-xml-check.m4
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-09-07 17:30:43 +0000
committerArturo Espinosa <unammx@src.gnome.org>1998-09-07 17:30:43 +0000
commit7051f101b7a9c36fa6c121a57348dddb7792f477 (patch)
tree791f63149e48a851f91930415d223ef4e6490ec9 /macros/gnome-xml-check.m4
parent3c0de4f7babfb9bf83456398f27c66bd2fe05de1 (diff)
downloadgnome-common-7051f101b7a9c36fa6c121a57348dddb7792f477.tar.gz
Fixed detection of xml in gnome-xml macros -mig
svn path=/trunk/; revision=379
Diffstat (limited to 'macros/gnome-xml-check.m4')
-rw-r--r--macros/gnome-xml-check.m426
1 files changed, 12 insertions, 14 deletions
diff --git a/macros/gnome-xml-check.m4 b/macros/gnome-xml-check.m4
index 9406b64..5788770 100644
--- a/macros/gnome-xml-check.m4
+++ b/macros/gnome-xml-check.m4
@@ -1,26 +1,24 @@
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],[
- 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",
- GNOME_XML_LIB="itwwci", -L$gnome_prefix $Z_LIBS)
- AC_SUBST(GNOME_XML_LIB)
- AC_PROVIDE([GNOME_XML_HOOK])
-
- if test "$GNOME_XML_LIB" = "itwwci"; then
+ 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 xml)
+ AC_MSG_ERROR(Could not find gnome-config)
fi
fi
+ AC_CHECK_LIB(xml, xmlNewDoc, [$1], [
+ if text x$2 = failure; then
+ AC_MSG_ERROR(Could not link sample xml program)
+ fi
+ ], gnome-config --libs xml)
])
AC_DEFUN([GNOME_XML_CHECK], [