From: Bruno Haible Date: Tue, 12 Feb 2002 17:24:44 +0000 (+0000) Subject: Distinguish NetBSD libintl from GNU libintl. X-Git-Tag: v0.11.1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=918adfec02888bf55495767bf52c66a53899f754;p=thirdparty%2Fgettext.git Distinguish NetBSD libintl from GNU libintl. --- diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 84caa4790..eb860f444 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -141,18 +141,30 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr;], +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], [bindtextdomain ("", ""); -return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr;], +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], [bindtextdomain ("", ""); -return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes