autoconf: check for the AsciiDoc and XmlTo document tools
authorJonas Fonseca <fonseca@diku.dk>
Mon, 20 Aug 2007 21:12:46 +0000 (23:12 +0200)
committerJonas Fonseca <fonseca@diku.dk>
Tue, 21 Aug 2007 11:08:15 +0000 (13:08 +0200)
Makefile
TODO
config.make.in
configure.ac

index ff62390..033d104 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,9 @@ override CFLAGS += '-DVERSION="$(VERSION)"'
 
 AUTOHEADER ?= autoheader
 AUTOCONF ?= autoconf
+ASCIIDOC ?= asciidoc
+XMLTO ?= xmlto
+DOCBOOK2PDF ?= docbook2pdf
 
 all: $(PROGS)
 all-debug: $(PROGS)
@@ -139,34 +142,34 @@ manual.toc: manual.txt
                esac; done | sed 's/\[\[\(.*\)\]\]/\1/' > $@
 
 README.html: README
-       asciidoc -b xhtml11 -d article -a readme $<
+       $(ASCIIDOC) -b xhtml11 -d article -a readme $<
 
 %.pdf : %.xml
-       docbook2pdf $<
+       $(DOCBOOK2PDF) $<
 
 %.1.html : %.1.txt
-       asciidoc -b xhtml11 -d manpage $<
+       $(ASCIIDOC) -b xhtml11 -d manpage $<
 
 %.1.xml : %.1.txt
-       asciidoc -b docbook -d manpage -aversion=$(VERSION) $<
+       $(ASCIIDOC) -b docbook -d manpage -aversion=$(VERSION) $<
 
 %.1 : %.1.xml
-       xmlto -m manpage.xsl man $<
+       $(XMLTO) -m manpage.xsl man $<
 
 %.5.html : %.5.txt
-       asciidoc -b xhtml11 -d manpage $<
+       $(ASCIIDOC) -b xhtml11 -d manpage $<
 
 %.5.xml : %.5.txt
-       asciidoc -b docbook -d manpage -aversion=$(VERSION) $<
+       $(ASCIIDOC) -b docbook -d manpage -aversion=$(VERSION) $<
 
 %.5 : %.5.xml
-       xmlto -m manpage.xsl man $<
+       $(XMLTO) -m manpage.xsl man $<
 
 %.html : %.txt
-       asciidoc -b xhtml11 -d article -n $<
+       $(ASCIIDOC) -b xhtml11 -d article -n $<
 
 %.xml : %.txt
-       asciidoc -b docbook -d article $<
+       $(ASCIIDOC) -b docbook -d article $<
 
 %.html-chunked : %.xml
-       xmlto html -o $@ $<
+       $(XMLTO) html -o $@ $<
diff --git a/TODO b/TODO
index 8e18e60..fdde1af 100644 (file)
--- a/TODO
+++ b/TODO
@@ -22,7 +22,5 @@ Features that should be explored.
    part of the commit detail information you display on the lower pane
    (log/diff view).
 
- - Use autoconf to check for the AsciiDoc and XmlTo document tools.
-
  - Use non-blocking I/O + select() for incremental loading of view
    input. (debian bug #427093)
index aab449b..9a462db 100644 (file)
@@ -7,3 +7,6 @@ bindir = @bindir@
 mandir = @mandir@
 docdir = @docdir@
 datarootdir = @datarootdir@
+ASCIIDOC = @ASCIIDOC@
+XMLTO = @XMLTO@
+DOCBOOK2PDF = @DOCBOOK2PDF@
index 0c060ce..f60d43e 100644 (file)
@@ -50,6 +50,9 @@ fi
 AC_PROG_CC
 AC_CHECK_PROGS(GIT_CONFIG, [git-config git-repo-config])
 AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config program])
+AC_CHECK_PROGS(ASCIIDOC, [asciidoc false])
+AC_CHECK_PROGS(XMLTO, [xmlto false])
+AC_CHECK_PROGS(DOCBOOK2PDF, [docbook2pdf false])
 
 AC_CONFIG_FILES([config.make])
 AC_OUTPUT