mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 10:40:07 +08:00
56694dd996
top: * Makefile.tpl (configure-gcc): Depend on maybe-configure-intl. * Makefile.in: Regenerate. config: * gettext.m4: Delete all former contents. (ZW_GNU_GETTEXT_SISTER_DIR): New macro. * progtest.m4: New file. gcc: * Makefile.in (top_builddir): Set to "..", not ".". (INTLLIBS, INTLDEPS): Delete. (LIBINTL, LIBINTL_DEP, LIBICONV_DEP): New variables to be substituted. (LIBDEPS): Add $(LIBICONV_DEP). (LIBS): Take out $(INTLLIBS), add $(LIBINTL) and $(LIBICONV). (INCLUDES): Replace -I../intl with @INCINTL@. ($(top_builddir)/intl/libintl.a): Delete rule. (stage2-start, stage3-start, stage4-start, stageprofile-start, stagefeedback-start): Use $$ for variable to be evaluated by shell, not make. * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Delete. * aclocal.m4: sinclude ../config/progtest.m4. Add contents of lcmessage.m4 from gettext distro. * configure.in: Check for wchar.h and setlocale. Set LIBICONV_DEP to the empty string and substitute it. Call AM_LC_MESSAGES. Delete AC_ARG_ENABLE for --enable-nls; this is handled elsewhere. Use ZW_GNU_GETTEXT_SISTER_DIR, not CY_GNU_GETTEXT. Clear $LIBICONV if its text is included in $LIBINTL, to avoid linking it twice. * configure, config.in: Regenerate. intl: * README: Update. * Makefile.in (INSTALL, INSTALL_DATA, MKINSTALLDIRS, mkinstalldirs, gettextsrcdir, l): Delete. (COMPILE): Add $(DEFS-$@), remove $(XCFLAGS). (HEADERS): libgnuintl.h not libgnuintl.h.in. Remove os2compat.h. (SOURCES): Remove os2compat.c. (DEFS-dcigettext.o, DEFS-localealias.o, DEFS-localcharset.o, DEFS-relocatable.o): New. (all-yes): Add config.intl. (libintl.h): Use cp, not cat. (INCLUDES): Remove -I.. (TAGS, CTAGS, ID): Word wrap. (mostlyclean, distclean): Remove junk. (config.intl): New rule. * aclocal.m4: sinclude ../config/progtest.m4 instead of including it inline. * config.intl.in: New file. * configure.in: Take out unnecessary AC_CONFIG_AUX_DIR. Take out AC_DEFINEs for LOCALEDIR, LOCALE_ALIAS_PATH, LIBDIR, INSTALLDIR. Set LIBINTL_DEP and INCINTL and AC_SUBST them. Add config.intl to AC_OUTPUT. * os2compat.c, os2compat.h: Delete, unused. From-SVN: r69071
67 lines
2.3 KiB
Plaintext
67 lines
2.3 KiB
Plaintext
# 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])
|