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:
authorJeff Johnston <jjohnstn@redhat.com>2004-01-24 00:37:46 +0300
committerJeff Johnston <jjohnstn@redhat.com>2004-01-24 00:37:46 +0300
commit786ab12ce20d68e4e5ace47ccf1c0d9b0129c875 (patch)
treebb9b930ea477a5e91dc4936a240b2685677174bd /newlib/libc/configure.in
parent35b7fc6c0035075cb75997e4f60f17337333c0bc (diff)
2004-01-23 Artem B. Bityuckiy <abitytsky@softminecorp.com>
* acinclude.m4 (--enable-newlib-iconv): New configuration option. (--enable-newlib-builtin-converters): Ditto. * configure.in: Add code to set _ICONV_ENABLED flag. Set _MB_LEN_MAX to 1 if not mb enabled. * configure: Regenerated. * aclocal.m4: Ditto. * Makefile.in: Ditto. * newlib.hin: Add _ICONV_ENABLED flag. * libc/Makefile.am: Add support for iconv. * libc/configure.in: Ditto. * libc/Makefile.in: Regenerated. * libc/aclocal.m4: Ditto. * libc/configure: Ditto. * libc/libc.texinfo: Add iconv documentation. * libc/iconv/AUTHORS, libc/iconv/COPYING, libc/iconv/Makefile.am, libc/iconv/Makefile.in, libc/iconv/README.ORIGINAL, libc/iconv/README.TODO, libc/iconv/charset.aliases, libc/iconv/iconv.tex, libc/iconv/ccs/Makefile.am, libc/iconv/ccs/Makefile.in, libc/iconv/ccs/README.CCS.SOURCES, libc/iconv/ccs/big5.c, libc/iconv/ccs/cns11643_plane1.c, libc/iconv/ccs/cns11643_plane14.c, libc/iconv/ccs/cns11643_plane2.c, libc/iconv/ccs/cp775.c, libc/iconv/ccs/cp850.c, libc/iconv/ccs/cp852.c, libc/iconv/ccs/cp855.c, libc/iconv/ccs/cp866.c, libc/iconv/ccs/gb_2312_80.c, libc/iconv/ccs/iconv_mktbl, libc/iconv/ccs/iso_8859_1.c, libc/iconv/ccs/iso_8859_15.c, libc/iconv/ccs/iso_8859_2.c, libc/iconv/ccs/iso_8859_4.c, libc/iconv/ccs/iso_8859_5.c, libc/iconv/ccs/jis_x0201.c, libc/iconv/ccs/jis_x0208_1983.c, libc/iconv/ccs/jis_x0212_1990.c, libc/iconv/ccs/koi8_r.c, libc/iconv/ccs/koi8_u.c, libc/iconv/ccs/ksx1001.c, libc/iconv/ccs/shift_jis.c, libc/iconv/ccs/us_ascii.c, libc/iconv/ccs/binary/Makefile.am, libc/iconv/ccs/binary/Makefile.in, libc/iconv/ccs/binary/big5.cct, libc/iconv/ccs/binary/cns11643_plane1.cct, libc/iconv/ccs/binary/cns11643_plane14.cct, libc/iconv/ccs/binary/cns11643_plane2.cct, libc/iconv/ccs/binary/cp775.cct, libc/iconv/ccs/binary/cp850.cct, libc/iconv/ccs/binary/cp852.cct, libc/iconv/ccs/binary/cp855.cct, libc/iconv/ccs/binary/cp866.cct, libc/iconv/ccs/binary/gb_2312_80.cct, libc/iconv/ccs/binary/iso_8859_1.cct, libc/iconv/ccs/binary/iso_8859_15.cct, libc/iconv/ccs/binary/iso_8859_2.cct, libc/iconv/ccs/binary/iso_8859_4.cct, libc/iconv/ccs/binary/iso_8859_5.cct, libc/iconv/ccs/binary/jis_x0201.cct, libc/iconv/ccs/binary/jis_x0208_1983.cct, libc/iconv/ccs/binary/jis_x0212_1990.cct, libc/iconv/ccs/binary/koi8_r.cct, libc/iconv/ccs/binary/koi8_u.cct, libc/iconv/ccs/binary/ksx1001.cct, libc/iconv/ccs/binary/shift_jis.cct, libc/iconv/ccs/binary/us_ascii.cct, libc/iconv/ces/Makefile.am, libc/iconv/ces/Makefile.in, libc/iconv/ces/euc-jp.c, libc/iconv/ces/euc-kr.c, libc/iconv/ces/euc-tw.c, libc/iconv/ces/gb2312.c, libc/iconv/ces/iso-10646-ucs-2.c, libc/iconv/ces/iso-10646-ucs-4.c, libc/iconv/ces/ucs-2-internal.c, libc/iconv/ces/ucs-4-internal.c, libc/iconv/ces/utf-16.c, libc/iconv/ces/utf-8.c, libc/iconv/lib/Makefile.am, libc/iconv/lib/Makefile.in, libc/iconv/lib/aliases.c, libc/iconv/lib/bialiasesi.c, libc/iconv/lib/biccs.c, libc/iconv/lib/bices.c, libc/iconv/lib/ccs.c, libc/iconv/lib/ces.c, libc/iconv/lib/ces_euc.c, libc/iconv/lib/ces_iso2022.c, libc/iconv/lib/ces_table.c, libc/iconv/lib/converter.c, libc/iconv/lib/deps.h, libc/iconv/lib/endian.h, libc/iconv/lib/iconv.c, libc/iconv/lib/loaddata.c, libc/iconv/lib/local.h, libc/include/iconv.h: New files. * libc/sys/linux/include/iconv.h: Ditto. * libc/include/sys/_types.h (_iconv_t): Added. * doc/aclocal.m4: Regenerated. * doc/configure: Ditto. * doc/Makefile.in: Ditto. * iconvdata/Makefile.in: Ditto. * iconvdata/aclocal.m4: Ditto. * iconvdata/configure: Ditto. * libc/*aclocal.m4: Ditto. * libc/*Makefile.in: Ditto. * libc/*configure: Ditto. * libm/*aclocal.m4: Ditto. * libm/*Makefile.in: Ditto. * libm/*configure: Ditto.
Diffstat (limited to 'newlib/libc/configure.in')
-rw-r--r--newlib/libc/configure.in48
1 files changed, 46 insertions, 2 deletions
diff --git a/newlib/libc/configure.in b/newlib/libc/configure.in
index 93b86132c..d2d86770b 100644
--- a/newlib/libc/configure.in
+++ b/newlib/libc/configure.in
@@ -122,7 +122,51 @@ fi
AC_SUBST(LIBC_SYS_LIB)
AC_SUBST(sys_dir)
-LIBC_MACHINE_LIB=
+dnl iconv library will be compiled if --enable-newlib-iconv option is enabled
+if test x${newlib_iconv} != x; then
+ AM_CONDITIONAL(ENABLE_NEWLIB_ICONV, test 1 = 1)
+ NEWLIB_CFLAGS="${NEWLIB_CFLAGS} -DENABLE_ICONV"
+fi;
+
+dnl Parse --enable-newlib-builtin-converters option argument
+if test "x${builtin_converters}" != "x"; then
+
+ dnl Check that --enable-newlib-iconv was enabled
+ if test x${newlib_iconv} = x; then
+ AC_MSG_ERROR(--enable-newlib-builtin-converters option can't be used if iconv library is disabled - use --enable-newlib-iconv to enable it)
+ fi
+
+ dnl Normalize converter names and delete commas
+ builtin_converters=`echo "${builtin_converters}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+
+ dnl Get the list of available converters excluding comments
+ dnl Join line with previous if the first character is whitespace
+ available_converters=`cat "${srcdir}/iconv/charset.aliases" | sed -e '/#/d' | sed -e 'N; s/\n //;'`
+
+ dnl Check if required converters are supported
+ dnl Convert aliases to "official" names
+ builtin_converters1="${builtin_converters}"
+ builtin_converters=""
+ for converter in ${builtin_converters1}; do
+ result=`echo "${available_converters}" | grep -e "\(^\| \)${converter}\( \|\$\)"`
+ if test $? != "0"; then
+ AC_MSG_ERROR(${converter} is not supported - see ${srcdir}/iconv/charset.aliases file for the list of available converters)
+ fi
+ converter1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'`
+ builtin_converters="${builtin_converters} ${converter1}"
+ done
+
+ dnl Define appropriate -D options
+ for converter in ${builtin_converters}; do
+ opt=ICONV_CONVERTER_`echo "${converter}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ NEWLIB_ICONV_CFLAGS="${NEWLIB_ICONV_CFLAGS} -D${opt}"
+ done
+
+else
+ NEWLIB_ICONV_CFLAGS=
+fi;
+AC_SUBST(NEWLIB_ICONV_CFLAGS)
+
if test -n "${machine_dir}"; then
if test "${use_libtool}" = "yes"; then
LIBC_MACHINE_LIB=machine/${machine_dir}/lib${machine_dir}.${aext}
@@ -133,4 +177,4 @@ fi
AC_SUBST(LIBC_MACHINE_LIB)
AC_SUBST(machine_dir)
-AC_OUTPUT(Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile)
+AC_OUTPUT(Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile)