[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: [PATCH] build-sys: Add check for groff html driver. [2836109]



Some distributions, such as Ubuntu, do not install the groff HTML
device by default, and an additional package must be installed to
provide it. AX_PROG_GROFF therefore needs to check that groff is able
to create HTML files.
---

Hi Stefan,

Can you please try this out and see if gEDA builds successfully when you have
the `groff-base' package installed, but not the `groff' package?

Cheers,

                                         Peter



 gsymcheck/docs/Makefile.am |    2 +-
 m4/geda-groff.m4           |   21 ++++++++++++++++++---
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/gsymcheck/docs/Makefile.am b/gsymcheck/docs/Makefile.am
index 576a955..366b828 100644
--- a/gsymcheck/docs/Makefile.am
+++ b/gsymcheck/docs/Makefile.am
@@ -10,7 +10,7 @@ docsmandir = $(docdir)/man
 docsman_DATA = gsymcheck.html
 
 .1.html:
-if ENABLE_GROFF
+if ENABLE_GROFF_HTML
 	LC_NUMERIC=C $(GROFF) -man -T html $< > $@.tmp \
 	  && mv -f $@.tmp $@
 else
diff --git a/m4/geda-groff.m4 b/m4/geda-groff.m4
index 8181a57..a0c7881 100644
--- a/m4/geda-groff.m4
+++ b/m4/geda-groff.m4
@@ -1,7 +1,7 @@
 # geda-groff.m4                                         -*-Autoconf-*-
 # serial 1
 
-dnl Carry out configuration tasks needed by desktop-i18n tool
+dnl Look for GNU troff
 dnl Copyright (C) 2009  Peter Brett <peter@xxxxxxxxxxxxx>
 dnl
 dnl This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,21 @@ AC_DEFUN([AX_PROG_GROFF],
   AC_ARG_VAR([GROFF], [Path to groff executable])
   AC_CHECK_PROG([GROFF], [groff], [groff], [no])
 
-  AM_CONDITIONAL([ENABLE_GROFF],
-                 [test "X$groff" != Xno])
+  # Some distros are annoying and package groff into a crippled
+  # version without many of the drivers, along with a separate full
+  # version.  So explicitly check for the html driver.
+  if test "X$GROFF" != "Xno" ; then
+    AC_MSG_CHECKING([whether $GROFF has an html driver])
+    echo '.TH conftest 1 "January 1st, 1970" Version 1' > conftest.1
+    if LC_NUMERIC=C $GROFF -man -T html > /dev/null 2>&AS_MESSAGE_LOG_FD; then
+      HAVE_GROFF_HTML=yes
+    else
+      HAVE_GROFF_HTML=no
+    fi
+    rm -f conftest.1
+    AC_MSG_RESULT([$HAVE_GROFF_HTML])
+  fi
+
+  AM_CONDITIONAL([ENABLE_GROFF_HTML],
+                 [test "X$HAVE_GROFF_HTML" != Xno])
 ])dnl AX_PROG_GROFF
-- 
1.6.3.2.225.gb8364

-- 
Peter Brett <peter@xxxxxxxxxxxxx>
Remote Sensing Research Group
Surrey Space Centre


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user