make/autoconf/jdk-options.m4
changeset 51215 936823fcf202
parent 50590 5fa19bad622d
child 51586 eaa569eeb856
child 56844 16c07e1567e7
--- a/make/autoconf/jdk-options.m4	Fri Jul 20 09:46:57 2018 +0200
+++ b/make/autoconf/jdk-options.m4	Fri Jul 20 09:07:37 2018 -0700
@@ -604,3 +604,29 @@
 
   AC_SUBST(EXCLUDE_TRANSLATIONS)
 ])
+
+################################################################################
+#
+# Optionally disable man pages
+#
+AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
+[
+  AC_ARG_ENABLE([manpages], [AS_HELP_STRING([--disable-manpages],
+      [Set to disable building of man pages @<:@enabled@:>@])])
+
+  BUILD_MANPAGES="true"
+  AC_MSG_CHECKING([if man pages should be built])
+  if test "x$enable_manpages" = "x"; then
+    AC_MSG_RESULT([yes])
+  elif test "x$enable_manpages" = "xyes"; then
+    AC_MSG_RESULT([yes, forced])
+  elif test "x$enable_manpages" = "xno"; then
+    AC_MSG_RESULT([no, forced])
+    BUILD_MANPAGES="false"
+  else
+    AC_MSG_RESULT([no])
+    AC_MSG_ERROR([--enable-manpages can only yes/no or empty])
+  fi
+
+  AC_SUBST(BUILD_MANPAGES)
+])