<!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_ASCIIDOC to enforce a minimum
version needed.
</PRE>
</BLOCKQUOTE>
Tested-by: Gaetan Nadon <<A HREF="mailto:Gaetan%20Nadon%20%3cmemsize@videotron.ca%3e">memsize@videotron.ca</A>>
<BLOCKQUOTE TYPE=CITE>
<PRE>
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 478e5fe..e9eecf2 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -355,7 +355,7 @@ fi
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_CHECK_XMLTO
-# XORG_WITH_ASCIIDOC
+# XORG_WITH_ASCIIDOC([MIN-VERSION])
# ----------------
# Minimum version: 1.5.0
#
@@ -403,6 +403,20 @@ elif test "x$use_asciidoc" = x"no" ; then
else
AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
fi
+m4_ifval([$1],
+[if test "$have_asciidoc" = yes; then
+ # scrape the asciidoc version
+ AC_MSG_CHECKING([the asciidoc version])
+ asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
+ AC_MSG_RESULT([$asciidoc_version])
+ AS_VERSION_COMPARE([$asciidoc_version], [$1],
+ [if test "x$use_asciidoc" = xauto; then
+ AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
+ have_asciidoc=no
+ else
+ AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
+ fi])
+fi])
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
]) # XORG_CHECK_ASCIIDOC
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>