gcc/libstdc++-v3/crossconfig.m4

271 lines
6.8 KiB
Plaintext
Raw Normal View History

dnl
dnl This file contains details for non-native builds.
dnl
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
# Base decisions on target environment.
case "${host}" in
arm*-*-symbianelf*)
# This is a freestanding configuration; there is nothing to do here.
;;
mips*-sde-elf*)
# These definitions are for the SDE C library rather than newlib.
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_COMPILER_FEATURES
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_HYPOT)
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_LDEXPF)
AC_DEFINE(HAVE_MODF)
AC_DEFINE(HAVE_SQRTF)
;;
*-aix*)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
# We don't yet support AIX's TLS ABI.
#GCC_CHECK_TLS
AM_ICONV
;;
*-darwin*)
# Darwin versions vary, but the linker should work in a cross environment,
# so we just check for all the features here.
# Check for available headers.
# Don't call GLIBCXX_CHECK_LINKER_FEATURES, Darwin doesn't have a GNU ld
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
;;
*djgpp)
# GLIBCXX_CHECK_MATH_SUPPORT
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_SINCOS)
AC_DEFINE(HAVE_HYPOT)
;;
*-freebsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_SETENV)
AC_DEFINE(HAVE_FINITEF)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_HYPOT)
AC_DEFINE(HAVE_HYPOTF)
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_ISNANF)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)
AC_DEFINE(HAVE_ATAN2F)
AC_DEFINE(HAVE_ATANF)
AC_DEFINE(HAVE_CEILF)
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSHF)
AC_DEFINE(HAVE_EXPF)
AC_DEFINE(HAVE_FABSF)
AC_DEFINE(HAVE_FLOORF)
AC_DEFINE(HAVE_FMODF)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_LDEXPF)
AC_DEFINE(HAVE_LOG10F)
AC_DEFINE(HAVE_LOGF)
AC_DEFINE(HAVE_MODFF)
AC_DEFINE(HAVE_POWF)
AC_DEFINE(HAVE_SINF)
AC_DEFINE(HAVE_SINHF)
AC_DEFINE(HAVE_SQRTF)
AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF)
if test x"long_double_math_on_this_cpu" = x"yes"; then
AC_DEFINE(HAVE_FINITEL)
AC_DEFINE(HAVE_ISINFL)
AC_DEFINE(HAVE_ISNANL)
fi
;;
*-hpux*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
# GLIBCXX_CHECK_MATH_SUPPORT
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_HYPOT)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)
AC_DEFINE(HAVE_ATANF)
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSHF)
AC_DEFINE(HAVE_SINF)
AC_DEFINE(HAVE_SINHF)
AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF)
AC_DEFINE(HAVE_EXPF)
AC_DEFINE(HAVE_ATAN2F)
AC_DEFINE(HAVE_FABSF)
AC_DEFINE(HAVE_FMODF)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_LOGF)
AC_DEFINE(HAVE_LOG10F)
AC_DEFINE(HAVE_MODF)
AC_DEFINE(HAVE_POWF)
AC_DEFINE(HAVE_SQRTF)
# GLIBCXX_CHECK_STDLIB_SUPPORT
AC_DEFINE(HAVE_STRTOLD)
GCC_CHECK_TLS
case "$target" in
*-hpux10*)
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_ISINFF)
AC_DEFINE(HAVE_ISNANF)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FINITEF)
;;
esac
;;
*-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
GLIBCXX_CHECK_COMPILER_FEATURES
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1)
GCC_CHECK_TLS
AM_ICONV
;;
*-mingw32*)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
;;
*-netbsd*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_FINITEF)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_HYPOTF)
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_ISINFF)
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_ISNANF)
if test x"long_double_math_on_this_cpu" = x"yes"; then
AC_DEFINE(HAVE_FINITEL)
AC_DEFINE(HAVE_ISINFL)
AC_DEFINE(HAVE_ISNANL)
fi
;;
*-qnx6.1* | *-qnx6.2*)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSL)
AC_DEFINE(HAVE_COSHF)
AC_DEFINE(HAVE_COSHL)
AC_DEFINE(HAVE_LOGF)
AC_DEFINE(HAVE_LOGL)
AC_DEFINE(HAVE_LOG10F)
AC_DEFINE(HAVE_LOG10L)
AC_DEFINE(HAVE_SINF)
AC_DEFINE(HAVE_SINL)
AC_DEFINE(HAVE_SINHF)
AC_DEFINE(HAVE_SINHL)
;;
*-rtems*)
GLIBCXX_CHECK_COMPILER_FEATURES
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
;;
*-solaris*)
case "$target" in
*-solaris2.8 | *-solaris2.9 | *-solaris2.10)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_MBSTATE_T)
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FPCLASS)
# All of the dependencies for wide character support are here, so
enc_filebuf.h: Resurrect, update. 2007-01-29 Benjamin Kosnik <bkoz@redhat.com> * include/ext/enc_filebuf.h: Resurrect, update. * include/ext/codecvt_specializations.h: Remove _GLIBCXX_USE_ICONV, _GLIBCXX_USE_ENCODING_STATE. * include/bits/localefwd.h: Remove declaration for __enc_traits. * docs/html/22_locale/codecvt.html: Change __enc_traits to encoding_state. * scripts/testsuite_flags.in: Remove ICONV. * configure.ac: Remove GLIBCXX_CHECK_ICONV_SUPPORT. * acinclude.m4 (GLIBCXX_CHECK_ICONV_SUPPORT): Remove. * crossconfig.m4: Remove use of GLIBCXX_CHECK_ICONV_SUPPORT. * config.h.in: Remove HAVE_ICONV_CLOSE, HAVE_ICONV_OPEN, HAVE_NL_LANGINFO, _GLIBCXX_USE_ICONV. * include/Makefile.am: Uglify ICONV_CONST. * configure: Regenerate. * aclocal.m4: Regenerate. * Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * libmath/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/ext/enc_filebuf/wchar_t/13189.cc: Use dg-require-iconv, fix up for encoding_state changes. * testsuite/ext/enc_filebuf/char/13189.cc: Same. * testsuite/ext/enc_filebuf/char/13598.cc: Same. * testsuite/22_locale/codecvt/unicode: Move... * testsuite/22_locale/codecvt/unicode/char.cc: Move... * testsuite/22_locale/codecvt/unicode/1.cc: Move... * testsuite/22_locale/codecvt/unicode/wchar_t.cc: Move... * testsuite/ext/codecvt: New. * testsuite/ext/codecvt/char-1.cc: ...here. Also, use dg-require-iconv. * testsuite/ext/codecvt/char-2.cc: ...here. Same. * testsuite/ext/codecvt/1.cc: ...here. Same. * testsuite/ext/codecvt/wchar_t.cc: ...here. Same. * testsuite/22_locale/locale/cons/unicode: Delete directory. * testsuite/22_locale/locale/cons/unicode/1.cc: Move... * testsuite/22_locale/locale/cons/unicode.cc: ...here. From-SVN: r121297
2007-01-29 19:22:37 +01:00
# turn it on.
AC_DEFINE(_GLIBCXX_USE_WCHAR_T)
;;
esac
case "$target" in
*-*-solaris2.10)
# These two C99 functions are present only in Solaris >= 10
AC_DEFINE(HAVE_STRTOF)
AC_DEFINE(HAVE_STRTOLD)
;;
esac
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_ISNANF)
AC_DEFINE(HAVE_MODFF)
AC_DEFINE(HAVE_HYPOT)
;;
*-tpf)
SECTION_FLAGS='-ffunction-sections -fdata-sections'
AC_SUBST(SECTION_FLAGS)
GLIBCXX_CHECK_LINKER_FEATURES
AC_DEFINE(HAVE_FINITE)
AC_DEFINE(HAVE_FINITEF)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_HYPOTF)
AC_DEFINE(HAVE_ISINF)
AC_DEFINE(HAVE_ISINFF)
AC_DEFINE(HAVE_ISNAN)
AC_DEFINE(HAVE_ISNANF)
AC_DEFINE(HAVE_SINCOS)
AC_DEFINE(HAVE_SINCOSF)
if test x"long_double_math_on_this_cpu" = x"yes"; then
AC_DEFINE(HAVE_FINITEL)
AC_DEFINE(HAVE_HYPOTL)
AC_DEFINE(HAVE_ISINFL)
AC_DEFINE(HAVE_ISNANL)
fi
;;
*-vxworks)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)
AC_DEFINE(HAVE_ATAN2F)
AC_DEFINE(HAVE_ATANF)
AC_DEFINE(HAVE_CEILF)
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSHF)
AC_DEFINE(HAVE_EXPF)
AC_DEFINE(HAVE_FABSF)
AC_DEFINE(HAVE_FLOORF)
AC_DEFINE(HAVE_FMODF)
AC_DEFINE(HAVE_HYPOT)
AC_DEFINE(HAVE_LOG10F)
AC_DEFINE(HAVE_LOGF)
AC_DEFINE(HAVE_POWF)
AC_DEFINE(HAVE_SINF)
AC_DEFINE(HAVE_SINHF)
AC_DEFINE(HAVE_SQRTF)
AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF)
;;
*)
AC_MSG_ERROR([No support for this host/target combination.])
;;
esac
])