Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2004-09-23 23:43:47 +0400
committerDJ Delorie <dj@redhat.com>2004-09-23 23:43:47 +0400
commit58d7b41f25d509493d0c495821a391f15e9f6d00 (patch)
tree1fd8ad4199548777a176a2a10f2f73ae919af596 /config/gettext-sister.m4
parente55ad3ece02b405967365fde3ee786793085a45b (diff)
Merge from gcc
2004-09-22 Kelley Cook <kcook@gcc.gnu.org> * gettext-sister.m4: Renamed from gettext.m4 * codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4, po.m4, inttypes.m4, inttypes-pri.m4, inttypes_h.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4, nls.m4, progtest.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4: Import from gettext-0.12.1 sources.
Diffstat (limited to 'config/gettext-sister.m4')
-rw-r--r--config/gettext-sister.m466
1 files changed, 66 insertions, 0 deletions
diff --git a/config/gettext-sister.m4 b/config/gettext-sister.m4
new file mode 100644
index 000000000..d10aae80b
--- /dev/null
+++ b/config/gettext-sister.m4
@@ -0,0 +1,66 @@
+# intl sister-directory configuration rules.
+#
+
+# The idea behind this macro is that there's no need to repeat all the
+# autoconf probes done by the intl directory - it's already done them
+# for us. In fact, there's no need even to look at the cache for the
+# answers. All we need to do is nab a few pieces of information.
+# The intl directory is set up to make this easy, by generating a
+# small file which can be sourced as a shell script; then we produce
+# the necessary substitutions and definitions for this directory.
+
+AC_DEFUN([ZW_GNU_GETTEXT_SISTER_DIR],
+[# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no AC_SUBST(USE_NLS)
+LIBINTL= AC_SUBST(LIBINTL)
+LIBINTL_DEP= AC_SUBST(LIBINTL_DEP)
+INCINTL= AC_SUBST(INCINTL)
+XGETTEXT= AC_SUBST(XGETTEXT)
+GMSGFMT= AC_SUBST(GMSGFMT)
+POSUB= AC_SUBST(POSUB)
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+AC_MSG_CHECKING([whether NLS is requested])
+if test x"$USE_NLS" != xyes; then
+ AC_MSG_RESULT(no)
+else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the
+ user's native language is requested.])
+
+ 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)
+fi])