[PATCH:xman 2/2] configure: check for groff and enable groff extensions if found

Gaetan Nadon memsize at videotron.ca
Sat Apr 20 13:20:05 PDT 2013


On 13-04-20 03:03 PM, Dan Nicholson wrote:
> On Sat, Apr 20, 2013 at 11:28 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
>> On 13-04-20 01:08 PM, Alan Coopersmith wrote:
>>> Check for groff never got translated from imake to autoconf
>>>
>>> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
>>> ---
>>>  configure.ac |    5 +++++
>>>  defs.h       |    4 ++++
>>>  2 files changed, 9 insertions(+)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 74a6fc8..b9920bd 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -37,6 +37,11 @@ AC_CONFIG_HEADERS([config.h])
>>>
>>>  AC_CANONICAL_HOST
>>>
>>> +AC_CHECK_PROG([GROFF], [groff], [found], [missing])
>>> +if test "x$GROFF" = "xfound" ; then
>>> +   AC_DEFINE([HAS_GROFF], 1, [Define to 1 if you have the groff package.])
>>> +fi
>>> +
>>>  AC_CHECK_FUNCS([mkstemp])
>>>
>>>  AC_ARG_WITH(helpdir,
>>> diff --git a/defs.h b/defs.h
>>> index b4cd434..fe09b6b 100644
>>> --- a/defs.h
>>> +++ b/defs.h
>>> @@ -34,6 +34,10 @@ from the X Consortium.
>>>   * Created:   October 22, 1987
>>>   */
>>>
>>> +#ifdef HAVE_CONFIG_H
>>> +# include "config.h"
>>> +#endif
>>> +
>>>  #ifndef HELPFILE
>>>  #define HELPFILE "/usr/lib/X11/xman.help"  /* name of the default helpfile. */
>>>  #endif
>> Alternatively, you can use XORG_WITH_GROFF macro and benefit from all
>> the features. This was used in many docs before the move to DocBook. In
>> any case you probably want to use HAVE_xx to follow the convention used
>> by Automake elsewhere.
> That's a good point, but the "usage" of groff is different in this
> case. groff isn't being used to generate any documentation, it's
> simply being used to detect if xman should use groff features in it's
> output. Alan's patch simply uses the existence of groff on the system
> to decide whether to build the groff features into xman or not. So,
> the macro would check for a lot of things not actually used. On the
> other hand, you'd get a --with-groff for free to give the user full
> control of whether to use groff or not...
I suspected it would be overkill. I am ok either way.

Thanks!


>
> --
> Dan
>



More information about the xorg-devel mailing list