mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
Require ngettext. (#123847, Danilo Segan)
2004-08-06 Matthias Clasen <mclasen@redhat.com> * m4macros/glib-gettext.m4: Require ngettext. (#123847, Danilo Segan)
This commit is contained in:
parent
cf12bdfcd1
commit
b324ed6804
@ -1,3 +1,8 @@
|
||||
2004-08-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Require ngettext. (#123847,
|
||||
Danilo Segan)
|
||||
|
||||
Thu Aug 5 20:53:00 2004 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* glib/gutils.h (g_get_codeset): strdup result so caller
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Require ngettext. (#123847,
|
||||
Danilo Segan)
|
||||
|
||||
Thu Aug 5 20:53:00 2004 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* glib/gutils.h (g_get_codeset): strdup result so caller
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Require ngettext. (#123847,
|
||||
Danilo Segan)
|
||||
|
||||
Thu Aug 5 20:53:00 2004 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* glib/gutils.h (g_get_codeset): strdup result so caller
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Require ngettext. (#123847,
|
||||
Danilo Segan)
|
||||
|
||||
Thu Aug 5 20:53:00 2004 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* glib/gutils.h (g_get_codeset): strdup result so caller
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* m4macros/glib-gettext.m4: Require ngettext. (#123847,
|
||||
Danilo Segan)
|
||||
|
||||
Thu Aug 5 20:53:00 2004 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* glib/gutils.h (g_get_codeset): strdup result so caller
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001-2003 Red Hat, Inc.
|
||||
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
|
||||
#
|
||||
# This file is free software, distributed under the terms of the GNU
|
||||
# General Public License. As a special exception to the GNU General
|
||||
@ -22,7 +22,9 @@
|
||||
#
|
||||
# Added better handling of ALL_LINGUAS from GNU gettext version
|
||||
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
|
||||
|
||||
#
|
||||
# Modified to require ngettext
|
||||
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
|
||||
#
|
||||
# We need this here as well, since someone might use autoconf-2.5x
|
||||
# to configure GLib then an older version to configure a package
|
||||
@ -115,6 +117,16 @@ glib_DEFUN([GLIB_WITH_NLS],
|
||||
#
|
||||
# First check in libc
|
||||
#
|
||||
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
|
||||
[AC_TRY_LINK([
|
||||
#include <libintl.h>
|
||||
],
|
||||
[return (int) ngettext ("","", 1)],
|
||||
gt_cv_func_ngettext_libc=yes,
|
||||
gt_cv_func_ngettext_libc=no)
|
||||
])
|
||||
|
||||
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
|
||||
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([
|
||||
#include <libintl.h>
|
||||
@ -123,8 +135,9 @@ glib_DEFUN([GLIB_WITH_NLS],
|
||||
gt_cv_func_dgettext_libc=yes,
|
||||
gt_cv_func_dgettext_libc=no)
|
||||
])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
|
||||
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
|
||||
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||
fi
|
||||
|
||||
@ -132,25 +145,29 @@ glib_DEFUN([GLIB_WITH_NLS],
|
||||
# If we don't have everything we want, check in libintl
|
||||
#
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
|| test "$gt_cv_func_ngettext_libc" != "yes" \
|
||||
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
|
||||
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CHECK_LIB(intl, ngettext,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes)])
|
||||
gt_cv_func_dgettext_libintl=yes)])])
|
||||
|
||||
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
|
||||
AC_MSG_CHECKING([if -liconv is needed to use gettext])
|
||||
AC_MSG_RESULT([])
|
||||
AC_CHECK_LIB(intl, dcgettext,
|
||||
AC_CHECK_LIB(intl, ngettext,
|
||||
[AC_CHECK_LIB(intl, dcgettext,
|
||||
[gt_cv_func_dgettext_libintl=yes
|
||||
libintl_extra_libs=-liconv],
|
||||
:,-liconv)],
|
||||
:,-liconv)
|
||||
fi
|
||||
|
||||
#
|
||||
# If we found libintl, then check in it for bind_textdomain_codeset();
|
||||
# we'll prefer libc if neither have bind_textdomain_codeset(),
|
||||
# and both have dgettext
|
||||
# and both have dgettext and ngettext
|
||||
#
|
||||
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
|
||||
glib_save_LIBS="$LIBS"
|
||||
@ -162,7 +179,8 @@ glib_DEFUN([GLIB_WITH_NLS],
|
||||
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
|
||||
gt_cv_func_dgettext_libc=no
|
||||
else
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes"; then
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
|
||||
gt_cv_func_dgettext_libintl=no
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user