Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-187
[m6w6/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 2
23
24 AC_DEFUN([AX_PROG_SPHINX_BUILD],
25 [AC_PREREQ([2.63])dnl
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])
30
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],[
34
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])
38 rm -rf conftest.d
39 ])
40 ])
41
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"])
45 ])