diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2010-03-03 20:16:46 -0800 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-03-09 09:40:27 -0500 |
commit | d7cedc8ce552581c9acbfbe373cbee16a689abef (patch) | |
tree | e55861555959196b99c599072b6673ba139b8cfb | |
parent | c87b5e9657e3fa1270f7283ab8b16aed1be7b5fd (diff) |
doc: Specify minimum xmlto version to XORG_WITH_XMLTO
Adds an optional parameter to XORG_WITH_XMLTO to enforce a minimum
version needed like the asciidoc version check.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r-- | xorg-macros.m4.in | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index e23f9e1..cdff61d 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,8 +352,22 @@ 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 +]) # XORG_WITH_XMLTO # XORG_WITH_ASCIIDOC([MIN-VERSION]) # ---------------- |