mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 15:18:55 +02:00
Version 2.1.4, interface age 1.
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com> * configure.in: Version 2.1.4, interface age 1. * m4macros/glib-gettext.m4: Major rewrite; remove leftovers from building intl/, prefer libintl if both libc and libintl have dgettext and libintl also has bind_textdomain_codeset(). (#70627) * configure.in acinclude.m4: Use an include to avoid having to duplicate the gettext macros between glib-gettext.m4 and acinclude.m4. * m4macros/glib-gettext.m4: Do some tricks so that configure.in can use macros under hidden names, but aclocal will still find them when installed. * m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR to encapsulate install location of catalog files. * m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR): Fix bug where if --prefix wasn't set on the configure line, GLib would look for translations in NONE/share/locale.
This commit is contained in:
24
ChangeLog
24
ChangeLog
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
@@ -1,3 +1,27 @@
|
|||||||
|
Wed Dec 11 14:28:50 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
* configure.in: Version 2.1.4, interface age 1.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Major rewrite; remove leftovers
|
||||||
|
from building intl/, prefer libintl if both libc and libintl
|
||||||
|
have dgettext and libintl also has bind_textdomain_codeset().
|
||||||
|
(#70627)
|
||||||
|
|
||||||
|
* configure.in acinclude.m4: Use an include to avoid having
|
||||||
|
to duplicate the gettext macros between glib-gettext.m4
|
||||||
|
and acinclude.m4.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Do some tricks so that configure.in
|
||||||
|
can use macros under hidden names, but aclocal will still
|
||||||
|
find them when installed.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4: Add AM_GLIB_DEFINE_LOCALEDIR
|
||||||
|
to encapsulate install location of catalog files.
|
||||||
|
|
||||||
|
* m4macros/glib-gettext.m4 (AM_GLIB_DEFINE_LOCALEDIR):
|
||||||
|
Fix bug where if --prefix wasn't set on the configure line,
|
||||||
|
GLib would look for translations in NONE/share/locale.
|
||||||
|
|
||||||
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
Wed Dec 11 11:11:44 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/grand.c: Include string.h, supress a warning.
|
* glib/grand.c: Include string.h, supress a warning.
|
||||||
|
19
configure.in
19
configure.in
@@ -1,9 +1,12 @@
|
|||||||
dnl ***********************************
|
dnl ***********************************
|
||||||
dnl *** include special GLib macros ***
|
dnl *** include special GLib macros ***
|
||||||
dnl ***********************************
|
dnl ***********************************
|
||||||
|
|
||||||
|
define(glib_configure_in)
|
||||||
builtin(include, acglib.m4)dnl
|
builtin(include, acglib.m4)dnl
|
||||||
builtin(include, glib/libcharset/codeset.m4)dnl
|
builtin(include, glib/libcharset/codeset.m4)dnl
|
||||||
builtin(include, glib/libcharset/glibc21.m4)dnl
|
builtin(include, glib/libcharset/glibc21.m4)dnl
|
||||||
|
builtin(include, m4macros/glib-gettext.m4)dnl
|
||||||
|
|
||||||
# require autoconf 2.53
|
# require autoconf 2.53
|
||||||
AC_PREREQ(2.53)
|
AC_PREREQ(2.53)
|
||||||
@@ -30,8 +33,8 @@ GLIB_AC_DIVERT_BEFORE_HELP([
|
|||||||
#
|
#
|
||||||
GLIB_MAJOR_VERSION=2
|
GLIB_MAJOR_VERSION=2
|
||||||
GLIB_MINOR_VERSION=1
|
GLIB_MINOR_VERSION=1
|
||||||
GLIB_MICRO_VERSION=3
|
GLIB_MICRO_VERSION=4
|
||||||
GLIB_INTERFACE_AGE=0
|
GLIB_INTERFACE_AGE=1
|
||||||
GLIB_BINARY_AGE=`expr 100 '*' $GLIB_MINOR_VERSION + $GLIB_MICRO_VERSION`
|
GLIB_BINARY_AGE=`expr 100 '*' $GLIB_MINOR_VERSION + $GLIB_MICRO_VERSION`
|
||||||
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
|
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
|
||||||
])dnl
|
])dnl
|
||||||
@@ -330,11 +333,9 @@ dnl gettext support
|
|||||||
dnl
|
dnl
|
||||||
|
|
||||||
ALL_LINGUAS="az be bg ca cs da de el es eu fr gl hi ja ko ms nl nn no pl pt pt_BR ro ru sk sl sq sv ta tr uk vi zh_CN zh_TW"
|
ALL_LINGUAS="az be bg ca cs da de el es eu fr gl hi ja ko ms nl nn no pl pt pt_BR ro ru sk sl sq sv ta tr uk vi zh_CN zh_TW"
|
||||||
AM_GLIB_GNU_GETTEXT
|
GLIB_GNU_GETTEXT
|
||||||
|
|
||||||
if test "$gt_cv_func_dgettext_libc" = "yes" || test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
if test "$gt_cv_have_gettext" != "yes" ; then
|
||||||
:
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
*** You must have either have gettext support in your C library, or use the
|
*** You must have either have gettext support in your C library, or use the
|
||||||
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
|
*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
|
||||||
@@ -348,11 +349,7 @@ AC_SUBST(GETTEXT_PACKAGE)
|
|||||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
|
||||||
[Define the gettext package to be used])
|
[Define the gettext package to be used])
|
||||||
|
|
||||||
# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
|
GLIB_DEFINE_LOCALEDIR(GLIB_LOCALE_DIR)
|
||||||
# this is the directory where the *.{mo,gmo} files are installed
|
|
||||||
GLIB_LOCALE_DIR="${prefix}/${DATADIRNAME}/locale"
|
|
||||||
AC_DEFINE_UNQUOTED(GLIB_LOCALE_DIR, "$GLIB_LOCALE_DIR",
|
|
||||||
[Define the location where the catalogs will be installed])
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||||
|
|
||||||
|
@@ -4,21 +4,31 @@
|
|||||||
# Modified to never use included libintl.
|
# Modified to never use included libintl.
|
||||||
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||||
#
|
#
|
||||||
|
# Major rework to remove unused code
|
||||||
|
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
|
||||||
#
|
#
|
||||||
# This file can be copied and used freely without restrictions. It can
|
# This file can be copied and used freely without restrictions. It can
|
||||||
# be used in projects which are not available under the GNU Public License
|
# be used in projects which are not available under the GNU Public License
|
||||||
# but which still want to provide support for the GNU gettext functionality.
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code is *not* freely available.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# If you make changes to this file, you MUST update the copy in
|
|
||||||
# acinclude.m4. [ aclocal dies on duplicate macros, so if
|
|
||||||
# we run 'aclocal -I macros/' then we'll run into problems
|
|
||||||
# once we've installed glib-gettext.m4 :-( ]
|
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_DEFUN([AM_GLIB_LC_MESSAGES],
|
dnl
|
||||||
[if test $ac_cv_header_locale_h = yes; then
|
dnl We go to great lengths to make sure that aclocal won't
|
||||||
|
dnl try to pull in the installed version of these macros
|
||||||
|
dnl when running aclocal in the glib directory.
|
||||||
|
dnl
|
||||||
|
m4_copy([AC_DEFUN],[glib_DEFUN])
|
||||||
|
m4_copy([AC_REQUIRE],[glib_REQUIRE])
|
||||||
|
dnl
|
||||||
|
dnl At the end, if we're not within glib, we'll define the public
|
||||||
|
dnl definitions in terms of our private definitions.
|
||||||
|
dnl
|
||||||
|
|
||||||
|
# GLIB_LC_MESSAGES
|
||||||
|
#--------------------
|
||||||
|
glib_DEFUN([glib_LC_MESSAGES],
|
||||||
|
[AC_CHECK_HEADERS([locale.h])
|
||||||
|
if test $ac_cv_header_locale_h = yes; then
|
||||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||||
@@ -28,9 +38,11 @@ AC_DEFUN([AM_GLIB_LC_MESSAGES],
|
|||||||
fi
|
fi
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
dnl AM_GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
# GLIB_PATH_PROG_WITH_TEST
|
||||||
|
#----------------------------
|
||||||
|
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||||
AC_DEFUN([AM_GLIB_PATH_PROG_WITH_TEST],
|
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
|
||||||
[# Extract the first word of "$2", so it can be a program name with args.
|
[# Extract the first word of "$2", so it can be a program name with args.
|
||||||
set dummy $2; ac_word=[$]2
|
set dummy $2; ac_word=[$]2
|
||||||
AC_MSG_CHECKING([for $ac_word])
|
AC_MSG_CHECKING([for $ac_word])
|
||||||
@@ -66,101 +78,114 @@ fi
|
|||||||
AC_SUBST($1)dnl
|
AC_SUBST($1)dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
# serial 5
|
# GLIB_WITH_NLS
|
||||||
|
#-----------------
|
||||||
AC_DEFUN(AM_GLIB_WITH_NLS,
|
glib_DEFUN([GLIB_WITH_NLS],
|
||||||
dnl NLS is obligatory
|
dnl NLS is obligatory
|
||||||
[USE_NLS=yes
|
[USE_NLS=yes
|
||||||
AC_SUBST(USE_NLS)
|
AC_SUBST(USE_NLS)
|
||||||
|
|
||||||
dnl Figure out what method
|
gt_cv_have_gettext=no
|
||||||
nls_cv_force_use_gnu_gettext="no"
|
|
||||||
|
|
||||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
CATOBJEXT=NONE
|
||||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
XGETTEXT=:
|
||||||
dnl User does not insist on using GNU NLS library. Figure out what
|
|
||||||
dnl to use. If gettext or catgets are available (in this order) we
|
|
||||||
dnl use this. Else we have to fall back to GNU NLS library.
|
|
||||||
dnl catgets is only used if permitted by option --with-catgets.
|
|
||||||
nls_cv_header_intl=
|
|
||||||
nls_cv_header_libgt=
|
|
||||||
CATOBJEXT=NONE
|
|
||||||
XGETTEXT=:
|
|
||||||
|
|
||||||
AC_CHECK_HEADER(libintl.h,
|
AC_CHECK_HEADER(libintl.h,
|
||||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
[gt_cv_func_dgettext_libintl="no"
|
||||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
libintl_extra_libs=""
|
||||||
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
|
||||||
|
|
||||||
gt_cv_func_dgettext_libintl="no"
|
#
|
||||||
libintl_extra_libs=""
|
# First check in libc
|
||||||
|
#
|
||||||
|
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||||
|
[AC_TRY_LINK([
|
||||||
|
#include <libintl.h>
|
||||||
|
],
|
||||||
|
[return (int) dgettext ("","")],
|
||||||
|
gt_cv_func_dgettext_libc=yes,
|
||||||
|
gt_cv_func_dgettext_libc=no)
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
|
||||||
|
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$gt_cv_func_dgettext_libc" != "yes" ; then
|
#
|
||||||
AC_CHECK_LIB(intl, bindtextdomain,
|
# If we don't have everything we want, check in libintl
|
||||||
[AC_CHECK_LIB(intl, dgettext,
|
#
|
||||||
gt_cv_func_dgettext_libintl=yes)])
|
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||||
|
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
|
||||||
|
|
||||||
|
AC_CHECK_LIB(intl, bindtextdomain,
|
||||||
|
[AC_CHECK_LIB(intl, dgettext,
|
||||||
|
gt_cv_func_dgettext_libintl=yes)])
|
||||||
|
|
||||||
if test "$gt_cv_func_dgettext_libc" != "yes" ; then
|
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
|
||||||
AC_MSG_CHECKING([if -liconv is needed to use gettext])
|
AC_MSG_CHECKING([if -liconv is needed to use gettext])
|
||||||
AC_MSG_RESULT([])
|
AC_MSG_RESULT([])
|
||||||
AC_CHECK_LIB(intl, dcgettext,
|
AC_CHECK_LIB(intl, dcgettext,
|
||||||
[gt_cv_func_dgettext_libintl=yes
|
[gt_cv_func_dgettext_libintl=yes
|
||||||
libintl_extra_libs=-liconv],
|
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
|
||||||
|
#
|
||||||
|
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
|
||||||
|
glib_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lintl $libintl_extra_libs"
|
||||||
|
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||||
|
LIBS="$glib_save_LIBS"
|
||||||
|
|
||||||
|
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
|
||||||
|
gt_cv_func_dgettext_libintl=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
|
||||||
LIBS="$LIBS -lintl $libintl_extra_libs";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
|
||||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_GETTEXT,1,
|
|
||||||
[Define if the GNU gettext() function is already present or preinstalled.])
|
|
||||||
AM_GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
|
||||||
if test "$MSGFMT" != "no"; then
|
|
||||||
AC_CHECK_FUNCS(dcgettext)
|
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|
||||||
AM_GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
|
||||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
|
||||||
return _nl_msg_cat_cntr],
|
|
||||||
[CATOBJEXT=.gmo
|
|
||||||
DATADIRNAME=share],
|
|
||||||
[CATOBJEXT=.mo
|
|
||||||
DATADIRNAME=lib])
|
|
||||||
INSTOBJEXT=.mo
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Added by Martin Baulig 12/15/98 for libc5 systems
|
|
||||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
|
||||||
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
|
||||||
INTLLIBS="-lintl $libintl_extra_libs"
|
|
||||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
if test "$CATOBJEXT" = "NONE"; then
|
|
||||||
dnl Neither gettext nor catgets in included in the C library.
|
|
||||||
dnl Fall back on GNU gettext library.
|
|
||||||
nls_cv_use_gnu_gettext=yes
|
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$nls_cv_use_gnu_gettext" != "yes"; then
|
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||||
|
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||||
|
gt_cv_have_gettext=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$gt_cv_have_gettext" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_GETTEXT,1,
|
||||||
|
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||||
|
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||||
|
if test "$MSGFMT" != "no"; then
|
||||||
|
AC_CHECK_FUNCS(dcgettext)
|
||||||
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
|
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
|
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||||
|
return _nl_msg_cat_cntr],
|
||||||
|
[CATOBJEXT=.gmo
|
||||||
|
DATADIRNAME=share],
|
||||||
|
[CATOBJEXT=.mo
|
||||||
|
DATADIRNAME=lib])
|
||||||
|
INSTOBJEXT=.mo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBS="$glib_save_LIBS"
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "$gt_cv_have_gettext" = "yes" ; then
|
||||||
AC_DEFINE(ENABLE_NLS, 1,
|
AC_DEFINE(ENABLE_NLS, 1,
|
||||||
[always defined to indicate that i18n is enabled])
|
[always defined to indicate that i18n is enabled])
|
||||||
else
|
|
||||||
dnl Unset this variable since we use the non-zero value as a flag.
|
|
||||||
CATOBJEXT=
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Test whether we really found GNU xgettext.
|
dnl Test whether we really found GNU xgettext.
|
||||||
if test "$XGETTEXT" != ":"; then
|
if test "$XGETTEXT" != ":"; then
|
||||||
dnl If it is no GNU xgettext we define it as : so that the
|
dnl If it is not GNU xgettext we define it as : so that the
|
||||||
dnl Makefiles still can work.
|
dnl Makefiles still can work.
|
||||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||||
: ;
|
: ;
|
||||||
@@ -190,37 +215,33 @@ AC_DEFUN(AM_GLIB_WITH_NLS,
|
|||||||
dnl Make all variables we use known to autoconf.
|
dnl Make all variables we use known to autoconf.
|
||||||
AC_SUBST(CATALOGS)
|
AC_SUBST(CATALOGS)
|
||||||
AC_SUBST(CATOBJEXT)
|
AC_SUBST(CATOBJEXT)
|
||||||
AC_SUBST(DATADIRNAME)
|
|
||||||
AC_SUBST(GMOFILES)
|
AC_SUBST(GMOFILES)
|
||||||
AC_SUBST(INSTOBJEXT)
|
AC_SUBST(INSTOBJEXT)
|
||||||
AC_SUBST(INTLDEPS)
|
|
||||||
AC_SUBST(INTLLIBS)
|
AC_SUBST(INTLLIBS)
|
||||||
AC_SUBST(INTLOBJS)
|
AC_SUBST(PO_IN_DATADIR_TRUE)
|
||||||
|
AC_SUBST(PO_IN_DATADIR_FALSE)
|
||||||
AC_SUBST(POFILES)
|
AC_SUBST(POFILES)
|
||||||
AC_SUBST(POSUB)
|
AC_SUBST(POSUB)
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN(AM_GLIB_GNU_GETTEXT,
|
# AM_GLIB_GNU_GETTEXT
|
||||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
# -------------------
|
||||||
AC_REQUIRE([AC_PROG_CC])dnl
|
# Do checks necessary for use of gettext. If a suitable implementation
|
||||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
# of gettext is found in either in libintl or in the C library,
|
||||||
|
# it will set INTLLIBS to the libraries needed for use of gettext
|
||||||
|
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
|
||||||
|
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
|
||||||
|
# on various variables needed by the Makefile.in.in installed by
|
||||||
|
# glib-gettextize.
|
||||||
|
dnl
|
||||||
|
glib_DEFUN(GLIB_GNU_GETTEXT,
|
||||||
|
[AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||||
AC_REQUIRE([AC_C_CONST])dnl
|
|
||||||
AC_REQUIRE([AC_C_INLINE])dnl
|
GLIB_LC_MESSAGES
|
||||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
GLIB_WITH_NLS
|
||||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
|
||||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
|
||||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
|
||||||
|
|
||||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
if test "$gt_cv_have_gettext" = "yes"; then
|
||||||
unistd.h sys/param.h])
|
|
||||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
|
||||||
strdup __argz_count __argz_stringify __argz_next])
|
|
||||||
|
|
||||||
AM_GLIB_LC_MESSAGES
|
|
||||||
AM_GLIB_WITH_NLS
|
|
||||||
|
|
||||||
if test "x$CATOBJEXT" != "x"; then
|
|
||||||
if test "x$ALL_LINGUAS" = "x"; then
|
if test "x$ALL_LINGUAS" = "x"; then
|
||||||
LINGUAS=
|
LINGUAS=
|
||||||
else
|
else
|
||||||
@@ -241,18 +262,6 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Determine which catalog format we have (if any is needed)
|
|
||||||
dnl For now we know about two different formats:
|
|
||||||
dnl Linux libc-5 and the normal X/Open format
|
|
||||||
test -d po || mkdir po
|
|
||||||
if test "$CATOBJEXT" = ".cat"; then
|
|
||||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
|
||||||
|
|
||||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
|
||||||
dnl cannot handle comments.
|
|
||||||
sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||||
dnl Try to locate is.
|
dnl Try to locate is.
|
||||||
@@ -282,3 +291,28 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
|
||||||
|
# -------------------------------
|
||||||
|
# Define VARIABLE to the location where catalog files will
|
||||||
|
# be installed by po/Makefile.
|
||||||
|
glib_DEFUN(GLIB_DEFINE_LOCALEDIR,
|
||||||
|
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
|
||||||
|
glib_save_prefix="$prefix"
|
||||||
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||||
|
if test "x$CATOBJEXT" = "x.mo" ; then
|
||||||
|
localedir=`eval echo "${libdir}/locale"`
|
||||||
|
else
|
||||||
|
localedir=`eval echo "${datadir}/locale"`
|
||||||
|
fi
|
||||||
|
prefix="$glib_save_prefix"
|
||||||
|
AC_DEFINE_UNQUOTED($1, "$localedir",
|
||||||
|
[Define the location where the catalogs will be installed])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Now the definitions that aclocal will find
|
||||||
|
dnl
|
||||||
|
ifdef(glib_configure_in,[],[
|
||||||
|
AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)])
|
||||||
|
AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)])
|
||||||
|
])dnl
|
||||||
|
Reference in New Issue
Block a user