diff options
author | Eric Blake <eblake@redhat.com> | 2007-05-12 00:09:00 +0400 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2007-05-12 00:09:00 +0400 |
commit | 0962fe9178a40c8410d5f1497bb1966f0db66d6d (patch) | |
tree | 96b95530f13f58319534a60386c6c523d97a9e6a /newlib/configure.in | |
parent | b8a37af936acca73d6f6814d89d422b34e342790 (diff) |
Minimize printf/scanf size on platforms that don't need C99.
* acconfig.h (_WANT_IO_C99_FORMATS): New macro.
* newlib.hin (_WANT_IO_C99_FORMATS): Likewise.
* configure.in (newlib-io-c99-formats): New configure option.
(_WANT_IO_C99_FORMATS): Define appropriately.
* configure.host (*-linux*, cygwin): Default c99-formats to yes.
* libc/stdio/vfprintf.c (_VFPRINTF_R) [!_WANT_IO_C99_FORMATS]:
Cripple ' flag; hh, z, j, t sizes; a, A, F, C, S specifiers.
* libc/stdio/vfscanf.c (_VFSCANF_R) [!_WANT_IO_C99_FORMATS]:
Likewise.
* configure: Regenerate.
Diffstat (limited to 'newlib/configure.in')
-rw-r--r-- | newlib/configure.in | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/newlib/configure.in b/newlib/configure.in index 378dd942c..c10a10671 100644 --- a/newlib/configure.in +++ b/newlib/configure.in @@ -20,6 +20,15 @@ AC_ARG_ENABLE(newlib-io-pos-args, *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-pos-args option) ;; esac], [newlib_io_pos_args=])dnl +dnl Support --enable-newlib-io-c99-formats +AC_ARG_ENABLE(newlib-io-c99-formats, +[ --enable-newlib-io-c99-formats enable C99 support in IO functions like printf/scanf], +[case "${enableval}" in + yes) newlib_io_c99_formats=yes;; + no) newlib_io_c99_formats=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-c99-formats option) ;; + esac], [newlib_io_c99_formats=])dnl + dnl Support --enable-newlib-io-long-long AC_ARG_ENABLE(newlib-io-long-long, [ --enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf], @@ -229,6 +238,10 @@ if test "${newlib_elix_level}" -gt "0"; then AC_DEFINE_UNQUOTED(_ELIX_LEVEL,${newlib_elix_level}) fi +if test "${newlib_io_c99_formats}" = "yes"; then +AC_DEFINE_UNQUOTED(_WANT_IO_C99_FORMATS) +fi + if test "${newlib_io_long_long}" = "yes"; then AC_DEFINE_UNQUOTED(_WANT_IO_LONG_LONG) fi @@ -308,7 +321,7 @@ if test "x${iconv_encodings}" != "x" \ for encoding in ${iconv_encodings1}; do result=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"` if test $? != "0"; then - AC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings) + AC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings) fi encoding1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'` iconv_encodings="${iconv_encodings} ${encoding1}" @@ -327,7 +340,7 @@ if test "x${iconv_encodings}" != "x" \ for encoding in ${iconv_encodings1}; do result=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"` if test $? != "0"; then - AC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings) + AC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings) fi encoding1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'` iconv_to_encodings="${iconv_to_encodings} ${encoding1}" @@ -344,7 +357,7 @@ if test "x${iconv_encodings}" != "x" \ for encoding in ${iconv_encodings1}; do result=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"` if test $? != "0"; then - AC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings) + AC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings) fi encoding1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'` iconv_from_encodings="${iconv_from_encodings} ${encoding1}" |