summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-08-10 16:18:30 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-08-10 12:43:42 -0400
commit7d8ef8effd511d4e0b66d735eb0ae68a80ef633a (patch)
tree67fc1294f21725630b1107b5c5849b851c135d2f /server
parent00aa07816bfd4305ac94780a8c2b9e6609be39ea (diff)
downloadsssd-7d8ef8effd511d4e0b66d735eb0ae68a80ef633a.tar.gz
sssd-7d8ef8effd511d4e0b66d735eb0ae68a80ef633a.tar.xz
sssd-7d8ef8effd511d4e0b66d735eb0ae68a80ef633a.zip
Add configure checks for docbook XSL templates and XML tools
Changes the configure process so that configure errors out if lacks the tools necessary to build manual pages (like xsltproc). Also adds a check for required URI of the docbook XSL templates using the xmlcatalog tool.
Diffstat (limited to 'server')
-rw-r--r--server/configure.ac8
-rw-r--r--server/external/docbook.m435
2 files changed, 40 insertions, 3 deletions
diff --git a/server/configure.ac b/server/configure.ac
index 1abaa15c3..9cd30e20b 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -57,6 +57,7 @@ m4_include([external/ldap.m4])
m4_include([external/libpcre.m4])
m4_include([external/krb5.m4])
m4_include([external/libcares.m4])
+m4_include([external/docbook.m4])
m4_include([util/signal.m4])
PKG_CHECK_MODULES([DBUS],[dbus-1])
@@ -72,9 +73,10 @@ fi
PKG_CHECK_MODULES([NSS],[nss])
if test x$HAVE_MANPAGES != x; then
- AC_CHECK_FILE($SGML_CATALOG_FILES, [], [AC_MSG_ERROR([could not find XML catalog])])
- AC_PATH_PROG([XSLTPROC], [xsltproc])
- AC_PATH_PROG([XMLLINT], [xmllint])
+ CHECK_XML_TOOLS
+ CHECK_STYLESHEET([$SGML_CATALOG_FILES],
+ [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
+ [Docbook XSL templates])
fi
AC_CHECK_HEADERS([sys/inotify.h])
diff --git a/server/external/docbook.m4 b/server/external/docbook.m4
new file mode 100644
index 000000000..cae89feb1
--- /dev/null
+++ b/server/external/docbook.m4
@@ -0,0 +1,35 @@
+dnl Checks for tools needed to generate manual pages
+AC_DEFUN([CHECK_XML_TOOLS],
+[
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test ! -x "$XSLTPROC"; then
+ AC_MSG_ERROR([Could not find xsltproc])
+ fi
+
+ AC_PATH_PROG([XMLLINT], [xmllint])
+ 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 Checks if the XML catalog given by FILE exists and
+dnl if a particular URI appears in the XML catalog
+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
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([could not find ifelse([$3],,[$2],[$3]) in XML catalog])
+ fi
+])
+