When configure is called with --disable-nls, the build might fail when using the gettext context related helper functions, due to undefined LC_MESSAGES. Declare them when !ENABLE_NLS.
--- lib/gettext.h | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) Another option I guess would be to define LC_MESSAGES to something, but that would be less optimal. Please note that even if I've carefully reviewed the new macros and that I installed this into dpkg [0] where I found the issue, I've only tested the pgettext function which is the only one being used on dpkg [1]. Also I don't think I've assignments for gnulib, but maybe that will not be needed here? [0] <http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=commitdiff;h=b83cc7d5> [1] <http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=blob;f=lib/dpkg/i18n.h> diff --git a/lib/gettext.h b/lib/gettext.h index cb09553..697639b 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -111,6 +111,8 @@ /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" +#if ENABLE_NLS + /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. @@ -283,4 +285,34 @@ dcnpgettext_expr (const char *domain, return (n == 1 ? msgid : msgid_plural); } +#else /* ENABLE_NLS */ + +#define pgettext(Msgctxt, Msgid) ((void) (Msgctxt), gettext (Msgid)) +#define dpgettext(Domainname, Msgctxt, Msgid) \ + ((void) (Domainname), pgettext (Msgctxt, Msgid)) +#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ + ((void) (Category), dpgettext (Domainname, Msgctxt, Msgid)) + +#define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ + ((void) (Msgctxt), ngettext (Msgid, MsgidPlural, N)) +#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + ((void) (Domainname), npgettext (Msgctxt, Msgid, MsgidPlural, N) +#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + ((void) (Category), dnpgettext (Domainname, Msgctxt, Msgid, MsgidPlural, N) + +#define pgettext_expr(Msgctxt, Msgid) pgettext (Msgctxt, Msgid) +#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ + dpgettext (Domainname, Msgctxt, Msgid) +#define dcpgettext_expr(Domainname, Msgctxt, Msgid, Category) \ + dcpgettext (Domainname, Msgctxt, Msgid, Category) + +#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ + npgettext (Msgctxt, Msgid, MsgidPlural, N) +#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ + dnpgettext (Domainname, Msgctxt, Msgid, MsgidPlural, N) +#define dcnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ + dcnpgettext (Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) + +#endif /* ENABLE_NLS */ + #endif /* _LIBGETTEXT_H */ -- 1.7.8.3