automake now checks for dblatex and the pdf version
authorBernd Porr <berndporr@f2s.com>
Mon, 23 Apr 2012 11:22:16 +0000 (12:22 +0100)
committerBernd Porr <berndporr@f2s.com>
Mon, 23 Apr 2012 11:22:16 +0000 (12:22 +0100)
of the comedi manual is now generated

configure.ac
doc/Makefile.am

index 82c400ff8db884baac61544725a0c834817cf590..88dabf564daf7711d3187d0a6be1dd0c8dc17674 100644 (file)
@@ -180,10 +180,16 @@ if test "$ENABLE_DOCBOOK" == "yes"; then
        if test "$XMLTO" = "no" ; then
                AC_MSG_WARN([xmlto not found, will not be able to rebuild documentation])
        fi
+       AC_PATH_PROG(DBLATEX, dblatex, no)
+        if test "$DBLATEX" = "no" ; then
+                AC_MSG_WARN([dblatex not found, will not be able to generate pdfs])
+        fi
 else
        XMLTO="no"
+       DBLATEX="no"
 fi
 AM_CONDITIONAL(HAVE_XMLTO, [test "$XMLTO" != "no"])
+AM_CONDITIONAL(HAVE_DBLATEX, [test "$DBLATEX" != "no"])
 
 pcmciadir="\${sysconfdir}/pcmcia"
 AC_SUBST(pcmciadir)
index f304226b936576f7584827856af3ded2862680fe..be4fb6300fba4df43369da329c7741d6afdac01d 100644 (file)
@@ -20,8 +20,11 @@ all_html = $(srcdir)/doc_html
 install_html = install_html
 uninstall_html = uninstall_html
 
-# dist_pdf_DATA = comedilib.pdf
+if HAVE_DBLATEX
+dist_pdf_DATA = comedilib.pdf
+else
 dist_pdf_DATA =
+endif
 
 all_man = $(srcdir)/man
 install_man = install_man
@@ -74,7 +77,7 @@ uninstall_man:
        for each in `find $(srcdir)/man/ -name '*.3'`; do $(RM) $(DESTDIR)$(mandir)/man3/`basename $$each` ; done
 
 comedilib.pdf: $(XML)
-       $(XMLTO) -o $(srcdir)/pdf --skip-validation pdf $(srcdir)/comedilib.xml
+       $(DBLATEX) -o $(srcdir)/pdf -t pdf $(srcdir)/comedilib.xml
 
 funcref.xml: funcref mkref
        $(srcdir)/mkref $(srcdir)/funcref >$(srcdir)/funcref.xml