diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-07-30 14:30:08 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-07-30 14:30:08 +0000 |
commit | ff7b0b383a6c5faf9adca49bab98bcf794a773f2 (patch) | |
tree | 90c70fe8eaed60aaab94f31874257e9ae5af4c38 /gdb/configure.in | |
parent | 8507e021976360def331314027df95e5315299d9 (diff) | |
download | gdb-ff7b0b383a6c5faf9adca49bab98bcf794a773f2.tar.gz |
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.in | 75 |
1 files changed, 62 insertions, 13 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index f5f3e98c90a..2a2714ba098 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= |