1 # ===========================================================================
2 # https://github.com/BrianAker/ddm4
3 # ===========================================================================
7 # AX_PROG_SPHINX_BUILD()
11 # Look for sphinx-build
15 # Copyright (c) 2012 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([PERL], [perl])
27 AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
28 AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
29 AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
31 AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
32 AS_IF([test "x${SPHINXBUILD}" != "x:"],[
33 AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
35 ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
36 AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
37 [ac_cv_recent_sphinx=no])
42 AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
43 AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
44 AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])