[gimp-help/gimp-help-2-10] Fix: we did not check for the presence of rsvg-convert in configure



commit 2706246385b093709632784c6fe26f7ca0216cff
Author: Jacob Boerema <jgboerema gmail com>
Date:   Tue Jul 19 16:29:24 2022 -0400

    Fix: we did not check for the presence of rsvg-convert in configure

 configure.ac               | 10 ++++++++++
 quickreference/Makefile.am |  7 +++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1ca0e0b65..7dfe378af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,6 +138,16 @@ AM_CONDITIONAL(HAVE_DBLATEX, test -n "$DBLATEX")
 DBLATEXFLAGS="--backend=xetex --style=db2latex --verbose"
 AC_SUBST(DBLATEXFLAGS)
 
+#  Search for rsvg-convert used for building quickreference PDF's
+
+AC_PATH_PROG(SVG2PDF, rsvg-convert)
+if test -z "$SVG2PDF"; then
+  AC_MSG_NOTICE([cannot find rsvg-convert(1), Quickreference PDF generation disabled])
+fi
+
+AM_CONDITIONAL(HAVE_SVG2PDF, test -n "$SVG2PDF")
+SVG2PDF_FLAGS="-a -f pdf"
+AC_SUBST(SVG2PDF_FLAGS)
 
 #  Search for docbook2odf
 
diff --git a/quickreference/Makefile.am b/quickreference/Makefile.am
index 04a20624a..bd0d1411c 100644
--- a/quickreference/Makefile.am
+++ b/quickreference/Makefile.am
@@ -71,8 +71,9 @@ svg/gimp-keys-%.svg: xml/gimp-keys-%.xml stylesheets/keys-svg.xsl
 
 svg: $(foreach lang,$(QUICKREFERENCE_LINGUAS),svg/gimp-keys-$(lang).svg)
 
-SVG2PDF = rsvg-convert
-SVG2PDF_FLAGS = -a -f pdf
+# Quickreference PDF generation
+
+if HAVE_SVG2PDF
 
 pdf/gimp-keys-%.pdf: svg/gimp-keys-%.svg
        @$(MKDIR_P) pdf
@@ -82,6 +83,8 @@ pdf/gimp-keys-%.pdf: svg/gimp-keys-%.svg
 
 pdf-local: $(foreach lang,$(QUICKREFERENCE_LINGUAS),pdf/gimp-keys-$(lang).pdf)
 
+endif
+
 docbook/gimp-keys-%.xml: xml/gimp-keys-%.xml stylesheets/keys-docbook.xsl
        @$(MKDIR_P) docbook
        @echo "*** Making Quickreference docbook ($*) ..."


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]