PATCH: replace obsolete GCC libintl with top-level libintl from newest gettext distribution

Zack Weinberg
2003-07-03T03:40:32Z

[-- Attachment #1: Type: text/plain, Size: 1630 bytes --]

This is an FYI to binutils/gdb only; I'm not yet touching anything
over in /cvs/src.

This patch removes the obsolete (0.10.40) libintl which GCC had in
gcc/intl; instead, I bring in the latest (0.12.1) libintl and put it
at top level, matching binutils/gdb which has had a top level 'intl'
directory for some time. (Note that the libintl they have is even
older than GCC's current one - it dates to 1998 and does not appear to
have a version number.)

The autoconf macros distributed with gettext will not work in this
arrangement, so I'm using the gettext.m4 from binutils CVS - but I've
moved it to config/ which is where we seem to be keeping aclocal
fragments these days. This file is badly in need of revision but not
right this instant, and this change is invasive enough already.

I tested this patch as follows:

- Full bootstrap on i686-linux with no special options, which uses
the libintl that's part of glibc. In this setting the intl
directory is configured but not built.

- Configured with --with-included-gettext and did make all-gcc, then
verified that the intl directory's implementation was getting
used, and that message translation worked.
- Configured with --disable-nls and did make all-gcc, then verified
that cc1 didn't use gettext at all.

- Dropped the intl subdirectory into a binutils tree, without
modifying anything else, built it with --with-included-gettext,
and verified that message translation still worked.

The attached diff reproduces the patch in full - created and deleted
files both. However, generated files are not included.

OK to apply?

zw

[-- Attachment #2: changelog --]
[-- Type: text/plain, Size: 1503 bytes --]

top:
* intl: New directory; see intl/ChangeLog for details.
* ABOUT-NLS, config.rpath: Import from gettext 0.12.1.
* Makefile.tpl: all-gcc depends on maybe-all-intl.
* Makefile.in: Regenerate.
config:
* gettext.m4: New file - copy of gettext.m4 from binutils
CVS, with added AC_ISC_POSIX macro from gcc/aclocal.m4.
gcc:
* ABOUT-NLS: Delete.
* intl: Delete entire directory.
* aclocal.m4: Include ../config/gettext.m4. Delete
AC_ISC_POSIX, AM_LANGINFO_CODESET, jm_GLIBC21, AM_LC_MESSAGES,
AM_PATH_PROG_WITH_TEST, AM_WITH_NLS, and AM_GNU_GETTEXT.
* configure.in: Use CY_GNU_GETTEXT, not AM_GNU_GETTEXT.
Remove intl/Makefile from all_outputs.
* configure, config.in: Regenerate.
* Makefile.in: Expunge all references to intl subdirectory.
Add -I../intl to INCLUDES.
* intl.h: Include libintl.h if and only if ENABLE_NLS is defined.
intl:

* Makefile.in: Remove unnecessary capabilities for
installation, build of shared libraries, generation of
distribution tarballs, etc. Fix all the places that rely on
the parent directory. Don't generate libgnuintl.h from
anything; do generate $(objdir)/libintl.h from libgnuintl.h if
necessary. Adjust DEFS for use of config.h.
* README: New file.
* config.charset, ref-add.sin, ref-del.sin: Delete (unused).
* COPYING.LIB-2.0, COPYING.LIB-2.1: Delete (redundant).
* aclocal.m4: New; generated per instructions in gettext manual.
* configure.in: New; written from scratch for this configuration.
* configure, config.h.in: Generated.

[-- Attachment #3: move-libintl.diff.gz --]
[-- Type: application/gzip, Size: 232650 bytes --]