1 dnl $Heimdal: check-man.m4 13338 2004-02-12 14:21:14Z lha $
3 dnl check how to format manual pages
6 AC_DEFUN([rk_CHECK_MAN],
7 [AC_PATH_PROG(NROFF, nroff)
8 AC_PATH_PROG(GROFF, groff)
9 AC_CACHE_CHECK(how to format man pages,ac_cv_sys_man_format,
10 [cat > conftest.1 << END
19 if test "$NROFF" ; then
20 for i in "-mdoc" "-mandoc"; do
21 if "$NROFF" $i conftest.1 2> /dev/null | \
22 grep Jan > /dev/null 2>&1 ; then
23 ac_cv_sys_man_format="$NROFF $i"
28 if test "$ac_cv_sys_man_format" = "" -a "$GROFF" ; then
29 for i in "-mdoc" "-mandoc"; do
30 if "$GROFF" -Tascii $i conftest.1 2> /dev/null | \
31 grep Jan > /dev/null 2>&1 ; then
32 ac_cv_sys_man_format="$GROFF -Tascii $i"
37 if test "$ac_cv_sys_man_format"; then
38 ac_cv_sys_man_format="$ac_cv_sys_man_format \[$]< > \[$]@"
41 if test "$ac_cv_sys_man_format"; then
42 CATMAN="$ac_cv_sys_man_format"
45 AM_CONDITIONAL(CATMAN, test "$CATMAN")
46 AC_CACHE_CHECK(extension of pre-formatted manual pages,ac_cv_sys_catman_ext,
47 [if grep _suffix /etc/man.conf > /dev/null 2>&1; then
48 ac_cv_sys_catman_ext=0
50 ac_cv_sys_catman_ext=number
53 if test "$ac_cv_sys_catman_ext" = number; then