[PATCH libxtrans] config: XORG_WITH_GROFF: use HAVE_GROFF_HTML conditional

Gaetan Nadon memsize at videotron.ca
Wed Jun 23 10:14:03 PDT 2010


Groff uses grohtml to generate html output format. This program, in turn,
uses a number of pnm* commands from the netpbm package, psselect
from the psutils package and the ghostscript package.

These are independently installed, so they could be missing.
Skip the HTML output format if one of the dependencies is missing.
The version 1.9 of the util-macros package is required.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 Makefile.am  |    9 +++++++--
 configure.ac |    6 +++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 928614c..aaa919a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,8 +42,11 @@ printable_format = .ps
 endif
 
 doc_DATA =	$(doc_sources:.mm=.txt) \
-		$(doc_sources:.mm=$(printable_format)) \
-		$(doc_sources:.mm=.html)
+		$(doc_sources:.mm=$(printable_format))
+
+if HAVE_GROFF_HTML
+doc_DATA +=	$(doc_sources:.mm=.html)
+endif
 
 CLEANFILES = $(doc_DATA)
 MOSTLYCLEANFILES = index.*
@@ -65,8 +68,10 @@ SUFFIXES = .mm .ps .txt .html .pdf
 	$(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
 	 $< 2> index.$@.raw > $@
 
+if HAVE_GROFF_HTML
 .mm.html:
 	$(AM_V_GEN) $(GROFF) -Thtml $(GROFF_FLAGS) $< 2> index.$@.raw > $@
+endif
 
 .ps.pdf:
 	$(AM_V_GEN) $(PS2PDF) $< $@
diff --git a/configure.ac b/configure.ac
index 6dad5a2..1f22f0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,10 +25,10 @@ AC_INIT(xtrans, [1.2.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xor
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-# Require xorg-macrosr: XORG_DEFAULT_OPTIONS
+# Require xorg-macros: XORG_WITH_GROFF for HAVE_GROFF_HTML
 m4_ifndef([XORG_MACROS_VERSION],
-	  [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.6)
+	  [m4_fatal([must install xorg-macros 1.9 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.9)
 XORG_DEFAULT_OPTIONS
 XORG_ENABLE_DOCS
 XORG_WITH_GROFF
-- 
1.6.0.4


There are about 8 makfiles to fix in a similar way.


More information about the xorg-devel mailing list