doc: Skip .pdf generation when asciidoctor-pdf is missing
authorKeith Packard <keithp@keithp.com>
Thu, 3 Jan 2019 06:02:42 +0000 (22:02 -0800)
committerKeith Packard <keithp@keithp.com>
Thu, 3 Jan 2019 06:02:42 +0000 (22:02 -0800)
Not available in debian unstable yet

Signed-off-by: Keith Packard <keithp@keithp.com>
configure.ac
doc/Makefile.am

index ee175dbe38b3c846081d1e6dea395314855a8f6a..abaec2cdb7d25df3c1240755438babf8f8cfa39f 100644 (file)
@@ -386,6 +386,12 @@ if test "x$HAVE_NICKLE" = "xno"; then
        AC_MSG_ERROR([Please install nickle to build AltOs])
 fi
 
+AC_CHECK_PROG([HAVE_ASCIIDOCTOR_PDF], [asciidoctor-pdf], yes, no)
+if test "x$HAVE_ASCIIDOCTOR_PDF" = "xno"; then
+       AC_MSG_WARN([asciidoctor-pdf not found, PDF docs will not be built])
+fi
+AM_CONDITIONAL([ASCIIDOCTOR_PDF], [test x$HAVE_ASCIIDOCTOR_PDF != xno])
+
 PKG_CHECK_MODULES([JANSSON], [jansson])
 
 AC_ARG_WITH([readline],
index 67033e8be30633ce85c5989ce6a461d9b959ad50..4dfb309431a11e92c396ddb4cb44201b7c7b3afe 100644 (file)
@@ -225,8 +225,10 @@ PUBLISH_HTML=altusmetrum.html micropeak.html telegps.html easymini.html $(ONEFIL
 
 HTML=$(PUBLISH_HTML) $(RELNOTES_HTML)
 
+if ASCIIDOCTOR_PDF
 PDF=altusmetrum.pdf micropeak.pdf telegps.pdf easymini.pdf $(ONEFILE_PDF_FILES) \
        $(OUTLINE_PDF_FILES)
+endif
 
 MAP_DOT_FILES=map-loading.dot
 MAP_SVG_FILES=$(MAP_DOT_FILES:.dot=.svg)