- [AC_PREREQ([2.63])dnl
- AC_CHECK_PROGS([PERL], [perl])
- AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
- AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
- AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
+ [AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:])
+ AS_IF([test x"SPHINXBUILD" = x":"],
+ [SPHINXBUILD=],
+ [AS_IF([test -x "$SPHINXBUILD"],
+ [AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent])
+ junk=`$SPHINXBUILD --version &> version_file`
+ AS_IF([test $? -eq 0],
+ [ax_sphinx_build_version=`head -1 version_file`],
+ [junk=`$SPHINXBUILD &> version_file`
+ ax_sphinx_build_version=`head -1 version_file`
+ rm version_file
+ $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
+ AS_IF([test $? -eq 0], ,[SPHINXBUILD=])
+ rm -rf conftest.d ])
+ ])
+ rm -f version_file
+ AC_MSG_RESULT(["$ax_sphinx_build_version"])
+ ])