etc/services - sync with NetBSD-8
[minix.git] / crypto / external / bsd / heimdal / dist / cf / check-man.m4
blobc637c29121dffb0b298dff65a775bd1ee003f542
1 dnl Id
2 dnl check how to format manual pages
3 dnl
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
10 .Dd January 1, 1970
11 .Dt CONFTEST 1
12 .Sh NAME
13 .Nm conftest
14 .Nd foobar
15 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"
22                         break
23                 fi
24         done
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"
31                         break
32                 fi
33         done
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"
41         AC_SUBST(CATMAN)
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
47 else
48         ac_cv_sys_catman_ext=number
51 if test "$ac_cv_sys_catman_ext" = number; then
52         CATMANEXT='$$section'
53 else
54         CATMANEXT=0
56 AC_SUBST(CATMANEXT)