summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2010-03-03 20:16:45 -0800
committerGaetan Nadon <memsize@videotron.ca>2010-03-09 09:38:40 -0500
commitc87b5e9657e3fa1270f7283ab8b16aed1be7b5fd (patch)
treeb2b42506f691a7cfabbe7d00d55a2fbaf7f26d94
parenta01b2ce6b196555660a64c43623acab1f6fea76a (diff)
doc: Specify minimum asciidoc version to XORG_WITH_ASCIIDOC
Adds an optional parameter to XORG_WITH_ASCIIDOC to enforce a minimum version needed. Tested-by: Gaetan Nadon <memsize@videotron.ca> Tested-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r--xorg-macros.m4.in18
1 files changed, 16 insertions, 2 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 478e5fe..e23f9e1 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,8 +403,22 @@ 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
+]) # XORG_WITH_ASCIIDOC
# XORG_WITH_DOXYGEN
# ----------------