diff options
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | src/external/docbook.m4 | 13 | ||||
-rw-r--r-- | src/man/Makefile.am | 9 |
3 files changed, 30 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 69feac68..baea45ca 100644 --- a/configure.ac +++ b/configure.ac @@ -157,11 +157,27 @@ fi if test x$HAVE_MANPAGES != x; then CHECK_XML_TOOLS + + DOCBOOK_XSLT=http://docbook.sourceforge.net/release/xsl/current/manpages/profile-docbook.xsl CHECK_STYLESHEET([$SGML_CATALOG_FILES], - [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], - [Docbook XSL templates]) + [$DOCBOOK_XSLT], + [Docbook XSL profiling templates], + [HAVE_PROFILE_CATALOGS=1], + [AC_MSG_WARN([Man pages might contain documentation for experimental features])]) + + if test x$HAVE_PROFILE_CATALOGS == x; then + DOCBOOK_XSLT=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl + CHECK_STYLESHEET([$SGML_CATALOG_FILES], + [$DOCBOOK_XSLT], + [Docbook XSL templates], + [], + [AC_MSG_ERROR([could not find the docbook xsl catalog])]) + fi + AC_CHECK_PROG([PO4A],[po4a],[po4a],[no]) + AC_SUBST(DOCBOOK_XSLT) fi +AM_CONDITIONAL([HAVE_PROFILE_CATALOGS], [test "x$HAVE_PROFILE_CATALOGS" != "x"]) AM_CONDITIONAL([HAVE_MANPAGES], [test "x$HAVE_MANPAGES" != "x"]) AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"]) diff --git a/src/external/docbook.m4 b/src/external/docbook.m4 index cae89feb..deb8632f 100644 --- a/src/external/docbook.m4 +++ b/src/external/docbook.m4 @@ -10,15 +10,10 @@ AC_DEFUN([CHECK_XML_TOOLS], if test ! -x "$XMLLINT"; then AC_MSG_ERROR([Could not find xmllint]) fi - - AC_PATH_PROG([XMLCATALOG], [xmlcatalog]) - if test ! -x "$XMLCATALOG"; then - AC_MSG_ERROR([Could not find xmlcatalog]) - fi ]) dnl Usage: -dnl CHECK_STYLESHEET_URI(FILE, URI, [FRIENDLY-NAME]) +dnl CHECK_STYLESHEET_URI(FILE, URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl Checks if the XML catalog given by FILE exists and dnl if a particular URI appears in the XML catalog AC_DEFUN([CHECK_STYLESHEET], @@ -26,10 +21,12 @@ AC_DEFUN([CHECK_STYLESHEET], AC_CHECK_FILE($1, [], [AC_MSG_ERROR([could not find XML catalog])]) AC_MSG_CHECKING([for ifelse([$3],,[$2],[$3]) in XML catalog]) - if AC_RUN_LOG([$XMLCATALOG --noout "$1" "$2" >&2]); then + if AC_RUN_LOG([$XSLTPROC --catalogs --nonet --noout "$2" >&2]); then AC_MSG_RESULT([yes]) + m4_ifval([$4], [$4], [:]) else - AC_MSG_ERROR([could not find ifelse([$3],,[$2],[$3]) in XML catalog]) + AC_MSG_RESULT([no]) + m4_ifval([$5], [$5], [:]) fi ]) diff --git a/src/man/Makefile.am b/src/man/Makefile.am index 36c3921d..6e23830a 100644 --- a/src/man/Makefile.am +++ b/src/man/Makefile.am @@ -16,9 +16,14 @@ endif #Special Rules: export SGML_CATALOG_FILES -DOCBOOK_XSLT = http://docbook.sourceforge.net/release/xsl/current/manpages/profile-docbook.xsl +DOCBOOK_XSLT = @DOCBOOK_XSLT@ +DOCBOOK_XSLT ?= http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl XMLLINT_FLAGS = --catalogs --postvalid --nonet --xinclude --noout -XSLTPROC_FLAGS = --stringparam profile.condition "$(CONDS)" --catalogs --xinclude --nonet +XSLTPROC_FLAGS = --catalogs --xinclude --nonet + +if HAVE_PROFILE_CATALOGS +XSLTPROC_FLAGS += --stringparam profile.condition "$(CONDS)" +endif man_MANS = \ sss_useradd.8 sss_userdel.8 sss_usermod.8 \ |