[commit: ghc] master: configure: Make sphinx-build version test work on recent versions (533d345)

git at git.haskell.org git at git.haskell.org
Thu May 31 02:06:17 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/533d34516c795388d70f34123f14de1845f8b81b/ghc

>---------------------------------------------------------------

commit 533d34516c795388d70f34123f14de1845f8b81b
Author: Jens Petersen <petersen at redhat.com>
Date:   Mon May 28 12:31:49 2018 +0900

    configure: Make sphinx-build version test work on recent versions
    
    On Fedora: `/usr/libexec/sphinx-build --version` outputs `sphinx-build
    1.7.2`.  In bindir we actually have sphinx-build-2 and sphinx-build-3
    (python2 and python3 versions), which output `sphinx-build-2 1.7.2` and
    `sphinx-build-3 1.7.2` respectively.  Dunno what version others are
    using but at least this change should works for most versions I suppose.


>---------------------------------------------------------------

533d34516c795388d70f34123f14de1845f8b81b
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 57d0943..21f9f16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -842,7 +842,7 @@ AC_PATH_PROG(SPHINXBUILD,sphinx-build)
 AC_CACHE_CHECK([for version of sphinx-build], fp_cv_sphinx_version,
 changequote(, )dnl
 [if test -n "$SPHINXBUILD"; then
-  fp_cv_sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/Sphinx\( (sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' | head -n1`;
+  fp_cv_sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/.* v\?\([0-9]\.[0-9]\.[0-9]\)/\1/' | head -n1`;
 fi;
 changequote([, ])dnl
 ])



More information about the ghc-commits mailing list