summaryrefslogtreecommitdiff
path: root/gcc/intl.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2001-10-19 15:17:39 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-10-19 15:17:39 +0000
commit191bf464071d7cd21095b9f1d119c05fd8306493 (patch)
tree081319da8a2e78a4efbfcb39e1acf6aca8752c83 /gcc/intl.h
parent7c87e9f9216fd7959a5365ae62f9173ce524d21b (diff)
aclocal.m4 (AM_WITH_NLS): AC_DEFINE HAVE_LIBINTL_H and USE_INCLUDED_LIBINTL when appropriate.
* 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. From-SVN: r46348
Diffstat (limited to 'gcc/intl.h')
-rw-r--r--gcc/intl.h35
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 */