diff --git a/acinclude.m4 b/acinclude.m4 index eea7df8630..05ab22f61a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -259,6 +259,10 @@ AC_ARG_WITH([docbook-stylesheets], enable_login="no" +dnl Check whether kindlegen exists. If not, we'll suppress that part of the +dnl documentation build. +AC_CHECK_PROGS([KINDLEGEN], [kindlegen]) + dnl weird ass systems dnl AC_AIX AC_ISC_POSIX diff --git a/doc/xml/AdminGuide/Makefile.in b/doc/xml/AdminGuide/Makefile.in index 8bcc3322ab..b60c80a6b8 100644 --- a/doc/xml/AdminGuide/Makefile.in +++ b/doc/xml/AdminGuide/Makefile.in @@ -50,7 +50,9 @@ $(BOOK).epub: $(SRCS) fi $(BOOK).mobi: $(BOOK).epub - kindlegen $(BOOK).epub -o $(BOOK).mobi + if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \ + kindlegen $(BOOK).epub -o $(BOOK).mobi; \ + fi check: xmllint --noout --valid $(BOOK).xml diff --git a/doc/xml/QuickStartUnix/Makefile.in b/doc/xml/QuickStartUnix/Makefile.in index 594bc6cc2d..b40a9b973d 100644 --- a/doc/xml/QuickStartUnix/Makefile.in +++ b/doc/xml/QuickStartUnix/Makefile.in @@ -48,7 +48,9 @@ $(BOOK).epub: $(SRCS) fi $(BOOK).mobi: $(BOOK).epub - kindlegen $(BOOK).epub -o $(BOOK).mobi + if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \ + kindlegen $(BOOK).epub -o $(BOOK).mobi; \ + fi check: xmllint --noout --valid $(BOOK).xml diff --git a/doc/xml/UserGuide/Makefile.in b/doc/xml/UserGuide/Makefile.in index 42e40532a4..aeb28abf5a 100644 --- a/doc/xml/UserGuide/Makefile.in +++ b/doc/xml/UserGuide/Makefile.in @@ -47,7 +47,9 @@ $(BOOK).epub: $(SRCS) fi $(BOOK).mobi: $(BOOK).epub - kindlegen $(BOOK).epub -o $(BOOK).mobi + if test -n "$(KINDLEGEN)" && test -x "$(DBTOEPUB)" ; then \ + kindlegen $(BOOK).epub -o $(BOOK).mobi; \ + fi check: xmllint --noout --valid $(BOOK).xml