Fix check for sphinx-build from python2-sphinx
authorNeal Oakey <neal.oakey@googlemail.com>
Tue, 21 Oct 2014 11:36:56 +0000 (13:36 +0200)
committerHelga Velroyen <helgav@google.com>
Tue, 21 Oct 2014 12:45:25 +0000 (14:45 +0200)
if using python2-sphinx '/usr/bin/sphinx-build2 --version' prints
"Sphinx (sphinx-build2) 1.2.3" which didn't match the regex

Signed-off-by: Neal Oakey <neal.oakey@googlemail.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

configure.ac

index 0baac2e..c882f54 100644 (file)
@@ -426,7 +426,7 @@ else
   # Note: Character classes ([...]) need to be double quoted due to autoconf
   # using m4
   elif ! echo "$sphinxver" | grep -q -E \
-       '^Sphinx[[[:space:]]]+(\(sphinx-build\)[[[:space:]]]+|v)[[1-9]]\>'; then
+       '^Sphinx([[[:space:]]]+|\(sphinx-build[[1-9]]?\)|v)*[[1-9]]\>'; then
     AC_MSG_ERROR([Sphinx 1.0 or higher is required])
   fi
 fi