[PATCH util-macros] XORG_WITH_GROFF: add HAVE_GROFF_HTML Automake conditional

Gaetan Nadon memsize at videotron.ca
Sun Jun 20 16:51:52 PDT 2010


On Sun, 2010-06-20 at 16:48 -0400, Gaetan Nadon wrote:

> > 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])
> 
> 

I agree with the concept of black box testing (or feature check) and I
gave it a try.
In order to exercise the dependencies, an "extremely minimal troff stub"
will not do.
There needs to be an image to exercise the pnm* commands. There is no
telling how a document
might get crippled if a dependency is missing. If was easy this time to
identify zero byte images,
but what if a table or an equation is defaced? We are back to square
one.

On Ubuntu as well the dependencies are only "Recommends". This is likely
to happen on all
distros/OS. I am afraid the best we can do (within reasonable effort) is
to check for the documented
dependencies. At least they are documented! Unless someone has another
idea.


        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.

There is always a risk that they change over time, but that's life. I
should add a warning message
referring users to the grohtml man pages. They will need a little help
here.

Gaetan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100620/e4dd02e1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100620/e4dd02e1/attachment.pgp>


More information about the xorg-devel mailing list