Updates from ddm4
[awesomized/libmemcached] / m4 / ax_prog_sphinx_build.m4
1 # ===========================================================================
2 # https://github.com/BrianAker/ddm4
3 # ===========================================================================
4 #
5 # SYNOPSIS
6 #
7 # AX_PROG_SPHINX_BUILD
8 #
9 # DESCRIPTION
10 #
11 # Look for sphinx-build
12 #
13 # LICENSE
14 #
15 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
16 #
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
20 # warranty.
21
22 #serial 1
23
24 AC_DEFUN([AX_PROG_SPHINX_BUILD], [
25 AC_CHECK_PROGS([PERL], [perl])
26 AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
27 AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
28 AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
29
30 AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
31 AS_IF([test "x${SPHINXBUILD}" != "x:"],[
32 AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
33
34 ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
35 AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
36 [ac_cv_recent_sphinx=no])
37 rm -rf conftest.d
38 ])
39 ])
40
41 AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
42 AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
43 AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
44 ])