summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTakenobu Tani <takenobu.hs@gmail.com>2019-10-26 15:18:25 +0900
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-06 08:06:37 -0500
commit97f9674b59e65932737b978a201aaf24a0894ad3 (patch)
tree478c324fa60fb320ea89a23afaebbf92ba66771d /configure.ac
parentce9e2a1a9307bf43ead278dd1fc8db4325d82340 (diff)
downloadhaskell-97f9674b59e65932737b978a201aaf24a0894ad3.tar.gz
configure: Add checking python3-sphinx
This checks the configuration about python3-sphinx. We need python3-sphinx instead of python2-sphinx to build documentation. The approach is as follows: * Check python3 version with custom `conf.py` invoked from sphinx-build` executable * Place custom `conf.py` into new `utils/check-sphinx` directory If sphinx is for python2 not python3, it's treated as config ERROR instead of WARN. See also #17346 and #17356.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 68e44661ef..2711840ddb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -840,6 +840,11 @@ changequote([, ])dnl
])
FP_COMPARE_VERSIONS([$fp_cv_sphinx_version],-lt,1.0.0,
[AC_MSG_WARN([Sphinx version 1.0.0 or later is required to build documentation]); SPHINXBUILD=;])
+if test -n "$SPHINXBUILD"; then
+ if "$SPHINXBUILD" -b text utils/check-sphinx utils/check-sphinx/dist > /dev/null 2>&1; then true; else
+ AC_MSG_ERROR([Sphinx for python3 is required to build documentation.])
+ fi
+fi
dnl ** check for xelatex
AC_PATH_PROG(XELATEX,xelatex)