diff options
author | Jakub Narebski <jnareb@gmail.com> | 2007-12-09 13:57:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-11 00:38:38 -0800 |
commit | 923db42eea6fac743d8c93f0af4904740a445edf (patch) | |
tree | 7a15342301eb36066b93c54105597cfc11a99243 /configure.ac | |
parent | eb9688ff65a3f7fb28ee6488be728fc72e42d5d6 (diff) | |
download | git-923db42eea6fac743d8c93f0af4904740a445edf.tar.gz |
autoconf: Check asciidoc version to automatically set ASCIIDOC8
Check for asciidoc, and if it exists check asciidoc version, setting
ASCIIDOC8 when needed. Currently it just runs asciidoc in asciidoc7
compatibility mode (see: Documentation/Makefile).
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index dd4b4eb982..6f641e32f0 100644 --- a/configure.ac +++ b/configure.ac @@ -122,6 +122,27 @@ if test -z "$NO_TCLTK"; then AC_SUBST(TCLTK_PATH) fi fi +AC_CHECK_PROGS(ASCIIDOC, [asciidoc]) +if test -n "$ASCIIDOC"; then + AC_MSG_CHECKING([for asciidoc version]) + asciidoc_version=`$ASCIIDOC --version 2>&1` + case "${asciidoc_version}" in + asciidoc' '8*) + ASCIIDOC8=YesPlease + AC_MSG_RESULT([${asciidoc_version} > 7]) + ;; + asciidoc' '7*) + ASCIIDOC8= + AC_MSG_RESULT([${asciidoc_version}]) + ;; + *) + ASCIIDOC8= + AC_MSG_RESULT([${asciidoc_version} (unknown)]) + ;; + esac +fi +AC_SUBST(ASCIIDOC8) + ## Checks for libraries. AC_MSG_NOTICE([CHECKS for libraries]) |