Commit b77cf862 authored by Harish Krupo's avatar Harish Krupo

docs: Abort configure if docbook-xsl package is missing

The docbook-xsl package includes all the stylesheets required to build
the docs without internet access.

Test:
One way to emulate missing style sheets is to move /etc/xml/catalog file
to a different location. Doing so should cause configure to fail with
"checking for docbook stylesheets... no"

v2: add AC_MSG_RESULT (Pekka)
Signed-off-by: Harish Krupo's avatarHarish Krupo <harishkrupo@gmail.com>
parent de64489b
Pipeline #31995 passed with stage
in 1 minute and 49 seconds
......@@ -129,19 +129,6 @@ fi
AC_PATH_PROG(XSLTPROC, xsltproc)
AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
AC_MSG_CHECKING([for docbook manpages stylesheet])
MANPAGES_STYLESHEET=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$MANPAGES_STYLESHEET" > /dev/null 2>&1`],
[HAVE_MANPAGES_STYLESHEET=yes]))
if test "x$HAVE_MANPAGES_STYLESHEET" = "xyes"; then
AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], true)
AC_SUBST(MANPAGES_STYLESHEET)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL([HAVE_MANPAGES_STYLESHEET], false)
AC_MSG_RESULT([no])
fi
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_documentation = xyes])
if test "x$enable_documentation" = "xyes"; then
......@@ -177,6 +164,19 @@ if test "x$enable_documentation" = "xyes"; then
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([yes])])
AC_MSG_CHECKING([for docbook stylesheets])
DOCS_STYLESHEET=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$DOCS_STYLESHEET" > /dev/null 2>&1`],
[HAVE_DOCS_STYLESHEET=yes]))
if test "x$HAVE_DOCS_STYLESHEET" != "xyes"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Documentation build requested but docbook-xsl stylesheets are not found. Install the docbook-xsl package or disable the documentation using --disable-documentation])
fi
AC_MSG_RESULT([yes])
AC_SUBST(DOCS_STYLESHEET)
AC_CONFIG_FILES([
doc/doxygen/wayland.doxygen
])
......
......@@ -15,7 +15,6 @@ CLEANFILES =
EXTRA_DIST = $(XML_FILES)
if HAVE_XSLTPROC
if HAVE_MANPAGES_STYLESHEET
CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES)
EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES)
......@@ -30,7 +29,7 @@ XSLTPROC_FLAGS = \
XSLTPROC_PROCESS_MAN = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(MANPAGES_STYLESHEET) $< && \
$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCS_STYLESHEET) $< && \
$(SED) -i -e 's/^\.so \(.*\)\.\(.\)$$/\.so man\2\/\1\.\2/' $(MANPAGES_ALIASES)
%.1: %.xml
......@@ -47,5 +46,4 @@ XSLTPROC_PROCESS_MAN = \
wl_display_connect_to_fd.3: wl_display_connect.3
endif # HAVE_MANPAGES_STYLESHEET
endif # HAVE_XSLTPROC
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment