URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [configure.in] - Rev 352
Go to most recent revision | Compare with Previous | Blame | View Log
dnl This is the newlib configure.in file.dnl Process this file with autoconf to produce a configure script.AC_PREREQ(2.59)AC_INIT([newlib],[NEWLIB_VERSION])AC_CONFIG_SRCDIR([libc])AC_CONFIG_HEADER(newlib.h:newlib.hin)dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.AC_CONFIG_AUX_DIR(..)dnl Support --enable-newlib-io-pos-argsdnl This option is actually read in libc/configure.in. It is repeateddnl 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}" inyes) 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=])dnldnl Support --enable-newlib-io-c99-formatsAC_ARG_ENABLE(newlib-io-c99-formats,[ --enable-newlib-io-c99-formats enable C99 support in IO functions like printf/scanf],[case "${enableval}" inyes) 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=])dnldnl Support --enable-newlib-io-long-longAC_ARG_ENABLE(newlib-io-long-long,[ --enable-newlib-io-long-long enable long long type support in IO functions like printf/scanf],[case "${enableval}" inyes) newlib_io_long_long=yes;;no) newlib_io_long_long=no ;;*) AC_MSG_ERROR(bad value ${enableval} for newlib-io-long-long option) ;;esac], [newlib_io_long_long=])dnldnl Support --enable-newlib-io-long-doubleAC_ARG_ENABLE(newlib-io-long-double,[ --enable-newlib-io-long-double enable long double type support in IO functions printf/scanf],[case "${enableval}" inyes) newlib_io_long_double=yes;;no) newlib_io_long_double=no ;;*) AC_MSG_ERROR(bad value ${enableval} for newlib-io-long-double option) ;;esac], [newlib_io_long_double=])dnldnl If multibyte support is enabled, iconv should be enabled toodnl Support --enable-newlib-mbAC_ARG_ENABLE(newlib-mb,[ --enable-newlib-mb enable multibyte support],[case "${enableval}" inyes) newlib_mb=yes;;no) newlib_mb=no ;;*) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;;esac], [newlib_mb=])dnldnl Support --enable-newlib-iconv-encodingsAC_ARG_ENABLE(newlib-iconv-encodings,[ --enable-newlib-iconv-encodings enable specific comma-separated list of bidirectional iconv encodings to be built-in],[if test x${enableval} = x; thenAC_MSG_ERROR(bad value ${enableval} for newlib-iconv-encodings option - use comma-separated encodings list)fiiconv_encodings=${enableval}], [iconv_encodings=])dnldnl Support --enable-newlib-iconv-from-encodingsAC_ARG_ENABLE(newlib-iconv-from-encodings,[ --enable-newlib-iconv-from-encodings enable specific comma-separated list of \"from\" iconv encodings to be built-in],[if test x${enableval} = x; thenAC_MSG_ERROR(bad value ${enableval} for newlib-iconv-from-encodings option - use comma-separated encodings list)fiiconv_from_encodings=${enableval}], [iconv_from_encodings=])dnldnl Support --enable-newlib-iconv-to-encodingsAC_ARG_ENABLE(newlib-iconv-to-encodings,[ --enable-newlib-iconv-to-encodings enable specific comma-separated list of \"to\" iconv encodings to be built-in],[if test x${enableval} = x; thenAC_MSG_ERROR(bad value ${enableval} for newlib-iconv-to-encodings option - use comma-separated encodings list)fiiconv_to_encodings=${enableval}], [iconv_to_encodings=])dnldnl Support --enable-newlib-iconv-external-ccsAC_ARG_ENABLE(newlib-iconv-external-ccs,[ --enable-newlib-iconv-external-ccs enable capabilities to load external CCS files for iconv],[if test "${newlib_iconv_external_ccs+set}" != set; thencase "${enableval}" inyes) newlib_iconv_external_ccs=yes ;;no) newlib_iconv_external_ccs=no ;;*) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv-external-ccs option) ;;esacfi], [newlib_iconv_external_ccs=${newlib_iconv_external_ccs}])dnldnl Support --disable-newlib-atexit-dynamic-allocAC_ARG_ENABLE(newlib-atexit-dynamic-alloc,[ --disable-newlib-atexit-alloc disable dynamic allocation of atexit entries],[if test "${newlib_atexit_dynamic_alloc+set}" != set; thencase "${enableval}" inyes) newlib_atexit_dynamic_alloc=yes ;;no) newlib_atexit_dynamic_alloc=no ;;*) AC_MSG_ERROR(bad value ${enableval} for newlib-atexit-dynamic-alloc option) ;;esacfi], [newlib_atexit_dynamic_alloc=${newlib_atexit_dynamic_alloc}])dnldnl Support --enable-newlib-reent-smallAC_ARG_ENABLE(newlib-reent-small,[ --enable-newlib-reent-small enable small reentrant struct support],[case "${enableval}" inyes) newlib_reent_small=yes;;no) newlib_reent_small=no ;;*) AC_MSG_ERROR(bad value ${enableval} for newlib-reent-small option) ;;esac], [newlib_reent_small=])dnlNEWLIB_CONFIGURE(.)dnl We have to enable libtool after NEWLIB_CONFIGURE because if we try anddnl add it into NEWLIB_CONFIGURE, executable tests are made before the firstdnl line of the macro which fail because appropriate LDFLAGS are not set._LT_DECL_SEDAC_PROG_AWKif test "${use_libtool}" = "yes"; thenAC_LIBTOOL_WIN32_DLLAM_PROG_LIBTOOLfiAC_ARG_ENABLE(newlib_hw_fp,[ --enable-newlib-hw-fp Turn on hardware floating point math],[case "${enableval}" inyes) 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)# These get added in the top-level configure.in, except in the case where# newlib is being built natively.LIBC_INCLUDE_GREP=`echo ${CC} | grep \/libc\/include`abs_newlib_basedir=`cd ${newlib_basedir} && pwd`if test -z "${LIBC_INCLUDE_GREP}"; thenCC_FOR_NEWLIB="${CC} -I$PWD/targ-include -I${abs_newlib_basedir}/libc/include"elseCC_FOR_NEWLIB="${CC}"fiAC_SUBST(CC_FOR_NEWLIB)AC_CONFIG_SUBDIRS(libc)AC_CONFIG_SUBDIRS(libm)if test -z "${with_multisubdir}"; thenAC_CONFIG_SUBDIRS(doc)have_doc=yeselsehave_doc=fiAM_CONDITIONAL(HAVE_DOC, test x$have_doc = xyes)EXTRA_DIRS=case $host ini[[34567]]86-pc-linux-*)AC_CONFIG_SUBDIRS(iconvdata)EXTRA_DIRS=iconvdata;;esacAC_SUBST(EXTRA_DIRS)CRT0=CRT0_DIR=if test "x${have_crt0}" = "xyes"; thenCRT0=crt0.oCRT0_DIR=libc/fiAC_SUBST(CRT0)AC_SUBST(CRT0_DIR)CRT1=${crt1}CRT1_DIR=if test -n "${crt1_dir}"; thenCRT1_DIR=${crt1_dir}/fiAC_SUBST(CRT1)AC_SUBST(CRT1_DIR)if test -n "${libm_machine_dir}"; thenLIBM_MACHINE_OBJECTLIST=libm/machine/${libm_machine_dir}/objectlist.awk.infiAC_SUBST(LIBM_MACHINE_OBJECTLIST)if test -n "${machine_dir}"; thenMACHINE_OBJECTLIST=libc/machine/${machine_dir}/objectlist.awk.infiAC_SUBST(MACHINE_OBJECTLIST)if test -n "${sys_dir}"; thenSYS_OBJECTLIST=libc/sys/${sys_dir}/objectlist.awk.infiAC_SUBST(SYS_OBJECTLIST)if test "${have_sys_mach_dir}" = "yes"; thenSYS_MACH_OBJECTLIST=libc/sys/${sys_dir}/machine/${machine_dir}/objectlist.awk.infiAC_SUBST(SYS_MACH_OBJECTLIST)if test -n "${posix_dir}"; thenPOSIX_OBJECTLIST=libc/${posix_dir}/objectlist.awk.infiAC_SUBST(POSIX_OBJECTLIST)if test -n "${signal_dir}"; thenSIGNAL_OBJECTLIST=libc/${signal_dir}/objectlist.awk.infiAC_SUBST(SIGNAL_OBJECTLIST)if test -n "${syscall_dir}"; thenSYSCALL_OBJECTLIST=libc/${syscall_dir}/objectlist.awk.infiAC_SUBST(SYSCALL_OBJECTLIST)if test -n "${unix_dir}"; thenUNIX_OBJECTLIST=libc/${unix_dir}/objectlist.awk.infiAC_SUBST(UNIX_OBJECTLIST)if test -n "${stdio64_dir}"; thenSTDIO64_OBJECTLIST=libc/${stdio64_dir}/objectlist.awk.infiAC_SUBST(STDIO64_OBJECTLIST)# Put a plausible default for CC_FOR_BUILD in Makefile.if test -z "$CC_FOR_BUILD"; thenCC_FOR_BUILD=gccfiAC_SUBST(CC_FOR_BUILD)if test "${newlib_elix_level}" -gt "0"; thenAC_DEFINE_UNQUOTED(_ELIX_LEVEL,${newlib_elix_level})fiif test "${newlib_io_c99_formats}" = "yes"; thenAC_DEFINE_UNQUOTED(_WANT_IO_C99_FORMATS)fiif test "${newlib_io_long_long}" = "yes"; thenAC_DEFINE_UNQUOTED(_WANT_IO_LONG_LONG)fiif test "${newlib_io_long_double}" = "yes"; thenAC_DEFINE_UNQUOTED(_WANT_IO_LONG_DOUBLE)fiif test "${newlib_io_pos_args}" = "yes"; thenAC_DEFINE_UNQUOTED(_WANT_IO_POS_ARGS)fiif test "${newlib_reent_small}" = "yes"; thenAC_DEFINE_UNQUOTED(_WANT_REENT_SMALL)fiif test "${newlib_mb}" = "yes"; thenAC_DEFINE_UNQUOTED(_MB_CAPABLE)AC_DEFINE_UNQUOTED(_MB_LEN_MAX,8)elseAC_DEFINE_UNQUOTED(_MB_LEN_MAX,1)fiif test "${newlib_iconv_external_ccs}" = "yes"; thenAC_DEFINE_UNQUOTED(_ICONV_ENABLE_EXTERNAL_CCS)fiAC_DEFINE_UNQUOTED(_NEWLIB_VERSION,"NEWLIB_VERSION")if test "${multilib}" = "yes"; thenmultilib_arg="--enable-multilib"elsemultilib_arg=fiif test "${newlib_iconv}" = "yes"; thenAC_DEFINE_UNQUOTED(_ICONV_ENABLED,1)fiif test "x${newlib_iconv_external_ccs}" = "xyes"; thenif test "x${newlib_iconv}" = "x"; thenAC_MSG_ERROR(--enable-newlib-iconv-external-ccs option can't be used if iconv library is disabled, use --enable-newlib-iconv to enable it.)fiAC_DEFINE_UNQUOTED(_ICONV_ENABLE_EXTERNAL_CCS,1)fiif test "${newlib_atexit_dynamic_alloc}" = "yes"; thenAC_DEFINE_UNQUOTED(_ATEXIT_DYNAMIC_ALLOC)fidnldnl Parse --enable-newlib-iconv-encodings option argumentdnlif test "x${iconv_encodings}" != "x" \|| test "x${iconv_to_encodings}" != "x" \|| test "x${iconv_from_encodings}" != "x"; thenif test "x${newlib_iconv}" = "x"; thenAC_MSG_ERROR([--enable-newlib-iconv-encodings, --enable-newlib-iconv-from-encodings and --enable-newlib-iconv-to-encodings option can't be used if iconv library is disabled, use --enable-newlib-iconv to enable it.])fidnl Normalize encodings names and delete commasiconv_encodings=`echo "${iconv_encodings}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`iconv_to_encodings=`echo "${iconv_to_encodings}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`iconv_from_encodings=`echo "${iconv_from_encodings}" | sed -e 's/,/ /g' -e 's/-/_/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`dnl Get the list of available encodings excluding commentsdnl Join line with previous if the first character is whitespaceavailable_encodings=`cat "${srcdir}/libc/iconv/encoding.aliases" | sed -e '/^#.*/d'`dnl Check if required encodings are supporteddnl Convert aliases to namesdnl iconv_encodingsiconv_encodings1="${iconv_encodings}"iconv_encodings=""for encoding in ${iconv_encodings1}; doresult=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"`if test $? != "0"; thenAC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings)fiencoding1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'`iconv_encodings="${iconv_encodings} ${encoding1}"donednl Enable appropriate option in newlib.hfor encoding in ${iconv_encodings}; doopt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`AC_DEFINE_UNQUOTED($opt,1)opt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`AC_DEFINE_UNQUOTED($opt,1)donednl iconv_to_encodingsiconv_encodings1="${iconv_to_encodings}"iconv_to_encodings=""for encoding in ${iconv_encodings1}; doresult=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"`if test $? != "0"; thenAC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings)fiencoding1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'`iconv_to_encodings="${iconv_to_encodings} ${encoding1}"donednl Enable appropriate option in newlib.hfor encoding in ${iconv_to_encodings}; doopt=_ICONV_TO_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`AC_DEFINE_UNQUOTED($opt,1)donednl iconv_from_encodingsiconv_encodings1="${iconv_from_encodings}"iconv_from_encodings=""for encoding in ${iconv_encodings1}; doresult=`echo "${available_encodings}" | grep -e "\(^\| \)${encoding}\( \|\$\)"`if test $? != "0"; thenAC_MSG_ERROR(${encoding} is not supported - see ${srcdir}/libc/iconv/encoding.aliases file for the list of available encodings)fiencoding1=`echo "${result}" | sed -e 's/\(^[[^ ]]*\).*$/\1/'`iconv_from_encodings="${iconv_from_encodings} ${encoding1}"donednl Enable appropriate option in newlib.hfor encoding in ${iconv_from_encodings}; doopt=_ICONV_FROM_ENCODING_`echo "${encoding}" | sed -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`AC_DEFINE_UNQUOTED($opt,1)donefi;AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,libc_cv_initfinit_array, [dnlcat > conftest.c <<EOFint _start (void) { return 0; }int __start (void) { return 0; }int foo (void) { return 1; }int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;EOFif AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest conftest.c1>&AS_MESSAGE_LOG_FD])thenif ${READELF} -S conftest | grep -e INIT_ARRAY > /dev/null; thenlibc_cv_initfinit_array=yeselselibc_cv_initfinit_array=nofielselibc_cv_initfinit_array=nofirm -f conftest*])AC_SUBST(libc_cv_initfinit_array)if test $libc_cv_initfinit_array = yes; thenAC_DEFINE_UNQUOTED(HAVE_INITFINI_ARRAY)fidnl Autoconf 2.59 doesn't support the AC_TYPE_LONG_DOUBLE macro. Instead of:dnl AC_TYPE_LONG_DOUBLEdnl AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")dnl we specify our own long double test.dnl Additionally, ac_cv_objext is broken so that AC_COMPILE_IFELSE cannot bednl used, so use AC_TRY_COMMAND instead.AC_CACHE_CHECK(whether long double type exists,acnewlib_cv_type_long_double, [dnlcat > conftest.c <<EOF/* Check two ways: float.h defines and direct type declaration. */#include <float.h>#if defined(LDBL_MANT_DIG)#define _HAVE_LONG_DOUBLE#else#error "LDBL != DBL"#endiflong double test() {long double ld = 0.0L;return ld;}EOFif AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c1>&AS_MESSAGE_LOG_FD])thenacnewlib_cv_type_long_double=yes;elseacnewlib_cv_type_long_double=no;firm -f conftest*])if test $acnewlib_cv_type_long_double = yes; thenAC_DEFINE_UNQUOTED(_HAVE_LONG_DOUBLE)fiAM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$acnewlib_cv_type_long_double" = x"yes")AC_CACHE_CHECK(whether long double equals double,newlib_cv_ldbl_eq_dbl, [dnlcat > conftest.c <<EOF#include <float.h>#if DBL_MANT_DIG == LDBL_MANT_DIG && LDBL_MIN_EXP == DBL_MIN_EXP && \LDBL_MAX_EXP == DBL_MAX_EXP#define _LDBL_EQ_DBL#else#error "LDBL != DBL"#endifEOFif AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c1>&AS_MESSAGE_LOG_FD])thennewlib_cv_ldbl_eq_dbl=yes;elsenewlib_cv_ldbl_eq_dbl=no;firm -f conftest*])if test $newlib_cv_ldbl_eq_dbl = yes; thenAC_DEFINE_UNQUOTED(_LDBL_EQ_DBL)fiAC_SUBST(CFLAGS)AC_CONFIG_FILES([Makefile],[if test -n "$CONFIG_FILES"; thenunset ac_file. ${newlib_basedir}/../config-ml.infi],srcdir=${srcdir}host=${host}with_multisubdir=${with_multisubdir}ac_configure_args="${multilib_arg} ${ac_configure_args}"CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}newlib_basedir=${newlib_basedir}CC="${CC}"LDFLAGS="${LDFLAGS}")AC_OUTPUT
Go to most recent revision | Compare with Previous | Blame | View Log
