AC_MSG_ERROR([sphinx-build not found; it is required for --enable-generate-docs, please see http://www.sphinx-doc.org/en/master/usage/installation.html for details])
else
AC_MSG_CHECKING([whether $SPHINX works])
AC_MSG_CHECKING([whether $SPHINXBUILD works])
# run sphinx to see if it works
# We should probably do a more thorough checks
$SPHINX --version
$SPHINXBUILD --version
if test $? -ne 0 ; then
AC_MSG_ERROR("Error with $SPHINX --version")
AC_MSG_ERROR("Error with $SPHINXBUILD --version")
fi
AC_MSG_RESULT(yes (found in $SPHINX))
AC_MSG_RESULT(yes (found in $SPHINXBUILD))
fi
# xsltproc --nonet parameter
NONET="--nonet"
AC_ARG_VAR(XSLTPROC_NET, [xsltproc uses the Internet to fetch DTDs, entities or documents.])
if test "x$XSLTPROC_NET" != x ; then
NONET=
fi
AC_SUBST(NONET)
# Check for xsltproc
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
AC_MSG_ERROR("xsltproc not found; it is required for --enable-generate-docs")