1 # ===========================================================================
2 # https://github.com/BrianAker/ddm4
3 # ===========================================================================
7 # AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
11 # Look for sphinx-build and make sure it is a recent version of it.
15 # Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
17 # Copying and distribution of this file, with or without modification, are
18 # permitted in any medium without royalty provided the copyright notice
19 # and this notice are preserved. This file is offered as-is, without any
24 AC_DEFUN([AX_PROG_SPHINX_BUILD],
26 AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
27 AS_IF([test "x${SPHINXBUILD}" != "x:"],[
28 AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
30 ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
31 AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
32 [ac_cv_recent_sphinx=no])
37 AM_CONDITIONAL([HAVE_SPHINX],[test "x${SPHINXBUILD}" != "x:"])
38 AM_CONDITIONAL([HAVE_RECENT_SPHINX],[test "x${ac_cv_recent_sphinx}" = "xyes"])
40 AS_IF([test "x${ac_cv_recent_sphinx}" = "xyes"],
41 [ifelse([$2], , :, [$2])],
42 [ifelse([$3], , :, [$3])])