Comments
Patch
2012-01-18 Benjamin Kosnik <bkoz@redhat.com>
* configure.ac: Move epub checks...
* acinclude (GLIBCXX_CONFIGURE_DOCBOOK): ...here, use
test -f instead of AC_CHECK_FILES.
@@ -631,7 +631,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [
dnl
-dnl Does any necessary configuration of the documentation directory.
+dnl Does any necessary configuration for docbook in the docs directory.
dnl
dnl XSLTPROC must be set before this
dnl
@@ -642,7 +642,7 @@ dnl XSL_STYLE_DIR
dnl
AC_DEFUN([GLIBCXX_CONFIGURE_DOCBOOK], [
-AC_MSG_CHECKING([for stylesheets used in generation of documentation])
+AC_MSG_CHECKING([for docbook stylesheets for documentation creation])
glibcxx_stylesheets=no
if test x${XSLTPROC} = xyes && echo '<title/>' | xsltproc --noout --nonet --xinclude http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl - 2>/dev/null; then
glibcxx_stylesheets=yes
@@ -669,6 +669,18 @@ if test x"$glibcxx_local_stylesheets" = x"yes"; then
else
glibcxx_stylesheets=no
fi
+
+# Check for epub3 dependencies.
+AC_MSG_CHECKING([for epub3 stylesheets for documentation creation])
+glibcxx_epub_stylesheets=no
+if test x"$glibcxx_local_stylesheets" = x"yes"; then
+ if test -f ${XSL_STYLE_DIR}/epub3/chunk.xsl; then
+ glibcxx_epub_stylesheets=yes
+ fi
+fi
+AC_MSG_RESULT($glibcxx_epub_stylesheets)
+AM_CONDITIONAL(BUILD_EPUB, test $glibcxx_epub_stylesheets= "yes")
+
])
@@ -380,15 +380,6 @@ AM_CONDITIONAL(BUILD_PDF,
test $ac_cv_prog_DBLATEX = "yes" &&
test $ac_cv_prog_PDFLATEX = "yes")
-# Check for epub dependencies.
-AC_CHECK_FILE(/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/epub3/chunk.xsl,
- ac_cv_file_epub3_a=yes, ac_cv_file_epub3_a=no)
-AC_CHECK_FILE(/usr/share/sgml/docbook/xsl-ns-stylesheets/epub3/chunk.xsl,
- ac_cv_file_epub3_b=yes, ac_cv_file_epub3_b=no)
-AM_CONDITIONAL(BUILD_EPUB,
- test $ac_cv_file_epub3_a = "yes" ||
- test $ac_cv_file_epub3_b = "yes")
-
# Propagate the target-specific source directories through the build chain.
ATOMICITY_SRCDIR=config/${atomicity_dir}