bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison 2.4.1: make install does not install mo files


From: Bruno Haible
Subject: Re: Bison 2.4.1: make install does not install mo files
Date: Sun, 16 Aug 2009 23:36:16 +0200
User-agent: KMail/1.9.9

Hi Akim and Martin,

> > This new macro AM_GNU_GETTEXT with option
> > [need-formatstring-macros] creates tests, that fail in my
> > environment and make configure reset USE_NLS to no.

This is understandable: If the programmer tells gettext "I need the
support for <inttypes.h> formatstring macros" and the system does not
have this support, i18n gets disabled. When i18n is disabled, there is
no need to install *.gmo files since they won't be used.

So the question is: Is 'need-formatstring-macros' an appropriate
requirement?
   LC_ALL=C grep -r 'PRI[diouxX]' . 2>/dev/null
finds no matches in the bison source, nor any relevant matches in the
gnulib source. The commit message in [1] says:
    "(AM_GNU_GETTEXT): Add; require formatstring macros since that's
     the pickiest."
So I think Paul Eggert added this only because he wanted on the safe
side. (Paul Eggert *always* wants to be on the safe side.)

If 'need-ngettext' an appropriate requirement? Yes, since
  src/conflicts.c
uses the ngettext function.

> > Finally I changed configure.ac:
> >
> >     AM_GNU_GETTEXT([external], [need-formatstring-macros])
> >
> > reads now
> >
> >     AM_GNU_GETTEXT([external], [need-ngettext])

I think this is safe to do, and will solve the problem.

>       AM_GNU_GETTEXT_VERSION([0.15])

This version has a different meaning: it tells which macros
(intl.m4 etc.) you want to include in your release tarball.

Still, a minor problem remains when 'need-ngettext' is used:
When the user has a gettext that supports gettext() but not
ngettext(), with the same logic as above, neither the po/*.gmo
files nor the runtime-po/*.gmo files will be installed. But
the runtime-po/*.gmo files could be useful (used at runtime by
programs that embed bison-generated parsers). To fix this problem,
you would need to have two configure.ac files in the package:
  - one that does AM_GNU_GETTEXT([external], [need-ngettext])
    and is responsible for most of bison,
  - one that does AM_GNU_GETTEXT([external])
    and is responsible for only the runtime-po/ directory.
But this solution is probably overkill, because there are not
many systems out there with a gettext() but no ngettext().

Bruno

[1] 
http://git.savannah.gnu.org/gitweb/?p=bison.git;a=commitdiff;h=3b2942e671eadc31ca5cacf4c2965a1cac4edf04#patch4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]