summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-06 11:17:38 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-06 11:17:38 +0000
commit4f966c0a680becf29d2174c2e9d53c16a18bf936 (patch)
tree9831891b2e607572a7798ba1ca99ca47b5d351ca /configure.ac
parentf52a49130fde7f0f884f0dafc10ff6c8d260473d (diff)
downloadruby-4f966c0a680becf29d2174c2e9d53c16a18bf936.tar.gz
configure.ac: 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) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 8ea969412f..e6cd95cc9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4523,8 +4523,18 @@ AC_ARG_WITH(mantype,
[AC_MSG_ERROR(invalid man type: $withval)])
])
AS_IF([test -z "$MANTYPE"], [
- AC_PATH_PROGS(NROFF, nroff awf, /bin/false, "/usr/bin:/usr/ucb")
- AS_IF([${NROFF} -mdoc ${srcdir}/man/ruby.1 >/dev/null 2>&1], [
+ dnl Looks for nroff with -mdoc support.
+ AC_CACHE_VAL([ac_cv_path_NROFF], [
+ AC_PATH_PROGS_FEATURE_CHECK([NROFF],
+ [nroff awf mandoc],
+ [$ac_path_NROFF -mdoc ${srcdir}/man/ruby.1 \
+ >/dev/null 2>&1 &&
+ ac_cv_path_NROFF=$ac_path_NROFF \
+ ac_path_NROFF_found=:],
+ [], ["/usr/bin:/usr/ucb"]
+ )
+ ])
+ AS_IF([test -n "$ac_cv_path_NROFF"], [
MANTYPE=doc
], [
MANTYPE=man