From 30a69e7bba0161eabb678b9902fbd04e7495d86e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 4 Jan 2011 08:16:27 +1100 Subject: - (djm) [configure.ac Makefile.in] Use mandoc as preferred manpage formatter if it is present, followed by nroff and groff respectively. Fixes distprep target on OpenBSD (which has bumped groff/nroff to ports in favour of mandoc). feedback and ok tim --- ChangeLog | 8 +++++++- Makefile.in | 5 +++-- configure.ac | 20 ++++++++++++++++++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ee52850b..135ad48fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -20110102 +20110104 + - (djm) [configure.ac Makefile.in] Use mandoc as preferred manpage + formatter if it is present, followed by nroff and groff respectively. + Fixes distprep target on OpenBSD (which has bumped groff/nroff to ports + in favour of mandoc). feedback and ok tim + +20110103 - (djm) [Makefile.in] revert local hack I didn't intend to commit 20110102 diff --git a/Makefile.in b/Makefile.in index b46a7b26f..be65be6b3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.313 2011/01/03 03:48:16 djm Exp $ +# $Id: Makefile.in,v 1.314 2011/01/03 21:16:29 djm Exp $ # uncomment if you run a non bourne compatable shell. Ie. csh #SHELL = @SH@ @@ -58,6 +58,7 @@ ENT=@ENT@ XAUTH_PATH=@XAUTH_PATH@ LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@ EXEEXT=@EXEEXT@ +MANFMT=@MANFMT@ INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ @@ -230,7 +231,7 @@ catman-do: @for f in $(MANPAGES_IN) ; do \ base=`echo $$f | sed 's/\..*$$//'` ; \ echo "$$f -> $$base.0" ; \ - nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \ + $(MANFMT) $$f | cat -v | sed -e 's/.\^H//g' \ >$$base.0 ; \ done diff --git a/configure.ac b/configure.ac index ec562b1c2..0eeb4df78 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.460 2011/01/02 10:53:09 djm Exp $ +# $Id: configure.ac,v 1.461 2011/01/03 21:16:29 djm Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) -AC_REVISION($Revision: 1.460 $) +AC_REVISION($Revision: 1.461 $) AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_HEADER(config.h) @@ -41,8 +41,24 @@ AC_PATH_PROG(TEST_MINUS_S_SH, bash) AC_PATH_PROG(TEST_MINUS_S_SH, ksh) AC_PATH_PROG(TEST_MINUS_S_SH, sh) AC_PATH_PROG(SH, sh) +AC_PATH_PROG(GROFF, groff) +AC_PATH_PROG(NROFF, nroff) +AC_PATH_PROG(MANDOC, mandoc) AC_SUBST(TEST_SHELL,sh) +dnl select manpage formatter +if test "x$MANDOC" != "x" ; then + MANFMT="$MANDOC" +elif test "x$NROFF" != "x" ; then + MANFMT="$NROFF -mandoc" +elif test "x$GROFF" != "x" ; then + MANFMT="$GROFF -mandoc -Tascii" +else + AC_MSG_WARN([no manpage formatted found]) + MANFMT="false" +fi +AC_SUBST(MANFMT) + dnl for buildpkg.sh AC_PATH_PROG(PATH_GROUPADD_PROG, groupadd, groupadd, [/usr/sbin${PATH_SEPARATOR}/etc]) -- cgit v1.2.3