configure: allow detection of Sphinx 1.2+
authorApollon Oikonomopoulos <apoikos@gmail.com>
Mon, 13 Jan 2014 12:12:14 +0000 (14:12 +0200)
committerKlaus Aehlig <aehlig@google.com>
Mon, 13 Jan 2014 12:16:27 +0000 (13:16 +0100)
The regular expression used for parsing the Sphinx version does not work
with Sphinx versions after 1.1, as reported in issue #502. The reason
for this is that upstream commit 8f28af8e2ed8[1] introduced proper
support for --version, which ganeti was already using but sphinx-build
was lacking (outputting generic usage information instead).

Since it seems that upstream has no reason to change the output format
again, we support the new versioning scheme with a strict-as-possible
match.

This fixes issue 502.

[1] https://bitbucket.org/birkenfeld/sphinx/commits/8f28af8e2ed8619087738d83b4f55e3db938a104

Signed-off-by: Apollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

configure.ac

index 266927f..fce60b1 100644 (file)
@@ -355,7 +355,7 @@ else
 
   # 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
+  elif ! echo "$sphinxver" | grep -q -E '^Sphinx[[[:space:]]]+(\(sphinx-build\)[[[:space:]]]+|v)[[1-9]]\>'; then
     AC_MSG_ERROR([Sphinx 1.0 or higher is required])
   fi
 fi