From 468abaf4588392bcf7d7e243c707bb41bc17532c Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 30 Sep 2009 19:07:26 -0400 Subject: 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. --- configure | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 9 deletions(-) (limited to 'configure') 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' - - - test - + + foo + barbaz 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 -- cgit