2000-02-18 03:39:52 +08:00
|
|
|
dnl This is the newlib configure.in file.
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
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.
2004-01-24 05:37:46 +08:00
|
|
|
AC_PREREQ(2.13)
|
2000-02-18 03:39:52 +08:00
|
|
|
AC_INIT(libc)
|
2002-08-28 04:27:35 +08:00
|
|
|
AM_CONFIG_HEADER(newlib.h:newlib.hin)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
|
|
|
|
AC_CONFIG_AUX_DIR(..)
|
|
|
|
|
2002-08-10 05:12:09 +08:00
|
|
|
dnl Support --enable-newlib-io-pos-args
|
|
|
|
dnl This option is actually read in libc/configure.in. It is repeated
|
|
|
|
dnl here so that it shows up in the help text.
|
|
|
|
AC_ARG_ENABLE(newlib-io-pos-args,
|
|
|
|
[ --enable-newlib-io-pos-args enable printf-family positional arg support],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) newlib_io_pos_args=yes ;;
|
|
|
|
no) newlib_io_pos_args=no ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for newlib-io-pos-args option) ;;
|
|
|
|
esac], [newlib_io_pos_args=no])dnl
|
|
|
|
|
2002-09-12 02:36:55 +08:00
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
NEWLIB_CONFIGURE(.)
|
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try and
|
|
|
|
dnl add it into NEWLIB_CONFIGURE, executable tests are made before the first
|
|
|
|
dnl line of the macro which fail because appropriate LDFLAGS are not set.
|
|
|
|
if test "${use_libtool}" = "yes"; then
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
AC_PROG_AWK
|
|
|
|
fi
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
configdirs="libc libm"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(newlib_hw_fp,
|
|
|
|
[ --enable-newlib-hw-fp Turn on hardware floating point math],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) newlib_hw_fp=true ;;
|
|
|
|
no) newlib_hw_fp=false ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-newlib-hw-fp) ;;
|
|
|
|
esac],[newlib_hw_fp=false])
|
|
|
|
AM_CONDITIONAL(NEWLIB_HW_FP, test x$newlib_hw_fp = xtrue)
|
|
|
|
|
|
|
|
if test -z "${with_multisubdir}"; then
|
|
|
|
configdirs="${configdirs} doc"
|
|
|
|
have_doc=yes
|
|
|
|
else
|
|
|
|
have_doc=
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_DOC, test x$have_doc = xyes)
|
|
|
|
|
2002-10-08 07:10:13 +08:00
|
|
|
EXTRA_DIRS=
|
2003-05-29 06:04:40 +08:00
|
|
|
case $host in
|
2003-05-31 05:47:40 +08:00
|
|
|
i[[34567]]86-pc-linux-*)
|
2003-05-29 06:04:40 +08:00
|
|
|
configdirs="${configdirs} iconvdata"
|
|
|
|
EXTRA_DIRS=iconvdata
|
|
|
|
;;
|
|
|
|
esac
|
2002-10-08 07:10:13 +08:00
|
|
|
AC_SUBST(EXTRA_DIRS)
|
|
|
|
|
2002-04-27 04:18:52 +08:00
|
|
|
# These get added in the top-level configure.in, except in the case where
|
|
|
|
# newlib is being built natively.
|
2002-11-23 03:54:22 +08:00
|
|
|
LIBC_INCLUDE_GREP=`echo ${CC} | grep \/libc\/include`
|
2003-10-24 05:46:06 +08:00
|
|
|
abs_newlib_basedir=`cd ${newlib_basedir} && pwd`
|
2002-11-23 03:54:22 +08:00
|
|
|
if test -z "${LIBC_INCLUDE_GREP}"; then
|
2003-10-24 05:46:06 +08:00
|
|
|
CC_FOR_NEWLIB="${CC} -I$PWD/targ-include -I${abs_newlib_basedir}/libc/include"
|
2002-04-27 04:18:52 +08:00
|
|
|
else
|
|
|
|
CC_FOR_NEWLIB="${CC}"
|
|
|
|
fi
|
|
|
|
AC_SUBST(CC_FOR_NEWLIB)
|
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
AC_CONFIG_SUBDIRS(${configdirs})
|
|
|
|
|
|
|
|
CRT0=
|
|
|
|
CRT0_DIR=
|
|
|
|
if test -n "${sys_dir}"; then
|
|
|
|
CRT0=crt0.o
|
2002-04-18 03:13:11 +08:00
|
|
|
CRT0_DIR=libc/
|
2000-02-18 03:39:52 +08:00
|
|
|
fi
|
|
|
|
AC_SUBST(CRT0)
|
|
|
|
AC_SUBST(CRT0_DIR)
|
|
|
|
|
2002-04-05 06:41:11 +08:00
|
|
|
CRT1=${crt1}
|
2002-04-18 03:13:11 +08:00
|
|
|
CRT1_DIR=
|
|
|
|
if test -n "${crt1_dir}"; then
|
|
|
|
CRT1_DIR=${crt1_dir}/
|
|
|
|
fi
|
2002-04-05 06:41:11 +08:00
|
|
|
AC_SUBST(CRT1)
|
|
|
|
AC_SUBST(CRT1_DIR)
|
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
if test -n "${libm_machine_dir}"; then
|
|
|
|
LIBM_MACHINE_OBJECTLIST=libm/machine/${libm_machine_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(LIBM_MACHINE_OBJECTLIST)
|
|
|
|
|
|
|
|
if test -n "${machine_dir}"; then
|
|
|
|
MACHINE_OBJECTLIST=libc/machine/${machine_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(MACHINE_OBJECTLIST)
|
|
|
|
|
|
|
|
if test -n "${sys_dir}"; then
|
|
|
|
SYS_OBJECTLIST=libc/sys/${sys_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(SYS_OBJECTLIST)
|
|
|
|
|
2002-04-04 06:46:21 +08:00
|
|
|
if test "${have_sys_mach_dir}" = "yes"; then
|
|
|
|
SYS_MACH_OBJECTLIST=libc/sys/${sys_dir}/machine/${machine_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(SYS_MACH_OBJECTLIST)
|
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
if test -n "${posix_dir}"; then
|
|
|
|
POSIX_OBJECTLIST=libc/${posix_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(POSIX_OBJECTLIST)
|
|
|
|
|
|
|
|
if test -n "${signal_dir}"; then
|
|
|
|
SIGNAL_OBJECTLIST=libc/${signal_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(SIGNAL_OBJECTLIST)
|
|
|
|
|
|
|
|
if test -n "${syscall_dir}"; then
|
|
|
|
SYSCALL_OBJECTLIST=libc/${syscall_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(SYSCALL_OBJECTLIST)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
if test -n "${unix_dir}"; then
|
|
|
|
UNIX_OBJECTLIST=libc/${unix_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(UNIX_OBJECTLIST)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2002-08-27 02:56:09 +08:00
|
|
|
if test -n "${stdio64_dir}"; then
|
|
|
|
STDIO64_OBJECTLIST=libc/${stdio64_dir}/objectlist.awk.in
|
|
|
|
fi
|
|
|
|
AC_SUBST(STDIO64_OBJECTLIST)
|
|
|
|
|
2001-12-14 07:50:11 +08:00
|
|
|
# Put a plausible default for CC_FOR_BUILD in Makefile.
|
|
|
|
if test -z "$CC_FOR_BUILD"; then
|
2002-04-26 02:12:38 +08:00
|
|
|
CC_FOR_BUILD=gcc
|
2001-12-14 07:50:11 +08:00
|
|
|
fi
|
|
|
|
AC_SUBST(CC_FOR_BUILD)
|
2000-02-18 03:39:52 +08:00
|
|
|
|
2002-08-28 04:27:35 +08:00
|
|
|
if test "${newlib_elix_level}" -gt "0"; then
|
|
|
|
AC_DEFINE_UNQUOTED(_ELIX_LEVEL,${newlib_elix_level})
|
|
|
|
fi
|
|
|
|
|
2002-09-12 02:36:55 +08:00
|
|
|
if test "${newlib_mb}" = "yes"; then
|
|
|
|
AC_DEFINE_UNQUOTED(_MB_LEN_MAX,8)
|
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.
2004-01-24 05:37:46 +08:00
|
|
|
else
|
|
|
|
AC_DEFINE_UNQUOTED(_MB_LEN_MAX,1)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${newlib_iconv}" = "yes"; then
|
|
|
|
AC_DEFINE_UNQUOTED(_ICONV_ENABLED,1)
|
2002-09-12 02:36:55 +08:00
|
|
|
fi
|
|
|
|
|
2002-08-28 04:27:35 +08:00
|
|
|
AC_DEFINE_UNQUOTED(_NEWLIB_VERSION,"$VERSION")
|
2002-04-26 02:12:38 +08:00
|
|
|
|
2000-02-18 03:39:52 +08:00
|
|
|
if test "${multilib}" = "yes"; then
|
|
|
|
multilib_arg="--enable-multilib"
|
|
|
|
else
|
|
|
|
multilib_arg=
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile,
|
|
|
|
[if test -n "$CONFIG_FILES"; then
|
2002-08-28 04:27:35 +08:00
|
|
|
unset ac_file
|
2000-02-18 03:39:52 +08:00
|
|
|
. ${newlib_basedir}/../config-ml.in
|
|
|
|
fi],
|
|
|
|
srcdir=${srcdir}
|
|
|
|
host=${host}
|
|
|
|
target=${target}
|
|
|
|
with_multisubdir=${with_multisubdir}
|
|
|
|
ac_configure_args="${multilib_arg} ${ac_configure_args}"
|
|
|
|
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
|
|
|
|
newlib_basedir=${newlib_basedir}
|
|
|
|
CC="${CC}"
|
2001-12-14 07:50:11 +08:00
|
|
|
LDFLAGS="${LDFLAGS}"
|
2000-02-18 03:39:52 +08:00
|
|
|
)
|