Commit 96b28307 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add version check for Sphinx

Sphinx 1.0 and above can check version by setting “needs_sphinx” in the
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarGuido Trotter <>
parent 41806ef4
......@@ -373,6 +373,18 @@ if test -z "$SPHINX"
AC_MSG_WARN(m4_normalize([sphinx-build not found, documentation rebuild will
not be possible]))
# Sphinx exits with code 1 when it prints its usage
sphinxver=`{ $SPHINX --version 2>&1 || :; } | head -n 3`
if ! echo "$sphinxver" | grep -q -w -e '^Sphinx' -e '^Usage:'; then
AC_MSG_ERROR([Unable to determine Sphinx version])
# Note: Character classes ([...]) need to be double quoted due to autoconf
# using m4
elif ! echo "$sphinxver" | grep -q -E '^Sphinx[[[:space:]]]+v[[1-9]]\>'; then
AC_MSG_ERROR([Sphinx 1.0 or higher is required])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment