From: Masamichi Hosoda Date: Fri, 4 Nov 2016 12:33:09 +0000 (+0900) Subject: Issue 5000/1: Add checking Ghostscript 9.20+ and Extract PDFmark X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=fe4e0f1ceb493437ff510565aa7c501ea959d0a7;p=lilypond.git Issue 5000/1: Add checking Ghostscript 9.20+ and Extract PDFmark This commit adds checking Ghostscript 9.20+ and Extract PDFmark. They can reduce the disk space required for document building. They also can reduce the size of generated PDF document files. Even if they are missing, you can build documents. Ghostscript 9.20+: It is necessary for string named destinations. Ghostscript 9.19 and prior cannot handle them. http://bugs.ghostscript.com/show_bug.cgi?id=696974 Extract PDFmark: It is necessary for preserving named destinations and page mode. https://github.com/trueroad/extractpdfmark http://www.ctan.org/pkg/extractpdfmark --- diff --git a/config.make.in b/config.make.in index d376a59f48..3bf17671a0 100644 --- a/config.make.in +++ b/config.make.in @@ -38,6 +38,8 @@ PACKAGE_NAME = @PACKAGE_NAME@ HOST_ARCH=@HOST_ARCH@ +USE_EXTRACTPDFMARK=@USE_EXTRACTPDFMARK@ + ################################################################ ## FILESYSTEM ################################################################ @@ -110,12 +112,14 @@ DBLATEX = @DBLATEX@ DEFINES = @DEFS@ @DEFINES@ DEFS = @DEFS@ DOCUMENTATION = @DOCUMENTATION@ +EXTRACTPDFMARK = @EXTRACTPDFMARK@ FIND = @FIND@ FCLIST = @FCLIST@ FLEX = @FLEX@ FLEXLEXER_FILE = @FLEXLEXER_FILE@ FONTFORGE = @FONTFORGE@ GROFF = @GROFF@ +GS920 = @GS920@ GUILE = @GUILE@ GUILE_CFLAGS = @GUILE_CFLAGS@ GUILE_CONFIG = @GUILE_CONFIG@ diff --git a/configure.ac b/configure.ac index 19ffd18bf3..d77ea15881 100644 --- a/configure.ac +++ b/configure.ac @@ -281,6 +281,30 @@ fi STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, $DOCUMENTATION_REQUIRED, 8.60) +AC_SUBST(GS920) +AC_SUBST(EXTRACTPDFMARK) +AC_SUBST(USE_EXTRACTPDFMARK) +STEPMAKE_PROGS(GS920, gs, OPTIONAL, 9.20) +STEPMAKE_PROGS(EXTRACTPDFMARK, extractpdfmark, OPTIONAL) +req=`STEPMAKE_NUMERIC_VERSION(9.20)` +USE_EXTRACTPDFMARK=yes +if test "$GS920_VERSION" -lt "$req"; then + GS920= + USE_EXTRACTPDFMARK=no +fi +if test "$EXTRACTPDFMARK" != "extractpdfmark"; then + EXTRACTPDFMARK= + USE_EXTRACTPDFMARK=no +fi +if test "$USE_EXTRACTPDFMARK" != "yes"; then + STEPMAKE_ADD_ENTRY(OPTIONAL, + ["(Optionally using Ghostscript >= 9.20 together with"]) + STEPMAKE_ADD_ENTRY(OPTIONAL, + [" Extract PDFmark can significantly reduce the disk space required"]) + STEPMAKE_ADD_ENTRY(OPTIONAL, + [" for building the documentation and the final PDF files.)"]) +fi + STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.11) STEPMAKE_PROGS(TEXI2HTML, texi2html, $DOCUMENTATION_REQUIRED, 1.82) STEPMAKE_PROGS(DBLATEX, dblatex, $DOCUMENTATION_REQUIRED, 0.1.4)