resetting manifest requested domain to floor
[platform/upstream/man-db.git] / m4 / man-heirloom-nroff.m4
1 # man-heirloom-nroff.m4 serial 1
2 dnl MAN_PROG_HEIRLOOM_NROFF(PROGRAM-NAME)
3 dnl Check whether the given nroff program is from the Heirloom Documentation
4 dnl Tools.  We do this by testing the .X number register; it should be
5 dnl non-zero, and should change to a different value if the -mg option is
6 dnl used to enable groff compatibility.
7 AC_DEFUN([MAN_PROG_HEIRLOOM_NROFF],
8 [AC_MSG_CHECKING([whether nroff is Heirloom nroff])
9
10 AC_CACHE_VAL([man_cv_prog_heirloom_nroff],
11   [man_heirloom_ext_plain=`$1 2>/dev/null <<EOF | tr -d '\n'
12 \\n(.X
13 EOF
14 `
15    man_heirloom_ext_mg=`$1 -mg 2>/dev/null <<EOF | tr -d '\n'
16 \\n(.X
17 EOF
18 `
19    if test "x$man_heirloom_ext_plain" != 0 && \
20       test "x$man_heirloom_ext_mg" != 0 && \
21       test "x$man_heirloom_ext_plain" != "x$man_heirloom_extflag_mg"
22    then
23      man_cv_prog_heirloom_nroff=yes
24    else
25      man_cv_prog_heirloom_nroff=no
26    fi])
27
28 if test "$man_cv_prog_heirloom_nroff" = "yes"
29 then
30   AC_DEFINE([HEIRLOOM_NROFF], [1], [Define if nroff is Heirloom nroff.])
31 fi
32 AC_MSG_RESULT([$man_cv_prog_heirloom_nroff])
33 ])