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])
10 AC_CACHE_VAL([man_cv_prog_heirloom_nroff],
11 [man_heirloom_ext_plain=`$1 2>/dev/null <<EOF | tr -d '\n'
15 man_heirloom_ext_mg=`$1 -mg 2>/dev/null <<EOF | tr -d '\n'
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"
23 man_cv_prog_heirloom_nroff=yes
25 man_cv_prog_heirloom_nroff=no
28 if test "$man_cv_prog_heirloom_nroff" = "yes"
30 AC_DEFINE([HEIRLOOM_NROFF], [1], [Define if nroff is Heirloom nroff.])
32 AC_MSG_RESULT([$man_cv_prog_heirloom_nroff])