~drizzle-trunk/libdrizzle/jenkins-Libdrizzle-110

« back to all changes in this revision

Viewing changes to m4/ax_prog_sphinx_build.m4

  • Committer: Continuous Integration
  • Date: 2013-05-12 22:57:40 UTC
  • mfrom: (122.1.1 libdrizzle-5.1)
  • Revision ID: ci@drizzle.org-20130512225740-n9n9673m65kb4ogf
Merge lp:~brianaker/libdrizzle/ddm4-update-may Build: jenkins-Libdrizzle-107

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#
5
5
# SYNOPSIS
6
6
#
7
 
#   AX_PROG_SPHINX_BUILD()
 
7
#   AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND])
8
8
#
9
9
# DESCRIPTION
10
10
#
11
 
#   Look for sphinx-build
 
11
#   Look for sphinx-build and make sure it is a recent version of it.
12
12
#
13
13
# LICENSE
14
14
#
15
 
#   Copyright (c) 2012 Brian Aker <brian@tangent.org>
 
15
#   Copyright (c) 2012-2013 Brian Aker <brian@tangent.org>
16
16
#
17
17
#   Copying and distribution of this file, with or without modification, are
18
18
#   permitted in any medium without royalty provided the copyright notice
19
19
#   and this notice are preserved. This file is offered as-is, without any
20
20
#   warranty.
21
21
 
22
 
#serial 2
 
22
#serial 4
23
23
 
24
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
 
])
 
25
         [AX_WITH_PROG([SPHINXBUILD],[sphinx-build],[:])
 
26
         AS_IF([test x"SPHINXBUILD" = x":"],
 
27
               [SPHINXBUILD=],
 
28
               [AS_IF([test -x "$SPHINXBUILD"],
 
29
                      [AC_MSG_CHECKING([Checking to see if $SPHINXBUILD is recent])
 
30
                      junk=`$SPHINXBUILD --version &> version_file`
 
31
                      AS_IF([test $? -eq 0],
 
32
                            [ax_sphinx_build_version=`head -1 version_file`],
 
33
                            [junk=`$SPHINXBUILD &> version_file`
 
34
                            ax_sphinx_build_version=`head -1 version_file`
 
35
                            rm version_file
 
36
                            AC_MSG_RESULT([$SPHINXBUILD is version "$ax_sphinx_build_version"])
 
37
                            $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1
 
38
                            AS_IF([test $? -eq 0], ,[SPHINXBUILD=])
 
39
                            rm -rf conftest.d ])
 
40
                      ])
 
41
               ])
 
42
 
 
43
         AS_IF([test -n "${SPHINXBUILD}"],
 
44
               [AC_SUBST([SPHINXBUILD])
 
45
               ifelse([$1], , :, [$1])],
 
46
               [ifelse([$2], , :, [$2])])
 
47
         ])