[前][次][番号順一覧][スレッド一覧]

ruby-changes:48015

From: naruse <ko1@a...>
Date: Fri, 6 Oct 2017 20:17:43 +0900 (JST)
Subject: [ruby-changes:48015] naruse:r60129 (trunk): configure.ac: detect mandoc and set MANTYPE=doc

naruse	2017-10-06 20:17:38 +0900 (Fri, 06 Oct 2017)

  New Revision: 60129

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60129

  Log:
    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)

  Modified files:
    trunk/configure.ac
Index: configure.ac
===================================================================
--- configure.ac	(revision 60128)
+++ configure.ac	(revision 60129)
@@ -4523,8 +4523,18 @@ AC_ARG_WITH(mantype, https://github.com/ruby/ruby/blob/trunk/configure.ac#L4523
 			[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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]