[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with gettext on Solaris
From: |
Bruno Haible |
Subject: |
Re: Problem with gettext on Solaris |
Date: |
Fri, 26 Aug 2005 13:57:54 +0200 |
User-agent: |
KMail/1.5 |
Hi,
Brian Cameron wrote:
> The AM_GNU_GETTEXT macro fails on Solaris even though Solaris has been made
> compatible with GNU gettext. AM_GNU_GETTEXT always wants to build the
> gettext sources included with various modules. So at Sun, we have been
> working around this by using AM_GLIB_GNU_GETTEXT which has a special test
> for Solaris making things work. It would probably be better if this could
> also be fixed in AM_GNU_GETTEXT.
Thanks for reporting this. Solaris' libc functions indeed can use GNU .mo
files as they were in 2000/2001, i.e. major revision 0. In 2002, the
GNU .mo file format has been augmented (in major revision 1) to support
<inttypes.h> placeholder strings. This file format is not supported by
Solaris, as far as I know. For optimal results, the AM_GNU_GETTEXT
macro therefore continues to use the GNU code, also on Solaris.
> AM_GLIB_GNU_GETTEXT has the following special test-case to recognize
> that allows it to work:
>
> AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
> return _nl_msg_cat_cntr],
> [CATOBJEXT=.gmo
> DATADIRNAME=share],
> [case $host in
> *-*-solaris*)
> dnl On Solaris, if bind_textdomain_codeset is in libc,
> dnl GNU format message catalog is always supported,
> dnl since both are added to the libc all together.
> dnl Hence, we'd like to go with DATADIRNAME=share and
> dnl and CATOBJEXT=.gmo in this case.
> AC_CHECK_FUNC(bind_textdomain_codeset,
> [CATOBJEXT=.gmo
> DATADIRNAME=share],
> [CATOBJEXT=.mo
> DATADIRNAME=lib])
This macro code is woefully out of date. GNU gettext does not support
installation of .mo files under $PREFIX/lib since 0.10.36.
> Would it be possible to get similar logic included in the AM_GNU_GETTEXT
> macro?
Only if Solaris implements the <inttypes.h> placeholder strings, and
defines __GNU_GETTEXT_SUPPORTED_REVISION(major) in <libintl.h> in a way
that signals that major revision 1 is also supported.
Bruno