19
19
# and this notice are preserved. This file is offered as-is, without any
24
24
AC_DEFUN([AX_PROG_SPHINX_BUILD],
25
[AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:])
26
AS_IF([test x"SPHINXBUILD" = x":"],
28
[AS_IF([test -x "$SPHINXBUILD"],
29
[AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent])
30
junk=`$SPHINXBUILD &> version_file`
31
ax_sphinx_build_version=`head -1 version_file`
33
AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"])
34
$SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
35
AS_IF([test $? -eq 0], ,[SPHINXBUILD=])
25
[AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:])
26
AS_IF([test x"SPHINXBUILD" = x":"],
28
[AS_IF([test -x "$SPHINXBUILD"],
29
[AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent])
30
junk=`$SPHINXBUILD --version &> version_file`
31
AS_IF([test $? -eq 0],
32
[ax_sphinx_build_version=`head -1 version_file`],
33
[junk=`$SPHINXBUILD &> version_file`
34
ax_sphinx_build_version=`head -1 version_file`
36
AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"])
37
$SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
38
AS_IF([test $? -eq 0], ,[SPHINXBUILD=])
40
AS_IF([test -n "${SPHINXBUILD}"],
41
[AC_SUBST([SPHINXBUILD])
42
ifelse([$1], , :, [$1])],
43
[ifelse([$2], , :, [$2])])
44
AS_IF([test -n "${SPHINXBUILD}"],
45
[AC_SUBST([SPHINXBUILD])
46
ifelse([$1], , :, [$1])],
47
[ifelse([$2], , :, [$2])])