File: acinclude.m4

package info (click to toggle)
libmodbus 3.1.4-2%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,040 kB
  • sloc: ansic: 5,061; makefile: 169; javascript: 122; sh: 24
file content (29 lines) | stat: -rw-r--r-- 1,489 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
dnl ##############################################################################
dnl # AC_LIBMODBUS_CHECK_BUILD_DOC                                               #
dnl # Check whether to build documentation and install man-pages                 #
dnl ##############################################################################
AC_DEFUN([AC_LIBMODBUS_CHECK_BUILD_DOC], [{
    # Allow user to disable doc build
    AC_ARG_WITH([documentation], [AS_HELP_STRING([--without-documentation],
        [disable documentation build even if asciidoc and xmlto are present [default=no]])])

    if test "x$with_documentation" = "xno"; then
        ac_libmodbus_build_doc="no"
    else
        # Determine whether or not documentation should be built and installed.
        ac_libmodbus_build_doc="yes"
        # Check for asciidoc and xmlto and don't build the docs if these are not installed.
        AC_CHECK_PROG(ac_libmodbus_have_asciidoc, asciidoc, yes, no)
        AC_CHECK_PROG(ac_libmodbus_have_xmlto, xmlto, yes, no)
        if test "x$ac_libmodbus_have_asciidoc" = "xno" -o "x$ac_libmodbus_have_xmlto" = "xno"; then
           ac_libmodbus_build_doc="no"
        fi
    fi

    AC_MSG_CHECKING([whether to build documentation])
    AC_MSG_RESULT([$ac_libmodbus_build_doc])
    if test "x$ac_libmodbus_build_doc" = "xno"; then
        AC_MSG_WARN([The tools to build the documentation aren't installed])
    fi
    AM_CONDITIONAL(BUILD_DOC, test "x$ac_libmodbus_build_doc" = "xyes")
}])