diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-02-14 18:18:41 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-02-15 11:41:37 +0100 |
commit | 903458c8abdb5f6b2393a167a077899ab3e1a36c (patch) | |
tree | be335a7e55e1bceb2d3c16cd75403a614f112e4e | |
parent | 2eb054c237d0b5427f62499f3c31e90cf87821d7 (diff) |
configure: Pick sphinx-build-3 when available
The next commit will require a sphinx-build that uses Python 3. On
some systems, sphinx-build is fine, on others you need to use
sphinx-build-3. To keep things working out of the box on both kinds
of systems, try sphinx-build-3, then sphinx-build.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <87a75lqe8e.fsf@dusky.pond.sub.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | configure | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -584,7 +584,6 @@ query_pkg_config() { } pkg_config=query_pkg_config sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}" -sphinx_build=sphinx-build # If the user hasn't specified ARFLAGS, default to 'rv', just as make does. ARFLAGS="${ARFLAGS-rv}" @@ -915,6 +914,17 @@ do break fi done + +sphinx_build= +for binary in sphinx-build-3 sphinx-build +do + if has "$binary" + then + sphinx_build=$(command -v "$binary") + break + fi +done + : ${smbd=${SMBD-/usr/sbin/smbd}} # Default objcc to clang if available, otherwise use CC @@ -4803,7 +4813,7 @@ has_sphinx_build() { # sphinx-build doesn't exist at all or if it is too old. mkdir -p "$TMPDIR1/sphinx" touch "$TMPDIR1/sphinx/index.rst" - $sphinx_build -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1 + "$sphinx_build" -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1 } # Check if tools are available to build documentation. |