aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-30 14:30:08 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-30 14:30:08 +0000
commitddc9cd0f636c47cb328a663e28e0414052dc21c1 (patch)
tree4674ed118ee78ab9bd329ae61ea80f469ab9f3de /gdb/configure.in
parent30d1c83669cde497bd6816d05b62e1cfd37146d2 (diff)
downloadgdb-ddc9cd0f636c47cb328a663e28e0414052dc21c1.zip
gdb-ddc9cd0f636c47cb328a663e28e0414052dc21c1.tar.gz
gdb-ddc9cd0f636c47cb328a663e28e0414052dc21c1.tar.bz2
2004-07-29 Andrew Cagney <cagney@gnu.org>
Fix PR i18n/761. * Makefile.in (.SUFFIXES): Add po .gmo, and .pox. (.PHONY): Add all-po install-po, uninstall-po, clean-po, $(PACKAGE).pot and update-po. (all-po, .po.gmo, .po.pox, install-po, $(PACKAGE).pot) (po/$(PACKAGE).pot, clean-po, uninstall-po, install-po) (update-po): New rules. (localedir): Define using autoconf. (diststuff): Add $(PACKAGE).pot and $(CATALOGS) (GDB_CFLAGS): Define LOCALEDIR using $(localedir). (XGETTEXT, GMSGFMT, MSGMERGE, PACKAGE, CATALOGS): Define. * configure.in: Generate CATALOGS and LINGUAS from contents of src/gdb/po/ directory. Set @localedir@ in Makefile.in. * configure: Re-generate. * po/gdbtext: New file
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in75
1 files changed, 62 insertions, 13 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index f5f3e98..2a2714b 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -42,10 +42,70 @@ AC_CANONICAL_SYSTEM
# 2.5x.
AC_CHECK_TOOL(RANLIB, ranlib, :)
+dnl List of object files and targets accumulated by configure.
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
dnl Set up for gettext. PACKAGE is used when we call bindtextdomain.
-ALL_LINGUAS=
+
CY_GNU_GETTEXT
-AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
+
+localedir='${datadir}/locale'
+AC_SUBST(localedir)
+
+if test "x$POSUB" != x; then
+
+ dnl Lifted from GCC's config/gettext.m4.
+ AC_MSG_CHECKING(for catalogs to be installed)
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS= AC_SUBST(CATALOGS)
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
+ done
+ LINGUAS="$XLINGUAS"
+ AC_MSG_RESULT($LINGUAS)
+
+ CONFIG_ALL="$CONFIG_ALL all-po"
+ CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
+ CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+ CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
+fi
+
+PACKAGE=gdb
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ])
+AC_SUBST(PACKAGE)
debugdir=${libdir}/debug
@@ -57,17 +117,6 @@ AC_DEFINE_DIR(DEBUGDIR, debugdir,
[Global directory for separate debug files. ])
#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
-dnl List of object files added by configure.
-
-CONFIG_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-ENABLE_CFLAGS=
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
-
AC_CONFIG_SUBDIRS(doc testsuite)
configdirs=