Commit a372a988fdcdf84c8ba2e47f021802fc3ffb9089
1 parent
abb6a16e
Switch build from docbook manual to sphinx
Also remove linearization from qpdf-manual.pdf. It's a small file, and removing the dependency on the qpdf executable significantly shortens build times.
Showing
15 changed files
with
184 additions
and
296 deletions
Makefile
| @@ -100,7 +100,7 @@ $(foreach B,$(BUILD_ITEMS),$(eval \ | @@ -100,7 +100,7 @@ $(foreach B,$(BUILD_ITEMS),$(eval \ | ||
| 100 | DISTFILES = doc/qpdf-manual.html doc/qpdf-manual.pdf | 100 | DISTFILES = doc/qpdf-manual.html doc/qpdf-manual.pdf |
| 101 | distfiles.zip: $(DISTFILES) | 101 | distfiles.zip: $(DISTFILES) |
| 102 | $(RM) distfiles.zip | 102 | $(RM) distfiles.zip |
| 103 | - zip distfiles.zip $(DISTFILES) | 103 | + zip -r distfiles.zip $(DISTFILES) doc/_static |
| 104 | 104 | ||
| 105 | distclean: clean | 105 | distclean: clean |
| 106 | $(RM) -r autoconf.mk autom4te.cache config.log config.status libtool | 106 | $(RM) -r autoconf.mk autom4te.cache config.log config.status libtool |
TODO
| @@ -42,20 +42,6 @@ Correct placement of comment: <!-- This section is referenced in QPDFObjectHandl | @@ -42,20 +42,6 @@ Correct placement of comment: <!-- This section is referenced in QPDFObjectHandl | ||
| 42 | <firstterm> -> just use literal | 42 | <firstterm> -> just use literal |
| 43 | <replaceable> -> Make sure in :file: or :samp:, then use {} | 43 | <replaceable> -> Make sure in :file: or :samp:, then use {} |
| 44 | 44 | ||
| 45 | -Build: | ||
| 46 | - | ||
| 47 | -apt install python3-pip texlive-latex-extra latexmk | ||
| 48 | -pip install sphinx | ||
| 49 | - | ||
| 50 | -sphinx-build -M help . . | ||
| 51 | -sphinx-build -M latexpdf source build | ||
| 52 | -sphinx-build -M html source build | ||
| 53 | -sphinx-build -M singlehtml source build | ||
| 54 | - | ||
| 55 | -autoconf should detect sphinx and its dependencies, not fop, etc. | ||
| 56 | -Remove VALIDATE_DOC | ||
| 57 | -Fix installation of documentation in doc | ||
| 58 | - | ||
| 59 | Additional cleanup: | 45 | Additional cleanup: |
| 60 | 46 | ||
| 61 | * Indices and tables section | 47 | * Indices and tables section |
aclocal.m4
| 1 | -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- | 1 | +# generated automatically by aclocal 1.16.4 -*- Autoconf -*- |
| 2 | 2 | ||
| 3 | -# Copyright (C) 1996-2018 Free Software Foundation, Inc. | 3 | +# Copyright (C) 1996-2021 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | # This file is free software; the Free Software Foundation | 5 | # This file is free software; the Free Software Foundation |
| 6 | # gives unlimited permission to copy and/or distribute it, | 6 | # gives unlimited permission to copy and/or distribute it, |
appimage/Dockerfile
| 1 | -FROM ubuntu:16.04 | 1 | +FROM ubuntu:18.04 |
| 2 | +ENV DEBIAN_FRONTEND=noninteractive | ||
| 2 | RUN apt-get update && \ | 3 | RUN apt-get update && \ |
| 3 | apt-get -y install screen autoconf git sudo \ | 4 | apt-get -y install screen autoconf git sudo \ |
| 4 | build-essential zlib1g-dev libjpeg-dev libgnutls28-dev \ | 5 | build-essential zlib1g-dev libjpeg-dev libgnutls28-dev \ |
| 5 | - docbook-xsl fop xsltproc \ | 6 | + python3-pip texlive-latex-extra latexmk \ |
| 6 | inkscape imagemagick busybox-static wget fuse && \ | 7 | inkscape imagemagick busybox-static wget fuse && \ |
| 7 | apt-get clean && \ | 8 | apt-get clean && \ |
| 8 | rm -rf /var/lib/apt/lists/* | 9 | rm -rf /var/lib/apt/lists/* |
| 10 | +RUN pip3 install sphinx | ||
| 9 | COPY entrypoint /entrypoint | 11 | COPY entrypoint /entrypoint |
| 10 | RUN chmod +x /entrypoint | 12 | RUN chmod +x /entrypoint |
| 11 | ENTRYPOINT [ "/entrypoint" ] | 13 | ENTRYPOINT [ "/entrypoint" ] |
appimage/build-appimage
| @@ -43,24 +43,25 @@ if [ "x$1" == "x--sign" ]; then | @@ -43,24 +43,25 @@ if [ "x$1" == "x--sign" ]; then | ||
| 43 | fi | 43 | fi |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | -# Check if we are on Ubuntu Trusty | 46 | +# Check Ubuntu Distribution |
| 47 | _osversion=$(cat /etc/os-release | grep PRETTY_NAME | awk -F'=' '{print $2}' | sed 's#"##g') | 47 | _osversion=$(cat /etc/os-release | grep PRETTY_NAME | awk -F'=' '{print $2}' | sed 's#"##g') |
| 48 | 48 | ||
| 49 | # Warn users building the AppImage locally: | 49 | # Warn users building the AppImage locally: |
| 50 | -if [[ ! $_osversion =~ Ubuntu\ 16.04.*\ LTS ]]; then | 50 | +if [[ ! $_osversion =~ Ubuntu\ 18.04.*\ LTS ]]; then |
| 51 | set +x | 51 | set +x |
| 52 | echo "" | 52 | echo "" |
| 53 | # 0 1 2 3 4 5 6 7 | 53 | # 0 1 2 3 4 5 6 7 |
| 54 | # 01234567890123456789012345678901234567890123456789012345678901234567890123456789 | 54 | # 01234567890123456789012345678901234567890123456789012345678901234567890123456789 |
| 55 | echo "+===========================================================================+" | 55 | echo "+===========================================================================+" |
| 56 | echo "|| WARNING: You are about to build a QPDF AppImage on a system which is ||" | 56 | echo "|| WARNING: You are about to build a QPDF AppImage on a system which is ||" |
| 57 | - echo "|| NOT Ubuntu 16.04 LTS ('Xenial'). ||" | 57 | + echo "|| NOT Ubuntu 18.04 LTS. ||" |
| 58 | echo "|| ||" | 58 | echo "|| ||" |
| 59 | echo "|| It is recommended that you use a distribution that is at least a ||" | 59 | echo "|| It is recommended that you use a distribution that is at least a ||" |
| 60 | echo "|| few years old to maximize the number of Linux distributions the ||" | 60 | echo "|| few years old to maximize the number of Linux distributions the ||" |
| 61 | echo "|| resulting AppImage will work on. AppImages often don't work on ||" | 61 | echo "|| resulting AppImage will work on. AppImages often don't work on ||" |
| 62 | echo "|| distributions older than the one they were built on because of ||" | 62 | echo "|| distributions older than the one they were built on because of ||" |
| 63 | - echo "|| standard library differences. ||" | 63 | + echo "|| standard library differences. The oldest supported Ubuntu LTS is ||" |
| 64 | + echo "|| a good option. ||" | ||
| 64 | echo "+===========================================================================+" | 65 | echo "+===========================================================================+" |
| 65 | echo "" | 66 | echo "" |
| 66 | set -x | 67 | set -x |
autoconf.mk.in
| @@ -34,13 +34,9 @@ LIBTOOL=@LIBTOOL@ | @@ -34,13 +34,9 @@ LIBTOOL=@LIBTOOL@ | ||
| 34 | USE_CRYPTO_NATIVE=@USE_CRYPTO_NATIVE@ | 34 | USE_CRYPTO_NATIVE=@USE_CRYPTO_NATIVE@ |
| 35 | USE_CRYPTO_OPENSSL=@USE_CRYPTO_OPENSSL@ | 35 | USE_CRYPTO_OPENSSL=@USE_CRYPTO_OPENSSL@ |
| 36 | USE_CRYPTO_GNUTLS=@USE_CRYPTO_GNUTLS@ | 36 | USE_CRYPTO_GNUTLS=@USE_CRYPTO_GNUTLS@ |
| 37 | -DOCBOOKX_DTD=@DOCBOOKX_DTD@ | ||
| 38 | -FOP=@FOP@ | ||
| 39 | -XSLTPROC=@XSLTPROC@ | ||
| 40 | -XMLLINT=@XMLLINT@ | 37 | +SPHINX=@SPHINX@ |
| 41 | BUILD_HTML=@BUILD_HTML@ | 38 | BUILD_HTML=@BUILD_HTML@ |
| 42 | BUILD_PDF=@BUILD_PDF@ | 39 | BUILD_PDF=@BUILD_PDF@ |
| 43 | -VALIDATE_DOC=@VALIDATE_DOC@ | ||
| 44 | OSS_FUZZ=@OSS_FUZZ@ | 40 | OSS_FUZZ=@OSS_FUZZ@ |
| 45 | QPDF_SKIP_TEST_COMPARE_IMAGES=@QPDF_SKIP_TEST_COMPARE_IMAGES@ | 41 | QPDF_SKIP_TEST_COMPARE_IMAGES=@QPDF_SKIP_TEST_COMPARE_IMAGES@ |
| 46 | BUILDRULES=@BUILDRULES@ | 42 | BUILDRULES=@BUILDRULES@ |
autofiles.sums
| 1 | -e8f33e2b17d8c04fc1c160e9a92e7f1e48e433467f734629cdbb873f2d6fa676 configure.ac | ||
| 2 | -d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4 | 1 | +44c66263db20dec40cefe94df4f9f9effe7410f20865cd53cf89268f6a98010f configure.ac |
| 2 | +a45b129101efb46d7ac59ca2cf12d137a5742c2593ea11ebb32401aefd915b96 aclocal.m4 | ||
| 3 | c12d837479fa9a3fa4c278b6dc7d6b449503d663e0f0d294305595a51ff43f70 libqpdf/qpdf/qpdf-config.h.in | 3 | c12d837479fa9a3fa4c278b6dc7d6b449503d663e0f0d294305595a51ff43f70 libqpdf/qpdf/qpdf-config.h.in |
| 4 | 5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4 | 4 | 5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4 |
| 5 | 35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4 | 5 | 35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4 |
build-scripts/build-linux
| @@ -3,8 +3,9 @@ set -ex | @@ -3,8 +3,9 @@ set -ex | ||
| 3 | sudo apt-get update | 3 | sudo apt-get update |
| 4 | sudo apt-get -y install \ | 4 | sudo apt-get -y install \ |
| 5 | autoconf build-essential zlib1g-dev libjpeg-dev libgnutls28-dev \ | 5 | autoconf build-essential zlib1g-dev libjpeg-dev libgnutls28-dev \ |
| 6 | - libssl-dev docbook-xsl fop xsltproc libxml2-utils inkscape imagemagick \ | ||
| 7 | - libtiff-tools ghostscript | 6 | + libssl-dev python3-pip texlive-latex-extra latexmk \ |
| 7 | + inkscape imagemagick libtiff-tools ghostscript | ||
| 8 | +pip3 install sphinx | ||
| 8 | ./configure --enable-werror --enable-doc-maintenance \ | 9 | ./configure --enable-werror --enable-doc-maintenance \ |
| 9 | --enable-crypto-native --enable-crypto-openssl --enable-crypto-gnutls \ | 10 | --enable-crypto-native --enable-crypto-openssl --enable-crypto-gnutls \ |
| 10 | --enable-show-failed-test-output --enable-test-compare-images | 11 | --enable-show-failed-test-output --enable-test-compare-images |
build-scripts/make-distfiles
| @@ -4,7 +4,8 @@ set -ex | @@ -4,7 +4,8 @@ set -ex | ||
| 4 | sudo apt-get update | 4 | sudo apt-get update |
| 5 | sudo apt-get -y install \ | 5 | sudo apt-get -y install \ |
| 6 | autoconf build-essential zlib1g-dev libjpeg-dev \ | 6 | autoconf build-essential zlib1g-dev libjpeg-dev \ |
| 7 | - docbook-xsl fop xsltproc libxml2-utils inkscape imagemagick | 7 | + python3-pip texlive-latex-extra latexmk inkscape imagemagick |
| 8 | +pip3 install sphinx | ||
| 8 | ./configure --enable-doc-maintenance | 9 | ./configure --enable-doc-maintenance |
| 9 | make -j$(nproc) distfiles.zip | 10 | make -j$(nproc) distfiles.zip |
| 10 | build-scripts/download-external-libs | 11 | build-scripts/download-external-libs |
configure
| @@ -631,15 +631,12 @@ ac_includes_default="\ | @@ -631,15 +631,12 @@ ac_includes_default="\ | ||
| 631 | ac_subst_vars='LTLIBOBJS | 631 | ac_subst_vars='LTLIBOBJS |
| 632 | LIBOBJS | 632 | LIBOBJS |
| 633 | OSS_FUZZ | 633 | OSS_FUZZ |
| 634 | -VALIDATE_DOC | ||
| 635 | BUILD_PDF | 634 | BUILD_PDF |
| 636 | BUILD_HTML | 635 | BUILD_HTML |
| 637 | -XMLLINT | ||
| 638 | -XSLTPROC | ||
| 639 | -FOP | ||
| 640 | -DOCBOOKX_DTD | ||
| 641 | -DOCBOOK_FO | ||
| 642 | -DOCBOOK_XHTML | 636 | +SPHINX |
| 637 | +LATEXMK | ||
| 638 | +PDFLATEX | ||
| 639 | +LATEX | ||
| 643 | SHOW_FAILED_TEST_OUTPUT | 640 | SHOW_FAILED_TEST_OUTPUT |
| 644 | QPDF_SKIP_TEST_COMPARE_IMAGES | 641 | QPDF_SKIP_TEST_COMPARE_IMAGES |
| 645 | DEFAULT_CRYPTO | 642 | DEFAULT_CRYPTO |
| @@ -794,12 +791,9 @@ enable_crypto_gnutls | @@ -794,12 +791,9 @@ enable_crypto_gnutls | ||
| 794 | with_default_crypto | 791 | with_default_crypto |
| 795 | enable_test_compare_images | 792 | enable_test_compare_images |
| 796 | enable_show_failed_test_output | 793 | enable_show_failed_test_output |
| 797 | -with_docbook_xsl | ||
| 798 | -with_docbookx_dtd | ||
| 799 | enable_doc_maintenance | 794 | enable_doc_maintenance |
| 800 | enable_html_doc | 795 | enable_html_doc |
| 801 | enable_pdf_doc | 796 | enable_pdf_doc |
| 802 | -enable_validate_doc | ||
| 803 | enable_oss_fuzz | 797 | enable_oss_fuzz |
| 804 | ' | 798 | ' |
| 805 | ac_precious_vars='build_alias | 799 | ac_precious_vars='build_alias |
| @@ -1497,7 +1491,6 @@ Optional Features: | @@ -1497,7 +1491,6 @@ Optional Features: | ||
| 1497 | if set, enables all documentation options | 1491 | if set, enables all documentation options |
| 1498 | --enable-html-doc whether to build HTML documents | 1492 | --enable-html-doc whether to build HTML documents |
| 1499 | --enable-pdf-doc whether to build PDF documents | 1493 | --enable-pdf-doc whether to build PDF documents |
| 1500 | - --enable-validate-doc whether to validate xml document source | ||
| 1501 | --enable-oss-fuzz if set, build static fuzzers for oss-fuzz | 1494 | --enable-oss-fuzz if set, build static fuzzers for oss-fuzz |
| 1502 | 1495 | ||
| 1503 | Optional Packages: | 1496 | Optional Packages: |
| @@ -1523,9 +1516,6 @@ Optional Packages: | @@ -1523,9 +1516,6 @@ Optional Packages: | ||
| 1523 | --with-default-crypto=provider | 1516 | --with-default-crypto=provider |
| 1524 | which crypto provider to use by default; see | 1517 | which crypto provider to use by default; see |
| 1525 | README.md | 1518 | README.md |
| 1526 | - --with-docbook-xsl=DIR location of docbook 4.x xml stylesheets | ||
| 1527 | - --with-docbookx-dtd=FILE | ||
| 1528 | - location of docbook 4.x xml DTD | ||
| 1529 | 1519 | ||
| 1530 | Some influential environment variables: | 1520 | Some influential environment variables: |
| 1531 | CC C compiler command | 1521 | CC C compiler command |
| @@ -2650,8 +2640,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | @@ -2650,8 +2640,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
| 2650 | 2640 | ||
| 2651 | ac_config_files="$ac_config_files autoconf.mk" | 2641 | ac_config_files="$ac_config_files autoconf.mk" |
| 2652 | 2642 | ||
| 2653 | -ac_config_files="$ac_config_files manual/html.xsl manual/print.xsl" | ||
| 2654 | - | ||
| 2655 | ac_config_files="$ac_config_files libqpdf.pc" | 2643 | ac_config_files="$ac_config_files libqpdf.pc" |
| 2656 | 2644 | ||
| 2657 | ac_config_files="$ac_config_files libqpdf.map" | 2645 | ac_config_files="$ac_config_files libqpdf.map" |
| @@ -18449,69 +18437,52 @@ else | @@ -18449,69 +18437,52 @@ else | ||
| 18449 | fi | 18437 | fi |
| 18450 | 18438 | ||
| 18451 | 18439 | ||
| 18452 | - | ||
| 18453 | -# Check whether --with-docbook-xsl was given. | ||
| 18454 | -if test "${with_docbook_xsl+set}" = set; then : | ||
| 18455 | - withval=$with_docbook_xsl; DOCBOOK_XSL=$withval | 18440 | +# Extract the first word of "latex", so it can be a program name with args. |
| 18441 | +set dummy latex; ac_word=$2 | ||
| 18442 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
| 18443 | +$as_echo_n "checking for $ac_word... " >&6; } | ||
| 18444 | +if ${ac_cv_prog_LATEX+:} false; then : | ||
| 18445 | + $as_echo_n "(cached) " >&6 | ||
| 18456 | else | 18446 | else |
| 18457 | - DOCBOOK_XSL=/usr/share/xml/docbook/stylesheet/nwalsh | ||
| 18458 | -fi | ||
| 18459 | - | ||
| 18460 | - | ||
| 18461 | -DOCBOOK_XHTML= | ||
| 18462 | - | ||
| 18463 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml to xhtml docbook stylesheets" >&5 | ||
| 18464 | -$as_echo_n "checking for xml to xhtml docbook stylesheets... " >&6; } | ||
| 18465 | -if test -f "$DOCBOOK_XSL/xhtml/docbook.xsl"; then | ||
| 18466 | - DOCBOOK_XHTML="$DOCBOOK_XSL/xhtml/docbook.xsl" | ||
| 18467 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK_XHTML" >&5 | ||
| 18468 | -$as_echo "$DOCBOOK_XHTML" >&6; } | 18447 | + if test -n "$LATEX"; then |
| 18448 | + ac_cv_prog_LATEX="$LATEX" # Let the user override the test. | ||
| 18469 | else | 18449 | else |
| 18470 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 18471 | -$as_echo "no" >&6; } | ||
| 18472 | -fi | ||
| 18473 | -DOCBOOK_FO= | 18450 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 18451 | +for as_dir in $PATH | ||
| 18452 | +do | ||
| 18453 | + IFS=$as_save_IFS | ||
| 18454 | + test -z "$as_dir" && as_dir=. | ||
| 18455 | + for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 18456 | + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
| 18457 | + ac_cv_prog_LATEX="latex" | ||
| 18458 | + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
| 18459 | + break 2 | ||
| 18460 | + fi | ||
| 18461 | +done | ||
| 18462 | + done | ||
| 18463 | +IFS=$as_save_IFS | ||
| 18474 | 18464 | ||
| 18475 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml to fo docbook stylesheets" >&5 | ||
| 18476 | -$as_echo_n "checking for xml to fo docbook stylesheets... " >&6; } | ||
| 18477 | -if test -f "$DOCBOOK_XSL/fo/docbook.xsl"; then | ||
| 18478 | - DOCBOOK_FO="$DOCBOOK_XSL/fo/docbook.xsl" | ||
| 18479 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOK_FO" >&5 | ||
| 18480 | -$as_echo "$DOCBOOK_FO" >&6; } | ||
| 18481 | -else | ||
| 18482 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
| 18483 | -$as_echo "no" >&6; } | ||
| 18484 | fi | 18465 | fi |
| 18485 | - | ||
| 18486 | -DOCBOOKX_DTD= | ||
| 18487 | - | ||
| 18488 | - | ||
| 18489 | -# Check whether --with-docbookx-dtd was given. | ||
| 18490 | -if test "${with_docbookx_dtd+set}" = set; then : | ||
| 18491 | - withval=$with_docbookx_dtd; DOCBOOKX_DTD=$withval | ||
| 18492 | -else | ||
| 18493 | - DOCBOOKX_DTD=/usr/share/xml/docbook/schema/dtd/4/docbookx.dtd | ||
| 18494 | fi | 18466 | fi |
| 18495 | - | ||
| 18496 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for docbook 4.x xml DTD" >&5 | ||
| 18497 | -$as_echo_n "checking for docbook 4.x xml DTD... " >&6; } | ||
| 18498 | -if test -f "$DOCBOOKX_DTD"; then | ||
| 18499 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKX_DTD" >&5 | ||
| 18500 | -$as_echo "$DOCBOOKX_DTD" >&6; } | 18467 | +LATEX=$ac_cv_prog_LATEX |
| 18468 | +if test -n "$LATEX"; then | ||
| 18469 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEX" >&5 | ||
| 18470 | +$as_echo "$LATEX" >&6; } | ||
| 18501 | else | 18471 | else |
| 18502 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 18472 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 18503 | $as_echo "no" >&6; } | 18473 | $as_echo "no" >&6; } |
| 18504 | fi | 18474 | fi |
| 18505 | 18475 | ||
| 18506 | -# Extract the first word of "fop", so it can be a program name with args. | ||
| 18507 | -set dummy fop; ac_word=$2 | 18476 | + |
| 18477 | +# Extract the first word of "pdflatex", so it can be a program name with args. | ||
| 18478 | +set dummy pdflatex; ac_word=$2 | ||
| 18508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | 18479 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 18509 | $as_echo_n "checking for $ac_word... " >&6; } | 18480 | $as_echo_n "checking for $ac_word... " >&6; } |
| 18510 | -if ${ac_cv_prog_FOP+:} false; then : | 18481 | +if ${ac_cv_prog_PDFLATEX+:} false; then : |
| 18511 | $as_echo_n "(cached) " >&6 | 18482 | $as_echo_n "(cached) " >&6 |
| 18512 | else | 18483 | else |
| 18513 | - if test -n "$FOP"; then | ||
| 18514 | - ac_cv_prog_FOP="$FOP" # Let the user override the test. | 18484 | + if test -n "$PDFLATEX"; then |
| 18485 | + ac_cv_prog_PDFLATEX="$PDFLATEX" # Let the user override the test. | ||
| 18515 | else | 18486 | else |
| 18516 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | 18487 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 18517 | for as_dir in $PATH | 18488 | for as_dir in $PATH |
| @@ -18520,7 +18491,7 @@ do | @@ -18520,7 +18491,7 @@ do | ||
| 18520 | test -z "$as_dir" && as_dir=. | 18491 | test -z "$as_dir" && as_dir=. |
| 18521 | for ac_exec_ext in '' $ac_executable_extensions; do | 18492 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 18522 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | 18493 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 18523 | - ac_cv_prog_FOP="fop" | 18494 | + ac_cv_prog_PDFLATEX="pdflatex" |
| 18524 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | 18495 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 18525 | break 2 | 18496 | break 2 |
| 18526 | fi | 18497 | fi |
| @@ -18530,25 +18501,25 @@ IFS=$as_save_IFS | @@ -18530,25 +18501,25 @@ IFS=$as_save_IFS | ||
| 18530 | 18501 | ||
| 18531 | fi | 18502 | fi |
| 18532 | fi | 18503 | fi |
| 18533 | -FOP=$ac_cv_prog_FOP | ||
| 18534 | -if test -n "$FOP"; then | ||
| 18535 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 | ||
| 18536 | -$as_echo "$FOP" >&6; } | 18504 | +PDFLATEX=$ac_cv_prog_PDFLATEX |
| 18505 | +if test -n "$PDFLATEX"; then | ||
| 18506 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 | ||
| 18507 | +$as_echo "$PDFLATEX" >&6; } | ||
| 18537 | else | 18508 | else |
| 18538 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 18509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 18539 | $as_echo "no" >&6; } | 18510 | $as_echo "no" >&6; } |
| 18540 | fi | 18511 | fi |
| 18541 | 18512 | ||
| 18542 | 18513 | ||
| 18543 | -# Extract the first word of "xsltproc", so it can be a program name with args. | ||
| 18544 | -set dummy xsltproc; ac_word=$2 | 18514 | +# Extract the first word of "latexmk", so it can be a program name with args. |
| 18515 | +set dummy latexmk; ac_word=$2 | ||
| 18545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | 18516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 18546 | $as_echo_n "checking for $ac_word... " >&6; } | 18517 | $as_echo_n "checking for $ac_word... " >&6; } |
| 18547 | -if ${ac_cv_prog_XSLTPROC+:} false; then : | 18518 | +if ${ac_cv_prog_LATEXMK+:} false; then : |
| 18548 | $as_echo_n "(cached) " >&6 | 18519 | $as_echo_n "(cached) " >&6 |
| 18549 | else | 18520 | else |
| 18550 | - if test -n "$XSLTPROC"; then | ||
| 18551 | - ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test. | 18521 | + if test -n "$LATEXMK"; then |
| 18522 | + ac_cv_prog_LATEXMK="$LATEXMK" # Let the user override the test. | ||
| 18552 | else | 18523 | else |
| 18553 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | 18524 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 18554 | for as_dir in $PATH | 18525 | for as_dir in $PATH |
| @@ -18557,7 +18528,7 @@ do | @@ -18557,7 +18528,7 @@ do | ||
| 18557 | test -z "$as_dir" && as_dir=. | 18528 | test -z "$as_dir" && as_dir=. |
| 18558 | for ac_exec_ext in '' $ac_executable_extensions; do | 18529 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 18559 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | 18530 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 18560 | - ac_cv_prog_XSLTPROC="xsltproc" | 18531 | + ac_cv_prog_LATEXMK="latexmk" |
| 18561 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | 18532 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 18562 | break 2 | 18533 | break 2 |
| 18563 | fi | 18534 | fi |
| @@ -18567,25 +18538,25 @@ IFS=$as_save_IFS | @@ -18567,25 +18538,25 @@ IFS=$as_save_IFS | ||
| 18567 | 18538 | ||
| 18568 | fi | 18539 | fi |
| 18569 | fi | 18540 | fi |
| 18570 | -XSLTPROC=$ac_cv_prog_XSLTPROC | ||
| 18571 | -if test -n "$XSLTPROC"; then | ||
| 18572 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 | ||
| 18573 | -$as_echo "$XSLTPROC" >&6; } | 18541 | +LATEXMK=$ac_cv_prog_LATEXMK |
| 18542 | +if test -n "$LATEXMK"; then | ||
| 18543 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LATEXMK" >&5 | ||
| 18544 | +$as_echo "$LATEXMK" >&6; } | ||
| 18574 | else | 18545 | else |
| 18575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 18546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 18576 | $as_echo "no" >&6; } | 18547 | $as_echo "no" >&6; } |
| 18577 | fi | 18548 | fi |
| 18578 | 18549 | ||
| 18579 | 18550 | ||
| 18580 | -# Extract the first word of "xmllint", so it can be a program name with args. | ||
| 18581 | -set dummy xmllint; ac_word=$2 | 18551 | +# Extract the first word of "sphinx-build", so it can be a program name with args. |
| 18552 | +set dummy sphinx-build; ac_word=$2 | ||
| 18582 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | 18553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 18583 | $as_echo_n "checking for $ac_word... " >&6; } | 18554 | $as_echo_n "checking for $ac_word... " >&6; } |
| 18584 | -if ${ac_cv_prog_XMLLINT+:} false; then : | 18555 | +if ${ac_cv_prog_SPHINX+:} false; then : |
| 18585 | $as_echo_n "(cached) " >&6 | 18556 | $as_echo_n "(cached) " >&6 |
| 18586 | else | 18557 | else |
| 18587 | - if test -n "$XMLLINT"; then | ||
| 18588 | - ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test. | 18558 | + if test -n "$SPHINX"; then |
| 18559 | + ac_cv_prog_SPHINX="$SPHINX" # Let the user override the test. | ||
| 18589 | else | 18560 | else |
| 18590 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | 18561 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 18591 | for as_dir in $PATH | 18562 | for as_dir in $PATH |
| @@ -18594,7 +18565,7 @@ do | @@ -18594,7 +18565,7 @@ do | ||
| 18594 | test -z "$as_dir" && as_dir=. | 18565 | test -z "$as_dir" && as_dir=. |
| 18595 | for ac_exec_ext in '' $ac_executable_extensions; do | 18566 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 18596 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | 18567 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 18597 | - ac_cv_prog_XMLLINT="xmllint" | 18568 | + ac_cv_prog_SPHINX="sphinx-build" |
| 18598 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | 18569 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 18599 | break 2 | 18570 | break 2 |
| 18600 | fi | 18571 | fi |
| @@ -18604,10 +18575,10 @@ IFS=$as_save_IFS | @@ -18604,10 +18575,10 @@ IFS=$as_save_IFS | ||
| 18604 | 18575 | ||
| 18605 | fi | 18576 | fi |
| 18606 | fi | 18577 | fi |
| 18607 | -XMLLINT=$ac_cv_prog_XMLLINT | ||
| 18608 | -if test -n "$XMLLINT"; then | ||
| 18609 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 | ||
| 18610 | -$as_echo "$XMLLINT" >&6; } | 18578 | +SPHINX=$ac_cv_prog_SPHINX |
| 18579 | +if test -n "$SPHINX"; then | ||
| 18580 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINX" >&5 | ||
| 18581 | +$as_echo "$SPHINX" >&6; } | ||
| 18611 | else | 18582 | else |
| 18612 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | 18583 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 18613 | $as_echo "no" >&6; } | 18584 | $as_echo "no" >&6; } |
| @@ -18653,19 +18624,6 @@ else | @@ -18653,19 +18624,6 @@ else | ||
| 18653 | BUILD_PDF=$doc_default | 18624 | BUILD_PDF=$doc_default |
| 18654 | fi | 18625 | fi |
| 18655 | 18626 | ||
| 18656 | -VALIDATE_DOC=0 | ||
| 18657 | - | ||
| 18658 | -# Check whether --enable-validate-doc was given. | ||
| 18659 | -if test "${enable_validate_doc+set}" = set; then : | ||
| 18660 | - enableval=$enable_validate_doc; if test "$enableval" = "yes"; then | ||
| 18661 | - VALIDATE_DOC=1; | ||
| 18662 | - else | ||
| 18663 | - VALIDATE_DOC=0; | ||
| 18664 | - fi | ||
| 18665 | -else | ||
| 18666 | - VALIDATE_DOC=$doc_default | ||
| 18667 | -fi | ||
| 18668 | - | ||
| 18669 | 18627 | ||
| 18670 | 18628 | ||
| 18671 | # Check whether --enable-oss-fuzz was given. | 18629 | # Check whether --enable-oss-fuzz was given. |
| @@ -18680,38 +18638,31 @@ else | @@ -18680,38 +18638,31 @@ else | ||
| 18680 | fi | 18638 | fi |
| 18681 | 18639 | ||
| 18682 | 18640 | ||
| 18683 | -if test "$VALIDATE_DOC" = "1"; then | ||
| 18684 | - if test "$XMLLINT" = ""; then | ||
| 18685 | - MISSING_XMLLINT=1 | ||
| 18686 | - MISSING_ANY=1 | ||
| 18687 | - fi | ||
| 18688 | -fi | ||
| 18689 | if test "$BUILD_HTML" = "1"; then | 18641 | if test "$BUILD_HTML" = "1"; then |
| 18690 | - if test "$XSLTPROC" = ""; then | ||
| 18691 | - MISSING_XSLTPROC=1 | ||
| 18692 | - MISSING_ANY=1 | ||
| 18693 | - fi | ||
| 18694 | - if test "$DOCBOOK_XHTML" = ""; then | ||
| 18695 | - MISSING_DOCBOOK_XHTML=1 | 18642 | + if test "$SPHINX" = ""; then |
| 18643 | + MISSING_SPHINX=1 | ||
| 18696 | MISSING_ANY=1 | 18644 | MISSING_ANY=1 |
| 18697 | fi | 18645 | fi |
| 18698 | fi | 18646 | fi |
| 18699 | if test "$BUILD_PDF" = "1"; then | 18647 | if test "$BUILD_PDF" = "1"; then |
| 18700 | - if test "$XSLTPROC" = ""; then | ||
| 18701 | - MISSING_XSLTPROC=1 | 18648 | + if test "$SPHINX" = ""; then |
| 18649 | + MISSING_SPHINX=1 | ||
| 18650 | + MISSING_ANY=1 | ||
| 18651 | + fi | ||
| 18652 | + if test "$LATEX" = ""; then | ||
| 18653 | + MISSING_LATEX=1 | ||
| 18702 | MISSING_ANY=1 | 18654 | MISSING_ANY=1 |
| 18703 | fi | 18655 | fi |
| 18704 | - if test "$DOCBOOK_FO" = ""; then | ||
| 18705 | - MISSING_DOCBOOK_FO=1 | 18656 | + if test "$LATEXMK" = ""; then |
| 18657 | + MISSING_LATEXMK=1 | ||
| 18706 | MISSING_ANY=1 | 18658 | MISSING_ANY=1 |
| 18707 | fi | 18659 | fi |
| 18708 | - if test "$FOP" = ""; then | ||
| 18709 | - MISSING_FOP=1 | 18660 | + if test "$PDFLATEX" = ""; then |
| 18661 | + MISSING_PDFLATEX=1 | ||
| 18710 | MISSING_ANY=1 | 18662 | MISSING_ANY=1 |
| 18711 | fi | 18663 | fi |
| 18712 | fi | 18664 | fi |
| 18713 | 18665 | ||
| 18714 | - | ||
| 18715 | if test "$MISSING_ANY" = "1"; then | 18666 | if test "$MISSING_ANY" = "1"; then |
| 18716 | ISSUE_WARNINGS=1 | 18667 | ISSUE_WARNINGS=1 |
| 18717 | fi | 18668 | fi |
| @@ -18745,29 +18696,24 @@ if test "$MISSING_JPEG" = "1"; then | @@ -18745,29 +18696,24 @@ if test "$MISSING_JPEG" = "1"; then | ||
| 18745 | $as_echo "$as_me: WARNING: unable to find required library jpeg" >&2;} | 18696 | $as_echo "$as_me: WARNING: unable to find required library jpeg" >&2;} |
| 18746 | fi | 18697 | fi |
| 18747 | 18698 | ||
| 18748 | -if test "$MISSING_DOCBOOK_FO" = "1"; then | ||
| 18749 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: docbook fo stylesheets are required to build PDF documentation" >&5 | ||
| 18750 | -$as_echo "$as_me: WARNING: docbook fo stylesheets are required to build PDF documentation" >&2;} | ||
| 18751 | -fi | ||
| 18752 | - | ||
| 18753 | -if test "$MISSING_DOCBOOK_XHTML" = "1"; then | ||
| 18754 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: docbook xhmtl stylesheets are required to build HTML documentation" >&5 | ||
| 18755 | -$as_echo "$as_me: WARNING: docbook xhmtl stylesheets are required to build HTML documentation" >&2;} | 18699 | +if test "$MISSING_LATEX" = "1"; then |
| 18700 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: latex is required to build PDF documentation" >&5 | ||
| 18701 | +$as_echo "$as_me: WARNING: latex is required to build PDF documentation" >&2;} | ||
| 18756 | fi | 18702 | fi |
| 18757 | 18703 | ||
| 18758 | -if test "$MISSING_FOP" = "1"; then | ||
| 18759 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: apache fop is required to build PDF documentation" >&5 | ||
| 18760 | -$as_echo "$as_me: WARNING: apache fop is required to build PDF documentation" >&2;} | 18704 | +if test "$MISSING_LATEXMK" = "1"; then |
| 18705 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: latexmk is required to build PDF documentation" >&5 | ||
| 18706 | +$as_echo "$as_me: WARNING: latexmk is required to build PDF documentation" >&2;} | ||
| 18761 | fi | 18707 | fi |
| 18762 | 18708 | ||
| 18763 | -if test "$MISSING_XMLLINT" = "1"; then | ||
| 18764 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmllint is required to validate documentation" >&5 | ||
| 18765 | -$as_echo "$as_me: WARNING: xmllint is required to validate documentation" >&2;} | 18709 | +if test "$MISSING_PDFLATEX" = "1"; then |
| 18710 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex is required to build PDF documentation" >&5 | ||
| 18711 | +$as_echo "$as_me: WARNING: pdflatex is required to build PDF documentation" >&2;} | ||
| 18766 | fi | 18712 | fi |
| 18767 | 18713 | ||
| 18768 | -if test "$MISSING_XSLTPROC" = "1"; then | ||
| 18769 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xsltproc is required to build documentation" >&5 | ||
| 18770 | -$as_echo "$as_me: WARNING: xsltproc is required to build documentation" >&2;} | 18714 | +if test "$MISSING_SPHINX" = "1"; then |
| 18715 | + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sphinx-build is required to build documentation" >&5 | ||
| 18716 | +$as_echo "$as_me: WARNING: sphinx-build is required to build documentation" >&2;} | ||
| 18771 | fi | 18717 | fi |
| 18772 | 18718 | ||
| 18773 | if test "$ISSUE_WARNINGS" = "1"; then | 18719 | if test "$ISSUE_WARNINGS" = "1"; then |
| @@ -19871,8 +19817,6 @@ for ac_config_target in $ac_config_targets | @@ -19871,8 +19817,6 @@ for ac_config_target in $ac_config_targets | ||
| 19871 | do | 19817 | do |
| 19872 | case $ac_config_target in | 19818 | case $ac_config_target in |
| 19873 | "autoconf.mk") CONFIG_FILES="$CONFIG_FILES autoconf.mk" ;; | 19819 | "autoconf.mk") CONFIG_FILES="$CONFIG_FILES autoconf.mk" ;; |
| 19874 | - "manual/html.xsl") CONFIG_FILES="$CONFIG_FILES manual/html.xsl" ;; | ||
| 19875 | - "manual/print.xsl") CONFIG_FILES="$CONFIG_FILES manual/print.xsl" ;; | ||
| 19876 | "libqpdf.pc") CONFIG_FILES="$CONFIG_FILES libqpdf.pc" ;; | 19820 | "libqpdf.pc") CONFIG_FILES="$CONFIG_FILES libqpdf.pc" ;; |
| 19877 | "libqpdf.map") CONFIG_FILES="$CONFIG_FILES libqpdf.map" ;; | 19821 | "libqpdf.map") CONFIG_FILES="$CONFIG_FILES libqpdf.map" ;; |
| 19878 | "libqpdf/qpdf/qpdf-config.h") CONFIG_HEADERS="$CONFIG_HEADERS libqpdf/qpdf/qpdf-config.h" ;; | 19822 | "libqpdf/qpdf/qpdf-config.h") CONFIG_HEADERS="$CONFIG_HEADERS libqpdf/qpdf/qpdf-config.h" ;; |
configure.ac
| @@ -6,7 +6,6 @@ AC_INIT([qpdf],[10.4.0]) | @@ -6,7 +6,6 @@ AC_INIT([qpdf],[10.4.0]) | ||
| 6 | 6 | ||
| 7 | AC_CONFIG_MACRO_DIR([m4]) | 7 | AC_CONFIG_MACRO_DIR([m4]) |
| 8 | AC_CONFIG_FILES([autoconf.mk]) | 8 | AC_CONFIG_FILES([autoconf.mk]) |
| 9 | -AC_CONFIG_FILES([manual/html.xsl manual/print.xsl]) | ||
| 10 | AC_CONFIG_FILES([libqpdf.pc]) | 9 | AC_CONFIG_FILES([libqpdf.pc]) |
| 11 | AC_CONFIG_FILES([libqpdf.map]) | 10 | AC_CONFIG_FILES([libqpdf.map]) |
| 12 | AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h]) | 11 | AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h]) |
| @@ -795,48 +794,10 @@ AC_ARG_ENABLE(show-failed-test-output, | @@ -795,48 +794,10 @@ AC_ARG_ENABLE(show-failed-test-output, | ||
| 795 | fi], | 794 | fi], |
| 796 | [SHOW_FAILED_TEST_OUTPUT=0]) | 795 | [SHOW_FAILED_TEST_OUTPUT=0]) |
| 797 | 796 | ||
| 798 | -AC_ARG_WITH(docbook-xsl, | ||
| 799 | - AS_HELP_STRING([--with-docbook-xsl=DIR], | ||
| 800 | - [location of docbook 4.x xml stylesheets]), | ||
| 801 | - [DOCBOOK_XSL=$withval], | ||
| 802 | - [DOCBOOK_XSL=/usr/share/xml/docbook/stylesheet/nwalsh]) | ||
| 803 | - | ||
| 804 | -DOCBOOK_XHTML= | ||
| 805 | -AC_SUBST(DOCBOOK_XHTML) | ||
| 806 | -AC_MSG_CHECKING(for xml to xhtml docbook stylesheets) | ||
| 807 | -if test -f "$DOCBOOK_XSL/xhtml/docbook.xsl"; then | ||
| 808 | - DOCBOOK_XHTML="$DOCBOOK_XSL/xhtml/docbook.xsl" | ||
| 809 | - AC_MSG_RESULT($DOCBOOK_XHTML) | ||
| 810 | -else | ||
| 811 | - AC_MSG_RESULT(no) | ||
| 812 | -fi | ||
| 813 | -DOCBOOK_FO= | ||
| 814 | -AC_SUBST(DOCBOOK_FO) | ||
| 815 | -AC_MSG_CHECKING(for xml to fo docbook stylesheets) | ||
| 816 | -if test -f "$DOCBOOK_XSL/fo/docbook.xsl"; then | ||
| 817 | - DOCBOOK_FO="$DOCBOOK_XSL/fo/docbook.xsl" | ||
| 818 | - AC_MSG_RESULT($DOCBOOK_FO) | ||
| 819 | -else | ||
| 820 | - AC_MSG_RESULT(no) | ||
| 821 | -fi | ||
| 822 | - | ||
| 823 | -DOCBOOKX_DTD= | ||
| 824 | -AC_SUBST(DOCBOOKX_DTD) | ||
| 825 | -AC_ARG_WITH(docbookx-dtd, | ||
| 826 | - AS_HELP_STRING([--with-docbookx-dtd=FILE], | ||
| 827 | - [location of docbook 4.x xml DTD]), | ||
| 828 | - [DOCBOOKX_DTD=$withval], | ||
| 829 | - [DOCBOOKX_DTD=/usr/share/xml/docbook/schema/dtd/4/docbookx.dtd]) | ||
| 830 | -AC_MSG_CHECKING(for docbook 4.x xml DTD) | ||
| 831 | -if test -f "$DOCBOOKX_DTD"; then | ||
| 832 | - AC_MSG_RESULT($DOCBOOKX_DTD) | ||
| 833 | -else | ||
| 834 | - AC_MSG_RESULT(no) | ||
| 835 | -fi | ||
| 836 | - | ||
| 837 | -AC_CHECK_PROG(FOP,fop,fop,[]) | ||
| 838 | -AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,[]) | ||
| 839 | -AC_CHECK_PROG(XMLLINT,xmllint,xmllint,[]) | 797 | +AC_CHECK_PROG(LATEX,latex,latex,[]) |
| 798 | +AC_CHECK_PROG(PDFLATEX,pdflatex,pdflatex,[]) | ||
| 799 | +AC_CHECK_PROG(LATEXMK,latexmk,latexmk,[]) | ||
| 800 | +AC_CHECK_PROG(SPHINX,sphinx-build,sphinx-build,[]) | ||
| 840 | 801 | ||
| 841 | AC_ARG_ENABLE(doc-maintenance, | 802 | AC_ARG_ENABLE(doc-maintenance, |
| 842 | AS_HELP_STRING([--enable-doc-maintenance], | 803 | AS_HELP_STRING([--enable-doc-maintenance], |
| @@ -870,17 +831,6 @@ AC_ARG_ENABLE(pdf-doc, | @@ -870,17 +831,6 @@ AC_ARG_ENABLE(pdf-doc, | ||
| 870 | BUILD_PDF=0; | 831 | BUILD_PDF=0; |
| 871 | fi], | 832 | fi], |
| 872 | [BUILD_PDF=$doc_default]) | 833 | [BUILD_PDF=$doc_default]) |
| 873 | -VALIDATE_DOC=0 | ||
| 874 | -AC_SUBST(VALIDATE_DOC) | ||
| 875 | -AC_ARG_ENABLE(validate-doc, | ||
| 876 | - AS_HELP_STRING([--enable-validate-doc], | ||
| 877 | - [whether to validate xml document source]), | ||
| 878 | - [if test "$enableval" = "yes"; then | ||
| 879 | - VALIDATE_DOC=1; | ||
| 880 | - else | ||
| 881 | - VALIDATE_DOC=0; | ||
| 882 | - fi], | ||
| 883 | - [VALIDATE_DOC=$doc_default]) | ||
| 884 | 834 | ||
| 885 | AC_SUBST(OSS_FUZZ) | 835 | AC_SUBST(OSS_FUZZ) |
| 886 | AC_ARG_ENABLE(oss-fuzz, | 836 | AC_ARG_ENABLE(oss-fuzz, |
| @@ -893,38 +843,31 @@ AC_ARG_ENABLE(oss-fuzz, | @@ -893,38 +843,31 @@ AC_ARG_ENABLE(oss-fuzz, | ||
| 893 | fi], | 843 | fi], |
| 894 | [OSS_FUZZ=0]) | 844 | [OSS_FUZZ=0]) |
| 895 | 845 | ||
| 896 | -if test "$VALIDATE_DOC" = "1"; then | ||
| 897 | - if test "$XMLLINT" = ""; then | ||
| 898 | - MISSING_XMLLINT=1 | ||
| 899 | - MISSING_ANY=1 | ||
| 900 | - fi | ||
| 901 | -fi | ||
| 902 | if test "$BUILD_HTML" = "1"; then | 846 | if test "$BUILD_HTML" = "1"; then |
| 903 | - if test "$XSLTPROC" = ""; then | ||
| 904 | - MISSING_XSLTPROC=1 | ||
| 905 | - MISSING_ANY=1 | ||
| 906 | - fi | ||
| 907 | - if test "$DOCBOOK_XHTML" = ""; then | ||
| 908 | - MISSING_DOCBOOK_XHTML=1 | 847 | + if test "$SPHINX" = ""; then |
| 848 | + MISSING_SPHINX=1 | ||
| 909 | MISSING_ANY=1 | 849 | MISSING_ANY=1 |
| 910 | fi | 850 | fi |
| 911 | fi | 851 | fi |
| 912 | if test "$BUILD_PDF" = "1"; then | 852 | if test "$BUILD_PDF" = "1"; then |
| 913 | - if test "$XSLTPROC" = ""; then | ||
| 914 | - MISSING_XSLTPROC=1 | 853 | + if test "$SPHINX" = ""; then |
| 854 | + MISSING_SPHINX=1 | ||
| 855 | + MISSING_ANY=1 | ||
| 856 | + fi | ||
| 857 | + if test "$LATEX" = ""; then | ||
| 858 | + MISSING_LATEX=1 | ||
| 915 | MISSING_ANY=1 | 859 | MISSING_ANY=1 |
| 916 | fi | 860 | fi |
| 917 | - if test "$DOCBOOK_FO" = ""; then | ||
| 918 | - MISSING_DOCBOOK_FO=1 | 861 | + if test "$LATEXMK" = ""; then |
| 862 | + MISSING_LATEXMK=1 | ||
| 919 | MISSING_ANY=1 | 863 | MISSING_ANY=1 |
| 920 | fi | 864 | fi |
| 921 | - if test "$FOP" = ""; then | ||
| 922 | - MISSING_FOP=1 | 865 | + if test "$PDFLATEX" = ""; then |
| 866 | + MISSING_PDFLATEX=1 | ||
| 923 | MISSING_ANY=1 | 867 | MISSING_ANY=1 |
| 924 | fi | 868 | fi |
| 925 | fi | 869 | fi |
| 926 | 870 | ||
| 927 | - | ||
| 928 | if test "$MISSING_ANY" = "1"; then | 871 | if test "$MISSING_ANY" = "1"; then |
| 929 | ISSUE_WARNINGS=1 | 872 | ISSUE_WARNINGS=1 |
| 930 | fi | 873 | fi |
| @@ -953,24 +896,20 @@ if test "$MISSING_JPEG" = "1"; then | @@ -953,24 +896,20 @@ if test "$MISSING_JPEG" = "1"; then | ||
| 953 | AC_MSG_WARN(unable to find required library jpeg) | 896 | AC_MSG_WARN(unable to find required library jpeg) |
| 954 | fi | 897 | fi |
| 955 | 898 | ||
| 956 | -if test "$MISSING_DOCBOOK_FO" = "1"; then | ||
| 957 | - AC_MSG_WARN(docbook fo stylesheets are required to build PDF documentation) | ||
| 958 | -fi | ||
| 959 | - | ||
| 960 | -if test "$MISSING_DOCBOOK_XHTML" = "1"; then | ||
| 961 | - AC_MSG_WARN(docbook xhmtl stylesheets are required to build HTML documentation) | 899 | +if test "$MISSING_LATEX" = "1"; then |
| 900 | + AC_MSG_WARN(latex is required to build PDF documentation) | ||
| 962 | fi | 901 | fi |
| 963 | 902 | ||
| 964 | -if test "$MISSING_FOP" = "1"; then | ||
| 965 | - AC_MSG_WARN(apache fop is required to build PDF documentation) | 903 | +if test "$MISSING_LATEXMK" = "1"; then |
| 904 | + AC_MSG_WARN(latexmk is required to build PDF documentation) | ||
| 966 | fi | 905 | fi |
| 967 | 906 | ||
| 968 | -if test "$MISSING_XMLLINT" = "1"; then | ||
| 969 | - AC_MSG_WARN(xmllint is required to validate documentation) | 907 | +if test "$MISSING_PDFLATEX" = "1"; then |
| 908 | + AC_MSG_WARN(pdflatex is required to build PDF documentation) | ||
| 970 | fi | 909 | fi |
| 971 | 910 | ||
| 972 | -if test "$MISSING_XSLTPROC" = "1"; then | ||
| 973 | - AC_MSG_WARN(xsltproc is required to build documentation) | 911 | +if test "$MISSING_SPHINX" = "1"; then |
| 912 | + AC_MSG_WARN(sphinx-build is required to build documentation) | ||
| 974 | fi | 913 | fi |
| 975 | 914 | ||
| 976 | if test "$ISSUE_WARNINGS" = "1"; then | 915 | if test "$ISSUE_WARNINGS" = "1"; then |
make/installwin.mk
| @@ -17,9 +17,10 @@ installwin: all | @@ -17,9 +17,10 @@ installwin: all | ||
| 17 | cp qpdf/$(OUTPUT_DIR)/fix-qdf.exe $(DEST)/bin | 17 | cp qpdf/$(OUTPUT_DIR)/fix-qdf.exe $(DEST)/bin |
| 18 | cp include/qpdf/*.h $(DEST)/include/qpdf | 18 | cp include/qpdf/*.h $(DEST)/include/qpdf |
| 19 | cp include/qpdf/*.hh $(DEST)/include/qpdf | 19 | cp include/qpdf/*.hh $(DEST)/include/qpdf |
| 20 | - cp doc/stylesheet.css $(DEST)/doc | ||
| 21 | if [ -f doc/qpdf-manual.html ]; then \ | 20 | if [ -f doc/qpdf-manual.html ]; then \ |
| 21 | + mkdir $(DEST)/doc/_static; \ | ||
| 22 | cp doc/qpdf-manual.html $(DEST)/doc; \ | 22 | cp doc/qpdf-manual.html $(DEST)/doc; \ |
| 23 | + cp doc/_static/* $(DEST)/doc/_static; \ | ||
| 23 | fi | 24 | fi |
| 24 | if [ -f doc/qpdf-manual.pdf ]; then \ | 25 | if [ -f doc/qpdf-manual.pdf ]; then \ |
| 25 | cp doc/qpdf-manual.pdf $(DEST)/doc; \ | 26 | cp doc/qpdf-manual.pdf $(DEST)/doc; \ |
make/libtool.mk
| @@ -120,6 +120,12 @@ install-libs: build_libqpdf | @@ -120,6 +120,12 @@ install-libs: build_libqpdf | ||
| 120 | 120 | ||
| 121 | # NOTE: If installing any new executables, remember to update the | 121 | # NOTE: If installing any new executables, remember to update the |
| 122 | # lambda layer code in build-scripts/build-appimage. | 122 | # lambda layer code in build-scripts/build-appimage. |
| 123 | + | ||
| 124 | +# NOTE: See comments in manual/build.mk about html documentation. | ||
| 125 | + | ||
| 126 | +# Ensure that installwin in make/installwin.mk is consistent with | ||
| 127 | +# this. | ||
| 128 | + | ||
| 123 | install: all install-libs | 129 | install: all install-libs |
| 124 | ./mkinstalldirs -m 0755 $(DESTDIR)$(bindir) | 130 | ./mkinstalldirs -m 0755 $(DESTDIR)$(bindir) |
| 125 | ./mkinstalldirs -m 0755 $(DESTDIR)$(docdir) | 131 | ./mkinstalldirs -m 0755 $(DESTDIR)$(docdir) |
| @@ -133,9 +139,10 @@ install: all install-libs | @@ -133,9 +139,10 @@ install: all install-libs | ||
| 133 | $(LIBTOOL) --mode=install ./install-sh \ | 139 | $(LIBTOOL) --mode=install ./install-sh \ |
| 134 | qpdf/$(OUTPUT_DIR)/fix-qdf \ | 140 | qpdf/$(OUTPUT_DIR)/fix-qdf \ |
| 135 | $(DESTDIR)$(bindir)/fix-qdf | 141 | $(DESTDIR)$(bindir)/fix-qdf |
| 136 | - ./install-sh -m 0644 doc/stylesheet.css $(DESTDIR)$(docdir) | ||
| 137 | if [ -f doc/qpdf-manual.html ]; then \ | 142 | if [ -f doc/qpdf-manual.html ]; then \ |
| 143 | + ./mkinstalldirs -m 0755 $(DESTDIR)$(docdir)/_static; \ | ||
| 138 | ./install-sh -m 0644 doc/qpdf-manual.html $(DESTDIR)$(docdir); \ | 144 | ./install-sh -m 0644 doc/qpdf-manual.html $(DESTDIR)$(docdir); \ |
| 145 | + ./install-sh -m 0644 doc/_static/* $(DESTDIR)$(docdir)/_static; \ | ||
| 139 | fi | 146 | fi |
| 140 | if [ -f doc/qpdf-manual.pdf ]; then \ | 147 | if [ -f doc/qpdf-manual.pdf ]; then \ |
| 141 | ./install-sh -m 0644 doc/qpdf-manual.pdf $(DESTDIR)$(docdir); \ | 148 | ./install-sh -m 0644 doc/qpdf-manual.pdf $(DESTDIR)$(docdir); \ |
make_dist
| @@ -78,7 +78,7 @@ if ($version ne $code_version) | @@ -78,7 +78,7 @@ if ($version ne $code_version) | ||
| 78 | } | 78 | } |
| 79 | if ($version ne $doc_version) | 79 | if ($version ne $doc_version) |
| 80 | { | 80 | { |
| 81 | - print "$whoami: qpdf-manual.xml version = $doc_version\n"; | 81 | + print "$whoami: doc version = $doc_version\n"; |
| 82 | $version_error = 1; | 82 | $version_error = 1; |
| 83 | } | 83 | } |
| 84 | if ($version ne $cli_version) | 84 | if ($version ne $cli_version) |
| @@ -153,11 +153,11 @@ sub get_version_from_source | @@ -153,11 +153,11 @@ sub get_version_from_source | ||
| 153 | 153 | ||
| 154 | sub get_version_from_manual | 154 | sub get_version_from_manual |
| 155 | { | 155 | { |
| 156 | - my $fh = safe_open("manual/qpdf-manual.xml"); | 156 | + my $fh = safe_open("manual/conf.py"); |
| 157 | my $doc_version = 'unknown'; | 157 | my $doc_version = 'unknown'; |
| 158 | while (<$fh>) | 158 | while (<$fh>) |
| 159 | { | 159 | { |
| 160 | - if (m/swversion "([^\"]+)\"/) | 160 | + if (m/release = '([^\']+)\'/) |
| 161 | { | 161 | { |
| 162 | $doc_version = $1; | 162 | $doc_version = $1; |
| 163 | last; | 163 | last; |
manual/build.mk
| 1 | -INDOC = manual/qpdf-manual | ||
| 2 | -OUTDOC = manual/$(OUTPUT_DIR)/qpdf-manual | 1 | +DOC_OUT := manual/$(OUTPUT_DIR) |
| 2 | +S_HTML_OUT := $(DOC_OUT)/singlehtml | ||
| 3 | +S_HTML_TARGET := $(S_HTML_OUT)/index.html | ||
| 4 | +HTML_OUT := $(DOC_OUT)/html | ||
| 5 | +HTML_TARGET := $(HTML_OUT)/index.html | ||
| 6 | +PDF_OUT := $(DOC_OUT)/latex | ||
| 7 | +PDF_TARGET := $(PDF_OUT)/qpdf.pdf | ||
| 3 | 8 | ||
| 4 | TARGETS_manual := doc/qpdf.1 doc/fix-qdf.1 doc/zlib-flate.1 | 9 | TARGETS_manual := doc/qpdf.1 doc/fix-qdf.1 doc/zlib-flate.1 |
| 5 | ifeq ($(BUILD_HTML),1) | 10 | ifeq ($(BUILD_HTML),1) |
| 6 | -TARGETS_manual += doc/qpdf-manual.html | 11 | +TARGETS_manual += doc/qpdf-manual.html $(HTML_TARGET) |
| 7 | endif | 12 | endif |
| 8 | ifeq ($(BUILD_PDF),1) | 13 | ifeq ($(BUILD_PDF),1) |
| 9 | TARGETS_manual += doc/qpdf-manual.pdf | 14 | TARGETS_manual += doc/qpdf-manual.pdf |
| 10 | endif | 15 | endif |
| 11 | 16 | ||
| 12 | -VALIDATE=manual/$(OUTPUT_DIR)/validate | ||
| 13 | - | ||
| 14 | -ifeq ($(VALIDATE_DOC),1) | ||
| 15 | - | ||
| 16 | -$(VALIDATE): $(INDOC).xml | ||
| 17 | - $(XMLLINT) --noout --dtdvalid $(DOCBOOKX_DTD) $< | ||
| 18 | - touch $(VALIDATE) | ||
| 19 | - | ||
| 20 | -else | ||
| 21 | - | ||
| 22 | -$(VALIDATE): | ||
| 23 | - touch $(VALIDATE) | ||
| 24 | - | ||
| 25 | -endif | ||
| 26 | - | ||
| 27 | -$(OUTDOC).pdf: $(OUTDOC).fo qpdf/build/qpdf | ||
| 28 | - $(FOP) $< -pdf $@.tmp | ||
| 29 | - qpdf/build/qpdf --linearize --object-streams=generate \ | ||
| 30 | - --recompress-flate --compression-level=9 $@.tmp $@ | ||
| 31 | - | ||
| 32 | -$(OUTDOC).html: $(INDOC).xml manual/html.xsl $(VALIDATE) | ||
| 33 | - $(XSLTPROC) --output $@ manual/html.xsl $< | 17 | +# Prevent targets that run $(SPHINX) from running in parallel by using |
| 18 | +# order-only dependencies (the dependencies listed after the |) to | ||
| 19 | +# avoid clashes in temporary files that cause the build to fail with | ||
| 20 | +# the error "_pickle.UnpicklingError: pickle data was truncated" | ||
| 21 | +$(HTML_TARGET): manual/index.rst | ||
| 22 | + $(SPHINX) -M html manual $(DOC_OUT) -W | ||
| 23 | + | ||
| 24 | +$(S_HTML_TARGET): manual/index.rst | $(HTML_TARGET) | ||
| 25 | + $(SPHINX) -M singlehtml manual $(DOC_OUT) -W | ||
| 26 | + | ||
| 27 | +$(PDF_TARGET): manual/index.rst | $(S_HTML_TARGET) $(HTML_TARGET) | ||
| 28 | + $(SPHINX) -M latexpdf manual $(DOC_OUT) -W | ||
| 29 | + | ||
| 30 | +# This depends on sphinx-build's singlehtml target creating index.html | ||
| 31 | +# and a _static directory. If that changes, this code has to be | ||
| 32 | +# adjusted. It will also be necessary to adjust the install target in | ||
| 33 | +# make/libtool.mk. | ||
| 34 | +doc/qpdf-manual.html: $(S_HTML_TARGET) | ||
| 35 | + mkdir -p doc | ||
| 36 | + @if [ "$(shell find $(S_HTML_OUT)/ -mindepth 1 -type d -print)" != \ | ||
| 37 | + "$(S_HTML_OUT)/_static" ]; then \ | ||
| 38 | + echo "***"; \ | ||
| 39 | + echo Expected only directory in $(S_HTML_OUT) to be _static; \ | ||
| 40 | + echo "***"; \ | ||
| 41 | + false; \ | ||
| 42 | + fi | ||
| 43 | + cp $< $@ | ||
| 44 | + mkdir -p doc/_static | ||
| 45 | + cp -p $(S_HTML_OUT)/_static/* doc/_static | ||
| 34 | 46 | ||
| 35 | -.PRECIOUS: $(OUTDOC).fo | ||
| 36 | -$(OUTDOC).fo: $(INDOC).xml manual/print.xsl $(VALIDATE) | ||
| 37 | - $(XSLTPROC) --output $@ manual/print.xsl $< | 47 | +doc/qpdf-manual.pdf: $(PDF_TARGET) |
| 48 | + mkdir -p doc | ||
| 49 | + cp $< $@ | ||
| 38 | 50 | ||
| 39 | doc/%.1: manual/%.1.in | 51 | doc/%.1: manual/%.1.in |
| 52 | + mkdir -p doc | ||
| 40 | sed -e 's:@PACKAGE_VERSION@:$(PACKAGE_VERSION):g' \ | 53 | sed -e 's:@PACKAGE_VERSION@:$(PACKAGE_VERSION):g' \ |
| 41 | -e 's:@docdir@:$(docdir):g' \ | 54 | -e 's:@docdir@:$(docdir):g' \ |
| 42 | < $< > $@ | 55 | < $< > $@ |
| 43 | - | ||
| 44 | -doc/%: manual/$(OUTPUT_DIR)/% | ||
| 45 | - cp $< $@ |