diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-19 15:17:39 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-19 15:17:39 +0000 |
commit | eb7186891856a0581365fb285ab212f91b1d2ac7 (patch) | |
tree | 081319da8a2e78a4efbfcb39e1acf6aca8752c83 /gcc/intl.h | |
parent | af12f29db9b76408d5225feb09ee477ca2a8dacb (diff) | |
download | gcc-eb7186891856a0581365fb285ab212f91b1d2ac7.tar.gz |
* aclocal.m4 (AM_WITH_NLS): AC_DEFINE HAVE_LIBINTL_H and
USE_INCLUDED_LIBINTL when appropriate.
* configure, config.in: Regenerate.
* Makefile.in (datadir): Set to @datadir@.
(intl.o): Also depend on $(CONFIG_H) and system.h.
* intl.c: Factor out common gettext initialization sequence.
(gcc_init_libintl): New function.
* intl.h: Include intl/libgnuintl.h if USE_INCLUDED_LIBINTL;
otherwise include libintl.h if HAVE_LIBINTL_H; otherwise turn
off NLS. Add multiple include guard. No need to #ifdef-guard
an #undef. Prototype gcc_init_libintl here.
* collect2.c (main), cppmain.c (general_init), gcc.c (main),
gcov.c (main), protoize.c (main), toplev.c (toplev_main):
Use gcc_init_libintl.
intl:
* Makefile.in: Don't copy libgnuintl.h anywhere.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46348 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/intl.h')
-rw-r--r-- | gcc/intl.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/gcc/intl.h b/gcc/intl.h index 07b72b59bb1..8a9b35a66fd 100644 --- a/gcc/intl.h +++ b/gcc/intl.h @@ -1,5 +1,5 @@ /* intl.h - internationalization - Copyright 1998 Free Software Foundation, Inc. + Copyright 1998, 2001 Free Software Foundation, Inc. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,6 +16,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef GCC_INTL_H +#define GCC_INTL_H + #ifdef HAVE_LOCALE_H # include <locale.h> #endif @@ -24,23 +27,27 @@ # define setlocale(category, locale) (locale) #endif -#ifdef ENABLE_NLS -# include <libintl.h> - extern const char localedir[]; +#ifdef USE_INCLUDED_LIBINTL +# include <intl/libgnuintl.h> #else -/* Stubs that do something close enough. */ -# ifdef textdomain -# undef textdomain +# ifdef HAVE_LIBINTL_H +# include <libintl.h> +# else +# undef ENABLE_NLS # endif +#endif + +#ifdef ENABLE_NLS +extern void gcc_init_libintl PARAMS ((void)); +#else +/* Stubs. */ +# undef textdomain # define textdomain(domain) (domain) -# ifdef bindtextdomain -# undef bindtextdomain -# endif +# undef bindtextdomain # define bindtextdomain(domain, directory) (domain) -# ifdef gettext -# undef gettext -# endif +# undef gettext # define gettext(msgid) (msgid) +# define gcc_init_libintl() /* nothing */ #endif #ifndef _ @@ -50,3 +57,5 @@ #ifndef N_ # define N_(msgid) (msgid) #endif + +#endif /* intl.h */ |