bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: multiple configure.ac's in a project?


From: Ralf Wildenhues
Subject: Re: multiple configure.ac's in a project?
Date: Fri, 10 Apr 2009 10:33:50 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

[ 
<http://groups.google.com/group/gnu.utils.bug/browse_thread/thread/4db88c1b064d4a6d/be602230e6b1c031?lnk=raot>
 ]

Hello Bruno, Simon,

* Simon Josefsson wrote on Tue, Mar 31, 2009 at 02:41:34PM CEST:
> Bruno Haible <address@hidden> writes:
> > Simon Josefsson wrote:
> >> 2) Use one "gnutls" gettext domain for the entire project, putting the
> >>    translation files in the top-level po/.
> >> 
> >>    This leads to problems in the code in lib/ and libextra/: ENABLE_NLS
> >>    is not set, so the gettext function is null.
> >> 
> >>    If I add AM_GNU_GETTEXT to lib{,extra}/configure.ac
> >
> > Yes, you will have to use AM_GNU_GETTEXT in each of the three configure.acs,
> > regardless of which PO files structure you choose.

> >>    it will require 
> >>    that directories lib/po/ and libextra/po/ exists -- since the macro
> >>    and the autopoint tool requires that.
> >
> > The AM_GNU_GETTEXT macro does not require a PO directory. It can, as well,
> > work with any number of PO directories.
> 
> The macro calls AM_PO_SUBDIRS which do create a PO directory.  This
> leads to an error:
> 
> Makefile.am:25: AM_GNU_GETTEXT used but `po' not in SUBDIRS
> autoreconf: automake failed with exit status: 1

I'm trying to find out whether this is an error in the Automake logic
that deals with these macros.  automake will warn/error (use -Wno-syntax
to avoid an error) only if a `po' directory exists.  See the comment and
code in the handle_gettext function in automake.in:

  # Perform some sanity checks to help users get the right setup.
  # We disable these tests when po/ doesn't exist in order not to disallow
  # unusual gettext setups.
  #
  # Bruno Haible:
  # | The idea is:
  # |
  # |  1) If a package doesn't have a directory po/ at top level, it
  # |     will likely have multiple po/ directories in subpackages.
  # |
  # |  2) It is useful to warn for the absence of intl/ if AM_GNU_GETTEXT
  # |     is used without 'external'. It is also useful to warn for the
  # |     presence of intl/ if AM_GNU_GETTEXT([external]) is used. Both
  # |     warnings apply only to the usual layout of packages, therefore
  # |     they should both be disabled if no po/ directory is found at
  # |     top level.

  if (-d 'po')
    {
      my @subdirs = $subdirs->value_as_list_recursive;

      msg_var ('syntax', $subdirs,
               "AM_GNU_GETTEXT used but `po' not in SUBDIRS")
        if ! grep ($_ eq 'po', @subdirs);
[...]

Is that sufficient, or should this somehow be adjusted to fix the case
Simon has experienced?

Thanks,
Ralf




reply via email to

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