X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fax_prog_sphinx_build.m4;h=ff64650b93014c25effed02aaf56eb7ddf3f32be;hb=8c44ea2a34b6cedf545fd07a568bddad74e9b69e;hp=270067aa33b568544c567b3c2baf4a6b1b50ab44;hpb=a909573e5e57f8a6ee92cf4ffb031b9762642d1b;p=m6w6%2Flibmemcached diff --git a/m4/ax_prog_sphinx_build.m4 b/m4/ax_prog_sphinx_build.m4 index 270067aa..ff64650b 100644 --- a/m4/ax_prog_sphinx_build.m4 +++ b/m4/ax_prog_sphinx_build.m4 @@ -19,25 +19,30 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 3 +#serial 6 AC_DEFUN([AX_PROG_SPHINX_BUILD], - [AC_PREREQ([2.63])dnl - AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:]) - AS_IF([test "x${SPHINXBUILD}" != "x:"],[ - AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[ + [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"]) + ]) - ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1 - AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes], - [ac_cv_recent_sphinx=no]) - rm -rf conftest.d - ]) - ]) - - AM_CONDITIONAL([HAVE_SPHINX],[test "x${SPHINXBUILD}" != "x:"]) - AM_CONDITIONAL([HAVE_RECENT_SPHINX],[test "x${ac_cv_recent_sphinx}" = "xyes"]) - - AS_IF([test "x${ac_cv_recent_sphinx}" = "xyes"], - [ifelse([$2], , :, [$2])], - [ifelse([$3], , :, [$3])]) -]) + AS_IF([test -n "${SPHINXBUILD}"], + [AC_SUBST([SPHINXBUILD]) + ifelse([$1], , :, [$1])], + [ifelse([$2], , :, [$2])]) + ])