diff options
author | Bruno Haible <bruno@clisp.org> | 2001-01-18 16:51:39 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-01-18 16:51:39 +0000 |
commit | 82eef2caf35fb2fb965e36ee431f4042c2b3bcec (patch) | |
tree | 7fab29e9abab66b2cfee14a7ad0d610d46867b4b /m4 | |
parent | a7a991ef5dcd4db939e5a90957a431544d1864d8 (diff) | |
download | external_gettext-82eef2caf35fb2fb965e36ee431f4042c2b3bcec.zip external_gettext-82eef2caf35fb2fb965e36ee431f4042c2b3bcec.tar.gz external_gettext-82eef2caf35fb2fb965e36ee431f4042c2b3bcec.tar.bz2 |
Remove catgets fallback code.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ChangeLog | 15 | ||||
-rw-r--r-- | m4/gettext.m4 | 81 |
2 files changed, 26 insertions, 70 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog index 638ee25..dcab5ef 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,5 +1,20 @@ 2001-01-06 Bruno Haible <haible@clisp.cons.org> + Remove catgets fallback code. + - It does not handle message clash prevention through domains and + dgettext(). + - It does not handle message catalog inheritance and the LANGUAGE + environment variable. + - It does not handle locale aliases. + - It does not handle automatic charset conversion. + - It does not handle plural form handling and ngettext(). + - It uses a slow string to integer conversion. + - It is sensitive against installation problems. + * gettext.m4 (AM_WITH_NLS): Don't look for catgets any more. Don't + define INSTOBJEXT. Don't create intl/po2msg.sed and intl/po2tbl.sed. + +2001-01-06 Bruno Haible <haible@clisp.cons.org> + * setlocale.m4: New file. * Makefile.am (EXTRA_DIST): Add it. diff --git a/m4/gettext.m4 b/m4/gettext.m4 index 5daf742..b0bf269 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -9,27 +9,20 @@ # serial 8 dnl Usage: AM_WITH_NLS([SYMBOL], [LIBDIR], [INCDIR]). -dnl If SYMBOL is specified and is `no-catgets', then the catgets checks -dnl will be disabled. You must specify this if your program uses -dnl any of the ngettext/dngettext/dcngettext/bind_textdomain_codeset -dnl functions, which are not supported by the catgets backend. dnl LIBDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl INCDIR is used to find the include files. If empty, dnl the value `intl' is used. dnl -dnl The result of the configuration is one of four cases: +dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. -dnl Catalog format: GNU --> DATADIRNAME = share +dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. -dnl Catalog format: GNU --> DATADIRNAME = share +dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 3) A catgets has been found in the system's C library. -dnl Catalog format: Platform dependent --> DATADIRNAME = lib -dnl Catalog extension: .cat -dnl 4) No internationalization, always use English msgid. +dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl The use of .gmo is historical (it was needed to avoid overwriting the @@ -61,9 +54,8 @@ AC_DEFUN(AM_WITH_NLS, nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If GNU gettext or catgets are available (in this order) - dnl we use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. nls_cv_header_intl= nls_cv_header_libgt= CATOBJEXT=NONE @@ -102,8 +94,6 @@ return (int) gettext ("") + _nl_msg_cat_cntr], AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) CATOBJEXT=.gmo - DATADIRNAME=share - INSTOBJEXT=.mo fi if test "$gt_cv_func_gnugettext_libintl" = "yes"; then INTLLIBS="-lintl" @@ -111,45 +101,8 @@ return (int) gettext ("") + _nl_msg_cat_cntr], fi ]) -ifelse([$1], no-catgets, ,[ if test "$CATOBJEXT" = "NONE"; then - AC_MSG_CHECKING([whether catgets can be used]) - AC_ARG_WITH(catgets, - [ --with-catgets use catgets functions if available], - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no) - AC_MSG_RESULT($nls_cv_use_catgets) - - if test "$nls_cv_use_catgets" = "yes"; then - dnl No gettext in C library. Try catgets next. - AC_CHECK_LIB(i, main) - AC_CHECK_FUNC(catgets, - [AC_DEFINE(HAVE_CATGETS) - INTLOBJS="\$(CATOBJS)" - AC_PATH_PROG(GENCAT, gencat, no)dnl - if test "$GENCAT" != "no"; then - AC_PATH_PROG(GMSGFMT, gmsgfmt, no) - if test "$GMSGFMT" = "no"; then - AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no) - fi - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.cat - INSTOBJEXT=.cat - DATADIRNAME=lib - INTLDEPS='ifelse([$2],[],$(top_builddir)/intl/libintl.a,[$2])' - INTLLIBS=$INTLDEPS - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h - nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h - fi]) - fi - fi -]) - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. + dnl GNU gettext is not found in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi @@ -166,8 +119,6 @@ ifelse([$1], no-catgets, ,[ AC_SUBST(MSGFMT) USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share INTLDEPS='ifelse([$2],[],$(top_builddir)/intl/libintl.a,[$2])' INTLLIBS=$INTLDEPS LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` @@ -191,7 +142,6 @@ ifelse([$1], no-catgets, ,[ # We need to process the po/ directory. POSUB=po else - DATADIRNAME=share nls_cv_header_intl=ifelse([$3],[],intl,[$3])/libintl.h nls_cv_header_libgt=ifelse([$3],[],intl,[$3])/libgettext.h fi @@ -221,14 +171,16 @@ ifelse([$1], no-catgets, ,[ AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) ]) dnl Usage: Just like AM_WITH_NLS, which see. @@ -289,17 +241,6 @@ __argz_count __argz_stringify __argz_next]) fi AC_SUBST(INCLUDE_LOCALE_H) - test -d intl || mkdir intl - if test "$CATOBJEXT" = ".cat"; then - dnl Only the X/Open catalog format is supported. - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/intl/po2msg.sin > intl/po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/intl/po2tbl.sin > intl/po2tbl.sed - dnl In the intl/Makefile.in we have a special dependency which makes dnl only sense for gettext. We comment this out for non-gettext dnl packages. |