<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Wed, 2010-03-03 at 20:16 -0800, Dan Nicholson wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Adds an optional parameter to XORG_CHECK_XMLTO to enforce a minimum
version needed like the asciidoc check.
Signed-off-by: Dan Nicholson <<A HREF="mailto:dbn.lists@gmail.com">dbn.lists@gmail.com</A>>
---
xorg-macros.m4.in | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index e9eecf2..016f169 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -304,7 +304,7 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
-# XORG_WITH_XMLTO
+# XORG_WITH_XMLTO([MIN-VERSION])
# ----------------
# Minimum version: 1.5.0
#
@@ -352,6 +352,20 @@ elif test "x$use_xmlto" = x"no" ; then
else
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
fi
+m4_ifval([$1],
+[if test "$have_xmlto" = yes; then
+ # scrape the xmlto version
+ AC_MSG_CHECKING([the xmlto version])
+ xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
+ AC_MSG_RESULT([$xmlto_version])
+ AS_VERSION_COMPARE([$xmlto_version], [$1],
+ [if test "x$use_xmlto" = xauto; then
+ AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
+ have_xmlto=no
+ else
+ AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
+ fi])
+fi])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_CHECK_XMLTO
</PRE>
</BLOCKQUOTE>
<BR>
Tested-by: Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>><BR>
<BR>
If you were considering bumping the version number of the util-macros package and releasing it, I'll soon post a patch <BR>
that will require a version bump as well. <BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>