Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2021-12-07 17:05:34 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2021-12-18 01:28:16 +0300
commitf4a26ececa180cec70c41b6dd2082ff730f92065 (patch)
tree65ae27ecbf2fa0c64637f01b345ee80fe23863a4 /winsup/configure.ac
parent80f4b7d5456ea17d64998805fb3d64db091201fc (diff)
Cygwin: Conditionally build documentation
Add a configure option '--disable-doc' to disable building of the documentation by the 'all' target. Check for the required tools at configure time, and require them if building documentation is enabled. Even if building the documentation was diabled with '--disable-doc', 'make -C doc' at the top-level can still make the documentation, if the documentation tools were found. If the tools were not found, 'missing' is used to issue a warning about that. Update instructions for building Cygwin appropriately. (Building documentation remains the default to increase the chances of noticing when building the documentation is broken.)
Diffstat (limited to 'winsup/configure.ac')
-rw-r--r--winsup/configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/winsup/configure.ac b/winsup/configure.ac
index cf1128b37..4ae20509a 100644
--- a/winsup/configure.ac
+++ b/winsup/configure.ac
@@ -88,7 +88,30 @@ AC_SUBST(TLSOFFSETS_H)
AM_CONDITIONAL(TARGET_X86_64, [test $target_cpu = "x86_64"])
-AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi], [true])
+AC_ARG_ENABLE(doc,
+ [AS_HELP_STRING([--enable-doc], [Build documentation])],,
+ enable_doc=yes)
+AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"])
+
+AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi])
+if test -z "$DOCBOOK2XTEXI" ; then
+ if test "x$enable_doc" != "xno"; then
+ AC_MSG_ERROR([docbook2texi is required to build documentation])
+ else
+ unset DOCBOOK2XTEXI
+ AM_MISSING_PROG([DOCBOOK2XTEXI], [docbook2texi])
+ fi
+fi
+
+AC_CHECK_PROGS([XMLTO], [xmlto])
+if test -z "$XMLTO"; then
+ if test "x$enable_doc" != "xno"; then
+ AC_MSG_ERROR([xmlto is required to build documentation])
+ else
+ unset XMLTO
+ AM_MISSING_PROG([XMLTO], [xmlto])
+ fi
+fi
if test "x$with_cross_bootstrap" != "xyes"; then
AC_CHECK_PROGS(MINGW_CXX, ${target_cpu}-w64-mingw32-g++)