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 ee175db..abaec2c 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 67033e8..4dfb309 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)