<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Sun, 2010-06-20 at 16:48 -0400, Gaetan Nadon wrote:
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
No, just testing the tools capabilities like libtool does to $CC. I'm
not checking the details (especially about the troff, which I know
nothing about), but here's what I basically had in mind.
AC_MSG_CHECKING([for working grohtml])
cat > conftest.ms << "EOF"
... some extremely minimal troff stub ...
EOF
if AC_RUN_LOG([$GROFF -T html conftest.ms]); then
have_grohtml=yes
else
have_grohtml=no
fi
# clean up output (not sure about the names)
rm -f conftest.html conftest*.png
AM_CONDITIONAL([HAVE_GROFF_HTML], [test $have_grohtml = yes])
</PRE>
</BLOCKQUOTE>
<BR>
</BLOCKQUOTE>
I agree with the concept of black box testing (or feature check) and I gave it a try.<BR>
In order to exercise the dependencies, an "extremely minimal troff stub" will not do.<BR>
There needs to be an image to exercise the pnm* commands. There is no telling how a document<BR>
might get crippled if a dependency is missing. If was easy this time to identify zero byte images,<BR>
but what if a table or an equation is defaced? We are back to square one.<BR>
<BR>
On Ubuntu as well the dependencies are only "Recommends". This is likely to happen on all<BR>
distros/OS. I am afraid the best we can do (within reasonable effort) is to check for the documented<BR>
dependencies. At least they are documented! Unless someone has another idea.<BR>
<BR>
<BLOCKQUOTE>
<PRE>
DEPENDENCIES
grohtml is dependent upon the png utilities (pnmcut, pnmcrop, pnmtopng)
and GhostScript (gs). pnmtopng (version 2.37.6 or greater) and pnmcut
from the netpbm package (version 9.16 or greater) will work also. It
is also dependent upon psselect from the PSUtils package. Images are
generated whenever a table, picture, equation or line is encountered.
</PRE>
</BLOCKQUOTE>
There is always a risk that they change over time, but that's life. I should add a warning message<BR>
referring users to the grohtml man pages. They will need a little help here.<BR>
<BR>
Gaetan<BR>
<BR>
<BR>
</BODY>
</HTML>