Feature #13981

in configure, detect mandoc and set MANTYPE=doc

Added by kernigh (George Koehler) almost 3 years ago. Updated almost 3 years ago.

Target version:


My OpenBSD machine uses mandoc to format manuals. Ruby's configure guesses MANTYPE=doc or MANTYPE=man after looking for nroff or awf, but doesn't know mandoc. I attach a patch to teach about mandoc. This patch changes the guess for my machine from MANTYPE=man to MANTYPE=doc; manuals like ri(1) look better when MANTYPE=doc.

I change the code to use AC_PATH_PROGS_FEATURE_CHECK. My intent is that if we find one of [nroff awf mandoc], but it can't do -mdoc, then we check the other commands for -mdoc. The old code would only check the first found command for -mdoc.

Because I no longer use AC_PATH_PROGS, the configure script no longer sets NROFF=$ac_path_NROFF and no longer does AC_SUBST(NROFF). Therefore, we can't use @NROFF@ in or RbConfig.expand('$(NROFF)') in Ruby scripts. I believe that Ruby doesn't use NROFF in that way, so I don't need to set NROFF in configure.


ruby-mandoc.diff (778 Bytes) ruby-mandoc.diff detect mandoc in kernigh (George Koehler), 10/06/2017 03:43 AM

Updated by naruse (Yui NARUSE) almost 3 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r60129. detect mandoc and set MANTYPE=doc

OpenBSD uses mandoc [Feature #13981] [ruby-core:83146]
Note: AC_PATH_PROGS_FEATURE_CHECK is autoconf 2.62 feature,
but current CRuby declares AC_PREREQ(2.67); it's safe to use.
Patched by kernigh (George Koehler)

Also available in: Atom PDF