Makefile.tpl (configure-gcc): Depend on maybe-configure-intl.

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
This commit is contained in:
Zack Weinberg 2003-07-08 05:55:11 +00:00
parent a294c4cf91
commit 56694dd996
23 changed files with 3308 additions and 8578 deletions

View File

@ -1,3 +1,8 @@
2003-07-07 Zack Weinberg <zack@codesourcery.com>
* Makefile.tpl (configure-gcc): Depend on maybe-configure-intl.
* Makefile.in: Regenerate.
2003-07-04 Zack Weinberg <zack@codesourcery.com>
* Makefile.tpl (all-bootstrap): Depend on maybe-all-intl.

View File

@ -23740,7 +23740,8 @@ gcc-no-fixedincludes:
# Host modules specific to gcc.
# GCC needs to identify certain tools.
configure-gcc: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
# GCC also needs the information exported by the intl configure script.
configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
# This is a slightly kludgy method of getting dependencies on
# all-build-libiberty correct; it would be better to build it every time.

View File

@ -1285,7 +1285,8 @@ gcc-no-fixedincludes:
# Host modules specific to gcc.
# GCC needs to identify certain tools.
configure-gcc: maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
# GCC also needs the information exported by the intl configure script.
configure-gcc: maybe-configure-intl maybe-configure-binutils maybe-configure-gas maybe-configure-ld maybe-configure-bison maybe-configure-flex
all-gcc: maybe-all-libiberty maybe-all-intl maybe-all-bison maybe-all-byacc maybe-all-binutils maybe-all-gas maybe-all-ld maybe-all-zlib
# This is a slightly kludgy method of getting dependencies on
# all-build-libiberty correct; it would be better to build it every time.

View File

@ -1,3 +1,9 @@
2003-07-07 Zack Weinberg <zack@codesourcery.com>
* gettext.m4: Delete all former contents.
(ZW_GNU_GETTEXT_SISTER_DIR): New macro.
* progtest.m4: New file.
2003-07-04 Zack Weinberg <zack@codesourcery.com>
* gettext.m4: New file - copy of gettext.m4 from binutils

View File

@ -1,361 +1,66 @@
# This file is derived from `gettext.m4'. The difference is that the
# included macros assume Cygnus-style source and build trees.
#serial 1
dnl This test replaces the one in autoconf.
dnl Currently this macro should have the same name as the autoconf macro
dnl because gettext's gettext.m4 (distributed in the automake package)
dnl still uses it. Otherwise, the use in gettext.m4 makes autoheader
dnl give these diagnostics:
dnl configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
dnl configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX])
AC_DEFUN(AC_ISC_POSIX,
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
# intl sister-directory configuration rules.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 3
# 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(CY_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
USE_INCLUDED_LIBINTL=no
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
[AC_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)])])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT, 1,
[Define as 1 if you have gettext and don't want to use GNU gettext.])
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
dnl In the standard gettext, we would now check for catgets.
dnl However, we never want to use catgets for our releases.
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS='$(top_builddir)/../intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=libgettext.h
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=libgettext.h
fi
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(CY_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h values.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
fi
AM_LC_MESSAGES
CY_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl The reference to <locale.h> in the installed <libintl.h> file
dnl must be resolved because we cannot expect the users of this
dnl to define HAVE_LOCALE_H.
if test $ac_cv_header_locale_h = yes; then
INCLUDE_LOCALE_H="#include <locale.h>"
else
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
AC_SUBST(INCLUDE_LOCALE_H)
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
if test -f $srcdir/po2tbl.sed.in; then
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/po2tbl.sed.in > po2tbl.sed
fi
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
AC_SUBST(MKINSTALLDIRS)
dnl *** For now the libtool support in intl/Makefile is not for real.
l=
AC_SUBST(l)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile. But only do this if the po directory
dnl exists in srcdir and contains POTFILES.in.
if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
fi
])
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
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_SUBST($1)dnl
])
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.])
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your locale.h file contains LC_MESSAGES.])
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
fi])
done
LINGUAS="$XLINGUAS"
AC_MSG_RESULT($LINGUAS)
fi])

91
config/progtest.m4 Normal file
View File

@ -0,0 +1,91 @@
# progtest.m4 serial 3 (gettext-0.12)
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
# Search path for a program which passes the given test.
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
[
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
# Find out how to test for executable files. Don't use a zero-byte file,
# as systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
ac_executable_p="test -x"
else
ac_executable_p="test -f"
fi
rm -f conf$$.file
# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
[[\\/]]* | ?:[[\\/]]*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in ifelse([$5], , $PATH, [$5]); do
IFS="$ac_save_IFS"
test -z "$ac_dir" && ac_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
break 2
fi
fi
done
done
IFS="$ac_save_IFS"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])

View File

@ -1,3 +1,27 @@
2003-07-07 Zack Weinberg <zack@codesourcery.com>
* 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.
2003-07-08 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/mkfixinc.sh: Remove winnt support.

View File

@ -83,7 +83,7 @@ parsedir = $(srcdir)
docobjdir = $(srcdir)/doc
# Top build directory, relative to here.
top_builddir = .
top_builddir = ..
# objdir is set by configure.
# It's normally the absolute path to the current directory.
objdir = @objdir@
@ -434,11 +434,12 @@ tmpdir = /tmp
USE_NLS = @USE_NLS@
# Internationalization library.
INTLLIBS = @INTLLIBS@
INTLDEPS = @INTLDEPS@
LIBINTL = @LIBINTL@
LIBINTL_DEP = @LIBINTL_DEP@
# Character encoding conversion library.
LIBICONV = @LIBICONV@
LIBICONV_DEP = @LIBICONV_DEP@
# The GC method to be used on this system.
GGC=@GGC@.o
@ -682,7 +683,7 @@ LIBIBERTY = ../libiberty/libiberty.a
BUILD_LIBIBERTY = @FORBUILD@/libiberty/libiberty.a
# Dependencies on the intl and portability libraries.
LIBDEPS= $(INTLDEPS) $(LIBIBERTY)
LIBDEPS= $(LIBIBERTY) $(LIBINTL_DEP) $(LIBICONV_DEP)
# Likewise, for use in the tools that must run on this machine
# even if we are cross-building GCC.
@ -690,7 +691,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# How to link with both our special library facilities
# and the system's installed libraries.
LIBS = $(INTLLIBS) @LIBS@ $(LIBIBERTY) $(LIBICONV)
LIBS = @LIBS@ $(LIBIBERTY) $(LIBINTL) $(LIBICONV)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
@ -719,7 +720,7 @@ BUILD_VARRAY = $(BUILD_PREFIX)varray.o
# currently being compiled, in both source trees, to be examined as well.
# libintl.h will be found in ../intl if we are using the included libintl.
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/config -I$(srcdir)/../include -I../intl
-I$(srcdir)/config -I$(srcdir)/../include @INCINTL@
# Always use -I$(srcdir)/config when compiling.
.c.o:
@ -2316,8 +2317,6 @@ intl.o: intl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h Makefile
-DLOCALEDIR=\"$(localedir)\" \
-c $(srcdir)/intl.c $(OUTPUT_OPTION)
$(top_builddir)/intl/libintl.a: intl.all
# Make-lang.in should add dependencies of po-generated on any generated
# files which need to be scanned by gettext (usually Yacc-generated parsers).
po-generated: $(parsedir)/c-parse.c
@ -3766,7 +3765,7 @@ stage1: force stage1-start lang.stage1
stage2-start:
-if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage2
-subdirs="$(SUBDIRS)"; for dir in $subdirs; \
-subdirs="$(SUBDIRS)"; for dir in $$subdirs; \
do \
if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
done
@ -3795,7 +3794,7 @@ stage2: force stage2-start lang.stage2
stage3-start:
-if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage3
-subdirs="$(SUBDIRS)"; for dir in $subdirs; \
-subdirs="$(SUBDIRS)"; for dir in $$subdirs; \
do \
if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
done
@ -3824,7 +3823,7 @@ stage3: force stage3-start lang.stage3
stage4-start:
-if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stage4
-subdirs="$(SUBDIRS)"; for dir in $subdirs; \
-subdirs="$(SUBDIRS)"; for dir in $$subdirs; \
do \
if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
done
@ -3853,7 +3852,7 @@ stage4: force stage4-start lang.stage4
stageprofile-start:
-if [ -d stageprofile ] ; then true ; else mkdir stageprofile ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stageprofile
-subdirs="$(SUBDIRS)"; for dir in $subdirs; \
-subdirs="$(SUBDIRS)"; for dir in $$subdirs; \
do \
if [ -d stageprofile/$$dir ] ; then true ; else mkdir stageprofile/$$dir ; fi ; \
done
@ -3880,7 +3879,7 @@ stageprofile: force stageprofile-start lang.stageprofile
stagefeedback-start:
-if [ -d stagefeedback ] ; then true ; else mkdir stagefeedback ; fi
$(MAKE) -f libgcc.mk libgcc-stage-start stage=stagefeedback
-subdirs="$(SUBDIRS)"; for dir in $subdirs; \
-subdirs="$(SUBDIRS)"; for dir in $$subdirs; \
do \
if [ -d stagefeedback/$$dir ] ; then true ; else mkdir stagefeedback/$$dir ; fi ; \
done

View File

@ -1,18 +1,3 @@
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if your assembler supports specifying the maximum number
of bytes to skip when using the GAS .p2align command. */
#undef HAVE_GAS_MAX_SKIP_P2ALIGN

33
gcc/aclocal.m4 vendored
View File

@ -1,6 +1,7 @@
sinclude(../config/acx.m4)
sinclude(../config/accross.m4)
sinclude(../config/gettext.m4)
sinclude(../config/progtest.m4)
dnl See if stdbool.h properly defines bool and true/false.
AC_DEFUN(gcc_AC_HEADER_STDBOOL,
@ -687,3 +688,35 @@ ifelse([$5],[],[],[else $5])
fi
]) []dnl # gcc_GAS_VERSION_GTE_IFELSE
# lcmessage.m4 serial 3 (gettext-0.11.3)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
# Check whether LC_MESSAGES is available in <locale.h>.
AC_DEFUN([AM_LC_MESSAGES],
[
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
])

View File

@ -1,14 +1,4 @@
/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* config.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define to the type of elements in the array set by `getgroups'.
Usually this is either `int' or `gid_t'. */
@ -17,15 +7,6 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
@ -38,24 +19,9 @@
/* Define if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
@ -84,15 +50,6 @@
/* Define if cpp should also search $prefix/include. */
#undef PREFIX_INCLUDE_DIR
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the alphasort function. */
#undef HAVE_ALPHASORT
@ -105,9 +62,6 @@
/* Define if you have the clock function. */
#undef HAVE_CLOCK
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the dup2 function. */
#undef HAVE_DUP2
@ -123,12 +77,6 @@
/* Define if you have the fwrite_unlocked function. */
#undef HAVE_FWRITE_UNLOCKED
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the getrlimit function. */
#undef HAVE_GETRLIMIT
@ -153,39 +101,21 @@
/* Define if you have the mmap function. */
#undef HAVE_MMAP
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the nl_langinfo function. */
#undef HAVE_NL_LANGINFO
/* Define if you have the putc_unlocked function. */
#undef HAVE_PUTC_UNLOCKED
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the scandir function. */
#undef HAVE_SCANDIR
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the setrlimit function. */
#undef HAVE_SETRLIMIT
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the strsignal function. */
#undef HAVE_STRSIGNAL
@ -198,9 +128,6 @@
/* Define if you have the wcswidth function. */
#undef HAVE_WCSWIDTH
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <direct.h> header file. */
#undef HAVE_DIRECT_H
@ -222,9 +149,6 @@
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
@ -264,9 +188,6 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
@ -385,6 +306,9 @@
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_GETENV
@ -507,18 +431,10 @@
the results of comparisons. */
#undef EXTRA_CC_MODES
/* Define if you have the stpcpy function */
#undef HAVE_STPCPY
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if NLS is requested */
/* Define to 1 if translation of program messages to the
user's native language is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define to 1 if installation paths should be looked up in Windows32
Registry. Ignored on non windows32 hosts. */
#undef ENABLE_WIN32_REGISTRY

2199
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -680,7 +680,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
direct.h malloc.h langinfo.h ldfcn.h wchar.h)
direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h)
# Check for thread headers.
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
@ -775,7 +775,8 @@ dnl gcc_AC_C_ENUM_BF_UNSIGNED
AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \
scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore)
scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \
setlocale)
if test x$ac_cv_func_mbstowcs = xyes; then
AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works,
@ -836,6 +837,11 @@ esac
AC_FUNC_VFORK
AM_ICONV
# Until we have in-tree GNU iconv:
LIBICONV_DEP=
AC_SUBST(LIBICONV_DEP)
AM_LC_MESSAGES
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
@ -1196,20 +1202,13 @@ VERSION="$gcc_version"
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
# Enable NLS support by default
AC_ARG_ENABLE(nls,
[ --enable-nls use Native Language Support (default)],
, enable_nls=yes)
ZW_GNU_GETTEXT_SISTER_DIR
# if cross compiling, disable NLS support.
# It's not worth the trouble, at least for now.
if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then
AC_MSG_WARN(Disabling NLS support for canadian cross compiler.)
enable_nls=no
fi
CY_GNU_GETTEXT
# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
# -liconv on the link line twice.
case "$LIBINTL" in *$LIBICONV*)
LIBICONV= ;;
esac
# Windows32 Registry support for specifying GCC installation paths.
AC_ARG_ENABLE(win32-registry,

View File

@ -1,3 +1,28 @@
2003-07-07 Zack Weinberg <zack@codesourcery.com>
* 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.
2003-07-04 Zack Weinberg <zack@codesourcery.com>
* Makefile.in: Remove unnecessary capabilities for

View File

@ -36,16 +36,8 @@ libdir = @libdir@
includedir = @includedir@
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/intl
aliaspath = $(localedir)
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
AR = ar
CC = @CC@
RANLIB = @RANLIB@
@ -57,7 +49,7 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
DEFS = -DHAVE_CONFIG_H
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(DEFS-$@) $(INCLUDES)
HEADERS = \
gmo.h \
@ -68,8 +60,7 @@ HEADERS = \
eval-plural.h \
localcharset.h \
relocatable.h \
os2compat.h \
libgnuintl.h.in
libgnuintl.h
SOURCES = \
bindtextdom.c \
dcgettext.c \
@ -92,7 +83,6 @@ SOURCES = \
localename.c \
log.c \
osdep.c \
os2compat.c \
intl-compat.c
OBJECTS = \
bindtextdom.o \
@ -118,8 +108,13 @@ OBJECTS = \
osdep.o \
intl-compat.o
DEFS-dcigettext.o = -DLOCALEDIR="\"$(localedir)\""
DEFS-localealias.o = -DLOCALE_ALIAS_PATH="\"$(aliaspath)\""
DEFS-localcharset.o = -DLIBDIR="\"$(libdir)\""
DEFS-relocatable.o = -DINSTALLDIR="\"$(libdir)\""
all: all-@USE_INCLUDED_LIBINTL@
all-yes: libintl.a libintl.h
all-yes: libintl.a libintl.h config.intl
all-no: # nothing
libintl.a: $(OBJECTS)
@ -128,7 +123,7 @@ libintl.a: $(OBJECTS)
$(RANLIB) $@
libintl.h: $(srcdir)/libgnuintl.h
cat $(srcdir)/libgnuintl.h > $@
cp $(srcdir)/libgnuintl.h $@
.SUFFIXES:
.SUFFIXES: .c .y .o
@ -140,7 +135,7 @@ libintl.h: $(srcdir)/libgnuintl.h
$(YACC) $(YFLAGS) --output $@ $<
rm -f $*.h
INCLUDES = -I. -I$(srcdir) -I..
INCLUDES = -I. -I$(srcdir)
check: all
@ -167,35 +162,27 @@ localcharset.o: localcharset.h
localealias.o localcharset.o relocatable.o: relocatable.h
tags: TAGS
TAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && \
etags -o $$here/TAGS $(HEADERS) $(SOURCES)
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && \
ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
id: ID
ID: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && \
mkid -f$$here/ID $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.la *.o *.obj *.lo core core.*
rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
rm -f -r .libs _libs
rm -f *.a *.la *.o *.obj *.lo core core.* libintl.h
clean: mostlyclean
distclean: clean
rm -f Makefile ID TAGS
if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
rm -f ChangeLog.inst $(DISTFILES.normal); \
else \
: ; \
fi
maintainer-clean: distclean
@ -207,6 +194,9 @@ distdir:
Makefile: Makefile.in config.status
CONFIG_HEADERS= CONFIG_FILES=Makefile $(SHELL) ./config.status
config.intl: config.intl.in config.status
CONFIG_HEADERS= CONFIG_FILES=config.intl $(SHELL) ./config.status
config.h: cstamp-h; @:
cstamp-h: config.h.in config.status
CONFIG_HEADERS=config.h CONFIG_FILES= $(SHELL) config.status

View File

@ -10,13 +10,14 @@ gettext developers first. However, note the following:
* The files COPYING.LIB-2.0 and COPYING.LIB-2.1 are redundant with the
top-level COPYING.LIB and have therefore been removed.
* The files config.charset, ref-add.sin, and ref-del.sin are not used
in this setup and have therefore been removed.
* The files config.charset, ref-add.sin, ref-del.sin, os2compat.c,
and os2compat.h are not used in this setup and have therefore been
removed.
* aclocal.m4 was constructed following the instructions printed by
"gettextize" from the files that gettext 0.12.1 installs in
$(prefix)/share/aclocal.
* configure.in and Makefile.in were written for this directory
layout, by Zack Weinberg <zack@codesourcery.com>. Please direct
patches for these files to gcc-patches@gcc.gnu.org.
* configure.in, config.intl.in, and Makefile.in were written for this
directory layout, by Zack Weinberg <zack@codesourcery.com>. Please
direct patches for these files to gcc-patches@gcc.gnu.org.

92
intl/aclocal.m4 vendored
View File

@ -674,97 +674,7 @@ AC_DEFUN([AM_MKINSTALLDIRS],
AC_SUBST(MKINSTALLDIRS)
])
# progtest.m4 serial 3 (gettext-0.12)
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
# Search path for a program which passes the given test.
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
[
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
# Find out how to test for executable files. Don't use a zero-byte file,
# as systems may use methods other than mode bits to determine executability.
cat >conf$$.file <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.file
if test -x conf$$.file >/dev/null 2>&1; then
ac_executable_p="test -x"
else
ac_executable_p="test -f"
fi
rm -f conf$$.file
# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
[[\\/]]* | ?:[[\\/]]*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in ifelse([$5], , $PATH, [$5]); do
IFS="$ac_save_IFS"
test -z "$ac_dir" && ac_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
break 2
fi
fi
done
done
IFS="$ac_save_IFS"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
sinclude(../config/progtest.m4)
# lib-link.m4 serial 4 (gettext-0.12)
dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.

View File

@ -1,76 +1,176 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define because we depend on libiconv. */
#undef DEPENDS_ON_LIBICONV
/* Define to empty if the keyword does not work. */
#undef const
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define to enable relocation. */
#undef ENABLE_RELOCATABLE
/* Define to 1 if you have `alloca', as a function or macro. */
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if the GNU dcgettext() function is already present or preinstalled.
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef HAVE_DCGETTEXT
#undef STACK_DIRECTION
/* Define to 1 if you have the `feof_unlocked' function. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the __fsetlocking function. */
#undef HAVE___FSETLOCKING
/* Define if you have the feof_unlocked function. */
#undef HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `fgets_unlocked' function. */
/* Define if you have the fgets_unlocked function. */
#undef HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
/* Define to 1 if you have the `getc_unlocked' function. */
/* Define if you have the getc_unlocked function. */
#undef HAVE_GETC_UNLOCKED
/* Define to 1 if you have the `getegid' function. */
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getegid function. */
#undef HAVE_GETEGID
/* Define to 1 if you have the `geteuid' function. */
/* Define if you have the geteuid function. */
#undef HAVE_GETEUID
/* Define to 1 if you have the `getgid' function. */
/* Define if you have the getgid function. */
#undef HAVE_GETGID
/* Define to 1 if you have the `getpagesize' function. */
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the `getuid' function. */
/* Define if you have the getuid function. */
#undef HAVE_GETUID
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define if you have the mempcpy function. */
#undef HAVE_MEMPCPY
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the strtoul function. */
#undef HAVE_STRTOUL
/* Define if you have the tsearch function. */
#undef HAVE_TSEARCH
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
and declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
and declares uintmax_t. */
#undef HAVE_STDINT_H_WITH_UINTMAX
/* Define if you have the unsigned long long type. */
#undef HAVE_UNSIGNED_LONG_LONG
/* Define if integer division by zero raises signal SIGFPE. */
#undef INTDIV0_RAISES_SIGFPE
/* Define to unsigned long or unsigned long long
if <stdint.h> and <inttypes.h> don't define. */
#undef uintmax_t
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_UINTMAX_T
/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
#undef HAVE_INTTYPES_H
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
#undef PRI_MACROS_BROKEN
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
@ -78,111 +178,15 @@
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if translation of program messages to the user's native language
is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define to 1 if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
#undef HAVE_STDINT_H_WITH_UINTMAX
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `stpcpy' function. */
#undef HAVE_STPCPY
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `tsearch' function. */
#undef HAVE_TSEARCH
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_UINTMAX_T
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the unsigned long long type. */
#undef HAVE_UNSIGNED_LONG_LONG
/* Define to 1 if you have the `__argz_count' function. */
#undef HAVE___ARGZ_COUNT
/* Define to 1 if you have the `__argz_next' function. */
#undef HAVE___ARGZ_NEXT
/* Define to 1 if you have the `__argz_stringify' function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define to 1 if you have the `__fsetlocking' function. */
#undef HAVE___FSETLOCKING
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Define to the installation directory. */
#undef INSTALLDIR
/* Define if integer division by zero raises signal SIGFPE. */
#undef INTDIV0_RAISES_SIGFPE
/* Define if the GNU dcgettext() function is already present or preinstalled. */
#undef HAVE_DCGETTEXT
/* Define because this is libintl. */
#undef IN_LIBINTL
@ -190,66 +194,18 @@
/* Define because this is a library. */
#undef IN_LIBRARY
/* Define to the library directory. */
#undef LIBDIR
/* Define because we depend on libiconv. */
#undef DEPENDS_ON_LIBICONV
/* Define to the directory holding the locale files. */
#undef LOCALEDIR
/* Define to the locale alias path. */
#undef LOCALE_ALIAS_PATH
/* Define to enable relocation. */
#undef ENABLE_RELOCATABLE
/* Define if there is no xmalloc. */
#undef NO_XMALLOC
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
#undef PRI_MACROS_BROKEN
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
if it is not supported. */
#undef inline
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define this entry point correctly. */
#undef set_relocation_prefix
/* Define this entry point correctly. */
#undef relocate
/* Define this entry point correctly. */
#undef set_relocation_prefix
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to unsigned long or unsigned long long if <stdint.h> and
<inttypes.h> don't define. */
#undef uintmax_t

12
intl/config.intl.in Normal file
View File

@ -0,0 +1,12 @@
# This file records the configuration of libintl in a form that
# can be read back in by a configure script in a sister directory.
# See config/gettext.m4 for its use.
USE_NLS='@USE_NLS@'
LIBINTL='@LIBINTL@'
LIBINTL_DEP='@LIBINTL_DEP@'
INCINTL='@INCINTL@'
XGETTEXT='@XGETTEXT@'
GMSGFMT='@GMSGFMT@'
POSUB='@POSUB@'

7828
intl/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,10 @@
AC_PREREQ(2.13)
AC_INIT(gettext.c)
AC_CONFIG_AUX_DIR(..)
AC_CONFIG_HEADER(config.h)
AM_GNU_GETTEXT_VERSION(0.12.1)
AM_GNU_GETTEXT
dnl This replaces the extensive use of DEFS in the original Makefile.in.
AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir",
[Define to the directory holding the locale files.])
AC_DEFINE_UNQUOTED(LOCALE_ALIAS_PATH, "$aliaspath",
[Define to the locale alias path.])
AC_DEFINE_UNQUOTED(LIBDIR, "$libdir",
[Define to the library directory.])
AC_DEFINE_UNQUOTED(INSTALLDIR, "$libdir",
[Define to the installation directory.])
AC_DEFINE(IN_LIBINTL, 1, [Define because this is libintl.])
AC_DEFINE(IN_LIBRARY, 1, [Define because this is a library.])
AC_DEFINE(DEPENDS_ON_LIBICONV, 1, [Define because we depend on libiconv.])
@ -24,4 +15,13 @@ AC_DEFINE(set_relocation_prefix, libintl_set_relocation_prefix,
AC_DEFINE(relocate, libintl_relocate,
[Define this entry point correctly.])
AC_OUTPUT(Makefile)
dnl Additional info for config.intl.
LIBINTL_DEP= AC_SUBST(LIBINTL_DEP)
INCINTL= AC_SUBST(INCINTL)
if test $USE_INCLUDED_LIBINTL = yes; then
LIBINTL_DEP='${top_builddir}/intl/libintl.a'
INCINTL='-I${top_builddir}/intl'
fi
AC_OUTPUT(Makefile config.intl)

View File

@ -1,98 +0,0 @@
/* OS/2 compatibility functions.
Copyright (C) 2001-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
#define OS2_AWARE
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
/* A version of getenv() that works from DLLs */
extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
char *
_nl_getenv (const char *name)
{
unsigned char *value;
if (DosScanEnv (name, &value))
return NULL;
else
return value;
}
/* A fixed size buffer. */
char libintl_nl_default_dirname[MAXPATHLEN+1];
char *_nlos2_libdir = NULL;
char *_nlos2_localealiaspath = NULL;
char *_nlos2_localedir = NULL;
static __attribute__((constructor)) void
nlos2_initialize ()
{
char *root = getenv ("UNIXROOT");
char *gnulocaledir = getenv ("GNULOCALEDIR");
_nlos2_libdir = gnulocaledir;
if (!_nlos2_libdir)
{
if (root)
{
size_t sl = strlen (root);
_nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
memcpy (_nlos2_libdir, root, sl);
memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
}
else
_nlos2_libdir = LIBDIR;
}
_nlos2_localealiaspath = gnulocaledir;
if (!_nlos2_localealiaspath)
{
if (root)
{
size_t sl = strlen (root);
_nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
memcpy (_nlos2_localealiaspath, root, sl);
memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
}
else
_nlos2_localealiaspath = LOCALE_ALIAS_PATH;
}
_nlos2_localedir = gnulocaledir;
if (!_nlos2_localedir)
{
if (root)
{
size_t sl = strlen (root);
_nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
memcpy (_nlos2_localedir, root, sl);
memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
}
else
_nlos2_localedir = LOCALEDIR;
}
if (strlen (_nlos2_localedir) <= MAXPATHLEN)
strcpy (libintl_nl_default_dirname, _nlos2_localedir);
}

View File

@ -1,46 +0,0 @@
/* OS/2 compatibility defines.
This file is intended to be included from config.h
Copyright (C) 2001-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
by the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
/* When included from os2compat.h we need all the original definitions */
#ifndef OS2_AWARE
#undef LIBDIR
#define LIBDIR _nlos2_libdir
extern char *_nlos2_libdir;
#undef LOCALEDIR
#define LOCALEDIR _nlos2_localedir
extern char *_nlos2_localedir;
#undef LOCALE_ALIAS_PATH
#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
extern char *_nlos2_localealiaspath;
#endif
#undef HAVE_STRCASECMP
#define HAVE_STRCASECMP 1
#define strcasecmp stricmp
#define strncasecmp strnicmp
/* We have our own getenv() which works even if library is compiled as DLL */
#define getenv _nl_getenv
/* Older versions of gettext used -1 as the value of LC_MESSAGES */
#define LC_MESSAGES_COMPAT (-1)