From c692b4e4a2fcddbde05187d2d37c228f91d36274 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 20 Aug 2007 23:12:46 +0200 Subject: [PATCH] autoconf: check for the AsciiDoc and XmlTo document tools --- Makefile | 25 ++++++++++++++----------- TODO | 2 -- config.make.in | 3 +++ configure.ac | 3 +++ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index ff62390..033d104 100644 --- 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 --- 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) diff --git a/config.make.in b/config.make.in index aab449b..9a462db 100644 --- a/config.make.in +++ b/config.make.in @@ -7,3 +7,6 @@ bindir = @bindir@ mandir = @mandir@ docdir = @docdir@ datarootdir = @datarootdir@ +ASCIIDOC = @ASCIIDOC@ +XMLTO = @XMLTO@ +DOCBOOK2PDF = @DOCBOOK2PDF@ diff --git a/configure.ac b/configure.ac index 0c060ce..f60d43e 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.32.0.93.g670b81a890