mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Rework the man page configury
Default to generate man pages if the required tools and stylesheets are found. Error out if --enable-man is given but tools or stylesheets are missing.
This commit is contained in:
parent
e2470ec6db
commit
9f9ab64030
51
configure.ac
51
configure.ac
@ -2590,26 +2590,51 @@ GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
|
||||
|
||||
AC_ARG_ENABLE(man,
|
||||
[AC_HELP_STRING([--enable-man],
|
||||
[regenerate man pages from Docbook [default=no]])],enable_man=yes,
|
||||
enable_man=no)
|
||||
[generate man pages [default=auto]])],,
|
||||
enable_man=maybe)
|
||||
|
||||
AS_IF([test "${enable_man}" != no], [
|
||||
dnl
|
||||
dnl Check for xsltproc
|
||||
dnl
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||
if test "$enable_man" != no; then
|
||||
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
||||
if test -z "$XSLTPROC"; then
|
||||
if test "$enable_man" = yes ; then
|
||||
AC_MSG_ERROR([xsltproc is required for --enable-man])
|
||||
fi
|
||||
enable_man=no
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl check for DocBook DTD and stylesheets in the local catalog.
|
||||
if test "$enable_man" != no; then
|
||||
dnl check for DocBook DTD in the local catalog
|
||||
JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
|
||||
[DocBook XML DTD V4.1.2],,enable_man=no)
|
||||
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
|
||||
[DocBook XSL Stylesheets],,enable_man=no)
|
||||
])
|
||||
[DocBook XML DTD V4.1.2], [have_docbook_dtd=yes], [have_docbook_dtd=no])
|
||||
if test "$have_docbook_dtd" != yes; then
|
||||
if test "$enable_man" = yes ; then
|
||||
AC_MSG_ERROR([DocBook DTD is required for --enable-man])
|
||||
fi
|
||||
enable_man=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
|
||||
if test "$enable_man" != no; then
|
||||
dnl check for DocBook XSL stylesheets in the local catalog
|
||||
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
|
||||
[DocBook XSL Stylesheets], [have_docbook_style=yes],[have_docbook_style=no])
|
||||
if test "$have_docbook_dtd" != yes; then
|
||||
if test "$enable_man" = yes ; then
|
||||
AC_MSG_ERROR([DocBook XSL Stylesheets are required for --enable-man])
|
||||
fi
|
||||
enable_man=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
|
||||
|
||||
AC_MSG_CHECKING([whether to generate man pages])
|
||||
if test "$enable_man" != no; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Tracing
|
||||
|
Loading…
Reference in New Issue
Block a user