2 dnl check how to format manual pages
5 AC_DEFUN([rk_CHECK_MAN],
6 [AC_PATH_PROG(NROFF, nroff)
7 AC_PATH_PROG(GROFF, groff)
8 AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
9 [cat > conftest.1 << END
17 if test "$NROFF" ; then
18 for i in "-mdoc" "-mandoc"; do
19 if "$NROFF" $i conftest.1 2> /dev/null | \
20 grep Jan > /dev/null 2>&1 ; then
21 ac_cv_sys_man_format="$NROFF $i"
26 if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
27 for i in "-mdoc" "-mandoc"; do
28 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
29 grep Jan > /dev/null 2>&1 ; then
30 ac_cv_sys_man_format="$GROFF -Tascii $i"
35 if test "$ac_cv_sys_man_format"; then
36 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
39 if test "$ac_cv_sys_man_format"; then
40 CATMAN="$ac_cv_sys_man_format"
43 AM_CONDITIONAL(CATMAN, test "$CATMAN")
44 AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
45 [if grep _suffix /etc/man.conf > /dev/null 2>&1; then
46 ac_cv_sys_catman_ext=0
48 ac_cv_sys_catman_ext=number
51 if test "$ac_cv_sys_catman_ext" = number; then