diff options
-rw-r--r-- | macros/gnome-xml-check.m4 | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/macros/gnome-xml-check.m4 b/macros/gnome-xml-check.m4 index 6649890fb6..9406b640cc 100644 --- a/macros/gnome-xml-check.m4 +++ b/macros/gnome-xml-check.m4 @@ -2,7 +2,8 @@ dnl dnl Check for availability of the libxml library dnl the XML parser uses libz if available too dnl -AC_DEFUN([GNOME_XML_CHECK],[ + +AC_DEFUN([GNOME_XML_HOOK],[ dnl Checks for zlib library. Z_LIBS= AC_CHECK_LIB(z, inflate, @@ -11,7 +12,17 @@ AC_DEFUN([GNOME_XML_CHECK],[ AC_REQUIRE([GNOME_INIT_HOOK]) GNOME_XML_LIB="" AC_CHECK_LIB(xml, xmlNewDoc, GNOME_XML_LIB="-lxml", - ,-L$gnome_prefix $Z_LIBS) + GNOME_XML_LIB="itwwci", -L$gnome_prefix $Z_LIBS) AC_SUBST(GNOME_XML_LIB) - AC_PROVIDE([GNOME_XML_CHECK]) + AC_PROVIDE([GNOME_XML_HOOK]) + + if test "$GNOME_XML_LIB" = "itwwci"; then + if test x$2 = xfailure; then + AC_MSG_ERROR(Could not find xml) + fi + fi +]) + +AC_DEFUN([GNOME_XML_CHECK], [ + GNOME_XML_HOOK([],failure) ]) |