[PATCH:xman 2/2] configure: check for groff and enable groff extensions if found
Jamey Sharp
jamey at minilop.net
Sun Apr 21 13:33:02 PDT 2013
I confess I'm missing the context here, but it sounds like this should be a
runtime check, not build-time... shouldn't it?
Jamey
On Apr 21, 2013 10:19 AM, "Alan Coopersmith" <alan.coopersmith at oracle.com>
wrote:
> On 04/20/13 11:28 AM, Gaetan Nadon 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.
>>
>
> Thanks - I'd forgotten about that macro. It's tempting to use it for the
> --with-groff flag as Dan mentioned, though I wonder if people are expecting
> that to only control generating documentation at build time, not making the
> resulting code call groff.
>
> For cross-compilers especially, this would be the difference between groff
> in the build host vs. the target environment, so if we did have a flag, it
> should probably distinguish between the two cases somehow.
>
> --
> -Alan Coopersmith- alan.coopersmith at oracle.com
> Oracle Solaris Engineering - http://blogs.oracle.com/alanc
> ______________________________**_________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/**xorg-devel<http://lists.x.org/archives/xorg-devel>
> Info: http://lists.x.org/mailman/**listinfo/xorg-devel<http://lists.x.org/mailman/listinfo/xorg-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20130421/a112a5f1/attachment.html>
More information about the xorg-devel
mailing list