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>
This commit is contained in:
parent
eb9688ff65
commit
923db42eea
@ -23,6 +23,7 @@ VPATH = @srcdir@
|
||||
export exec_prefix mandir
|
||||
export srcdir VPATH
|
||||
|
||||
ASCIIDOC8=@ASCIIDOC8@
|
||||
NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
|
||||
NO_OPENSSL=@NO_OPENSSL@
|
||||
NO_CURL=@NO_CURL@
|
||||
|
21
configure.ac
21
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])
|
||||
|
Loading…
Reference in New Issue
Block a user