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
18 if test "$NROFF" ; then
19 for i in "-mdoc" "-mandoc"; do
20 if "$NROFF" $i conftest.1 2> /dev/null | \
21 grep Jan > /dev/null 2>&1 ; then
22 ac_cv_sys_man_format="$NROFF $i"
27 if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
28 for i in "-mdoc" "-mandoc"; do
29 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
30 grep Jan > /dev/null 2>&1 ; then
31 ac_cv_sys_man_format="$GROFF -Tascii $i"
36 if test "$ac_cv_sys_man_format"; then
37 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
40 if test "$ac_cv_sys_man_format"; then
41 CATMAN="$ac_cv_sys_man_format"
44 AM_CONDITIONAL(CATMAN, test "$CATMAN")
45 AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
46 [if grep _suffix /etc/man.conf > /dev/null 2>&1; then
47 ac_cv_sys_catman_ext=0
49 ac_cv_sys_catman_ext=number
52 if test "$ac_cv_sys_catman_ext" = number; then