summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-09-30 19:07:26 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-09-30 19:07:26 -0400
commit468abaf4588392bcf7d7e243c707bb41bc17532c (patch)
treead08fb0183cc8f497c758d91c56b245a0e527ada
parent90b64e1e89a33317d6008e10fe2c106a0dc34c7a (diff)
downloadsystemtap-steved-468abaf4588392bcf7d7e243c707bb41bc17532c.tar.gz
systemtap-steved-468abaf4588392bcf7d7e243c707bb41bc17532c.tar.xz
systemtap-steved-468abaf4588392bcf7d7e243c707bb41bc17532c.zip
doc build: support older xmlto without --stringparm option
* configure.ac: Check for xmlto --stringparam support. * doc/Systemtap_Tapset_Reference/Makefile.am: Be sensitive to the result.
-rwxr-xr-xconfigure54
-rw-r--r--configure.ac33
-rw-r--r--doc/SystemTap_Tapset_Reference/Makefile.am2
-rw-r--r--doc/SystemTap_Tapset_Reference/Makefile.in2
4 files changed, 73 insertions, 18 deletions
diff --git a/configure b/configure
index a17a3cb1..f8c8cee9 100755
--- a/configure
+++ b/configure
@@ -666,6 +666,8 @@ nss_CFLAGS
have_certutil
BUILD_PDFREFDOCS_FALSE
BUILD_PDFREFDOCS_TRUE
+XMLTO_STRINGPARAM_FALSE
+XMLTO_STRINGPARAM_TRUE
BUILD_REFDOCS_FALSE
BUILD_REFDOCS_TRUE
have_xmlto
@@ -6801,20 +6803,43 @@ else
fi
-if test "x${building_refdocs}" == "xyes"; then
-{ $as_echo "$as_me:$LINENO: checking for xmlto pdf support" >&5
-$as_echo_n "checking for xmlto pdf support... " >&6; }
-cat > conftest.$ac_ext << EOF
+cat > conftest.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" >
- <book id="pdffromxml">
- <bookinfo>
- <title>test</title>
- </bookinfo>
+ <book lang="en">
+ <bookinfo><title>foo</title></bookinfo>
+ <chapter><title>bar</title><para>baz</para></chapter>
</book>
EOF
- xmlto pdf conftest.$ac_ext >& /dev/null
+
+if test "x${have_xmlto}" == "xyes"; then
+{ $as_echo "$as_me:$LINENO: checking for xmlto --stringparam support" >&5
+$as_echo_n "checking for xmlto --stringparam support... " >&6; }
+ xmlto --stringparam man.authors.section.enabled=0 txt conftest.xml
+ if test $? == 0; then
+ have_xmlto_stringparam="yes"
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ rm -f conftest.txt
+fi
+ if test "$have_xmlto_stringparam" == "yes"; then
+ XMLTO_STRINGPARAM_TRUE=
+ XMLTO_STRINGPARAM_FALSE='#'
+else
+ XMLTO_STRINGPARAM_TRUE='#'
+ XMLTO_STRINGPARAM_FALSE=
+fi
+
+
+if test "x${building_refdocs}" == "xyes"; then
+{ $as_echo "$as_me:$LINENO: checking for xmlto pdf support" >&5
+$as_echo_n "checking for xmlto pdf support... " >&6; }
+ xmlto pdf conftest.xml >& /dev/null
if test $? == 0; then
have_xmlto_pdf="yes"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
@@ -6825,6 +6850,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:$LINENO: WARNING: Not building reference documentation in PDF format" >&5
$as_echo "$as_me: WARNING: Not building reference documentation in PDF format" >&2;}
fi
+ rm -f conftest.pdf
fi
if test "maybe later" == "yes"; then
BUILD_PDFREFDOCS_TRUE=
@@ -6835,6 +6861,9 @@ else
fi
+rm -f conftest.xml
+
+
# Check whether --enable-server was given.
if test "${enable_server+set}" = set; then
enableval=$enable_server; enable_server=$enableval
@@ -9480,6 +9509,13 @@ $as_echo "$as_me: error: conditional \"BUILD_REFDOCS\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${XMLTO_STRINGPARAM_TRUE}" && test -z "${XMLTO_STRINGPARAM_FALSE}"; then
+ { { $as_echo "$as_me:$LINENO: error: conditional \"XMLTO_STRINGPARAM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"XMLTO_STRINGPARAM\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${BUILD_PDFREFDOCS_TRUE}" && test -z "${BUILD_PDFREFDOCS_FALSE}"; then
{ { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_PDFREFDOCS\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
diff --git a/configure.ac b/configure.ac
index a758eac3..ce16e9a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,19 +206,32 @@ if test "x${have_xmlto}" == "xyes" -a "$enable_refdocs" != "no" -a "${building_d
fi
AM_CONDITIONAL([BUILD_REFDOCS], [test "$building_refdocs" == "yes"])
-if test "x${building_refdocs}" == "xyes"; then
-AC_MSG_CHECKING([for xmlto pdf support])
-cat > conftest.$ac_ext << EOF
+cat > conftest.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
- <book id="pdffromxml">
- <bookinfo>
- <title>test</title>
- </bookinfo>
+ <book lang="en">
+ <bookinfo><title>foo</title></bookinfo>
+ <chapter><title>bar</title><para>baz</para></chapter>
</book>
EOF
- xmlto pdf conftest.$ac_ext >& /dev/null
+
+if test "x${have_xmlto}" == "xyes"; then
+AC_MSG_CHECKING([for xmlto --stringparam support])
+ xmlto --stringparam man.authors.section.enabled=0 txt conftest.xml
+ if test $? == 0; then
+ have_xmlto_stringparam="yes"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ rm -f conftest.txt
+fi
+AM_CONDITIONAL([XMLTO_STRINGPARAM], [test "$have_xmlto_stringparam" == "yes"])
+
+if test "x${building_refdocs}" == "xyes"; then
+AC_MSG_CHECKING([for xmlto pdf support])
+ xmlto pdf conftest.xml >& /dev/null
if test $? == 0; then
have_xmlto_pdf="yes"
AC_MSG_RESULT([yes])
@@ -226,6 +239,7 @@ EOF
AC_MSG_RESULT([no])
AC_MSG_WARN([Not building reference documentation in PDF format])
fi
+ rm -f conftest.pdf
fi
dnl Unfortunately https://bugzilla.redhat.com/show_bug.cgi?id=526273
dnl blocks "xmlto pdf" on our docs (but not on the above test).
@@ -233,6 +247,9 @@ dnl So we need to disable this anyway.
dnl AM_CONDITIONAL([BUILD_PDFREFDOCS], [test "$have_xmlto_pdf" == "yes"])
AM_CONDITIONAL([BUILD_PDFREFDOCS], [test "maybe later" == "yes"])
+rm -f conftest.xml
+
+
dnl Handle the option to build the server setup.
AC_ARG_ENABLE([server],
AS_HELP_STRING([--enable-server],
diff --git a/doc/SystemTap_Tapset_Reference/Makefile.am b/doc/SystemTap_Tapset_Reference/Makefile.am
index bd1bb18f..9787bbc9 100644
--- a/doc/SystemTap_Tapset_Reference/Makefile.am
+++ b/doc/SystemTap_Tapset_Reference/Makefile.am
@@ -22,7 +22,9 @@ if BUILD_PDFREFDOCS
PDFDOCS = tapsets.pdf
endif
+if XMLTO_STRINGPARAM
XMLTOMANPARAMS=--stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0
+endif
if BUILD_REFDOCS
all: $(PDFDOCS) stamp-htmldocs stamp-mandocs
diff --git a/doc/SystemTap_Tapset_Reference/Makefile.in b/doc/SystemTap_Tapset_Reference/Makefile.in
index b2529891..1b914186 100644
--- a/doc/SystemTap_Tapset_Reference/Makefile.in
+++ b/doc/SystemTap_Tapset_Reference/Makefile.in
@@ -186,7 +186,7 @@ HTML_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/tapsets
SRCTREE = $(abs_top_srcdir)/
DOCPROC = $(abs_builddir)/docproc
@BUILD_PDFREFDOCS_TRUE@PDFDOCS = tapsets.pdf
-XMLTOMANPARAMS = --stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0
+@XMLTO_STRINGPARAM_TRUE@XMLTOMANPARAMS = --stringparam man.authors.section.enabled=0 --stringparam man.copyright.section.enabled=0
CLEANFILES = tapsets.xml stamp-* $(PDFDOCS)
all: all-am