# Start by getting the version number. I think the libtool test already
# does some of this, but throws away the result.
- AC_MSG_CHECKING([for ld version])
- changequote(,)
- ldver=`$LD --version 2>/dev/null | head -1 | \
- sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
- changequote([,])
- glibcxx_gnu_ld_version=`echo $ldver | \
- $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
- AC_MSG_RESULT($glibcxx_gnu_ld_version)
+ if test x"$with_gnu_ld" = x"yes"; then
+ AC_MSG_CHECKING([for ld version])
+ changequote(,)
+ ldver=`$LD --version 2>/dev/null | head -1 | \
+ sed -e 's/GNU ld \(version \)\{0,1\}\(([^)]*) \)\{0,1\}\([0-9.][0-9.]*\).*/\3/'`
+ changequote([,])
+ glibcxx_gnu_ld_version=`echo $ldver | \
+ $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
+ AC_MSG_RESULT($glibcxx_gnu_ld_version)
+ fi
# Set --gc-sections.
glibcxx_gcsections_min_ld=21602
dnl
-dnl Check to see if this target can enable the iconv specializations.
-dnl If --disable-c-mbchar was given, no wchar_t specialization is enabled.
-dnl (This must have been previously checked, along with the rest of C99
-dnl support.) By default, iconv support is disabled.
-dnl
-dnl Defines:
-dnl _GLIBCXX_USE_ICONV if all the bits are found.
-dnl Substs:
-dnl LIBICONV to a -l string containing the iconv library, if needed.
-dnl
-AC_DEFUN([GLIBCXX_CHECK_ICONV_SUPPORT], [
-
- enable_iconv=no
- # Only continue checking if the ISO C99 headers exist and support is on.
- if test x"$enable_wchar_t" = xyes; then
-
- # Use iconv for wchar_t to char conversions. As such, check for
- # X/Open Portability Guide, version 2 features (XPG2).
- AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
- AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
-
- # Check for existence of libiconv.a providing XPG2 wchar_t support.
- AC_CHECK_LIB(iconv, iconv, LIBICONV="-liconv")
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
- AC_SUBST(LIBICONV)
-
- AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
- [ac_XPG2funcs=yes], [ac_XPG2funcs=no])
-
- LIBS="$ac_save_LIBS"
-
- if test x"$ac_has_iconv_h" = xyes &&
- test x"$ac_has_langinfo_h" = xyes &&
- test x"$ac_XPG2funcs" = xyes;
- then
- AC_DEFINE([_GLIBCXX_USE_ICONV],1,
- [Define if iconv and related functions exist and are usable.])
- enable_iconv=yes
- fi
- fi
- AC_MSG_CHECKING([for enabled iconv specializations])
- AC_MSG_RESULT($enable_iconv)
-])
-
-
-dnl
dnl Check for headers for, and arguments to, the setrlimit() function.
dnl Used only in testsuite_hooks.h. Called from GLIBCXX_CONFIGURE_TESTSUITE.
dnl
AC_DEFUN([GLIBCXX_EXPORT_FLAGS], [
# Optimization flags that are probably a good idea for thrill-seekers. Just
# uncomment the lines below and make, everything else is ready to go...
+ # Alternatively OPTIMIZE_CXXFLAGS can be set in configure.host.
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc
- OPTIMIZE_CXXFLAGS=
AC_SUBST(OPTIMIZE_CXXFLAGS)
WARN_FLAGS='-Wall -Wextra -Wwrite-strings -Wcast-qual'
# This is necessary even though libstdc++ uses the builtin versions
# of these functions, because if the builtin cannot be used, a reference
# to the library function is emitted.
+ AC_CHECK_HEADERS(tgmath.h, ac_has_tgmath_h=yes, ac_has_tgmath_h=no)
AC_CHECK_HEADERS(complex.h, ac_has_complex_h=yes, ac_has_complex_h=no)
ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then
dnl --enable-cheaders= [does stuff].
dnl --disable-cheaders [does not do anything, really].
dnl + Usage: GLIBCXX_ENABLE_CHEADERS[(DEFAULT)]
-dnl Where DEFAULT is either `c' or `c_std'.
+dnl Where DEFAULT is either 'c' or 'c_std' or 'c_global'.
dnl
AC_DEFUN([GLIBCXX_ENABLE_CHEADERS], [
GLIBCXX_ENABLE(cheaders,$1,[=KIND],
- [construct "C" headers for g++], [permit c|c_std])
+ [construct "C" headers for g++], [permit c|c_std|c_global])
AC_MSG_NOTICE("C" header strategy set to $enable_cheaders)
C_INCLUDE_DIR='${glibcxx_srcdir}/include/'$enable_cheaders
+ # Allow overrides to configure.host here.
+ if test $enable_cheaders = c_global; then
+ c_compatibility=yes
+ fi
+
+ if test $enable_cheaders = c_global || test $enable_cheaders = c_std; then
+ c_extra=yes
+ fi
+
AC_SUBST(C_INCLUDE_DIR)
GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C, test $enable_cheaders = c)
GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_STD, test $enable_cheaders = c_std)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_C_GLOBAL, test $enable_cheaders = c_global)
GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_COMPATIBILITY, test $c_compatibility = yes)
+ GLIBCXX_CONDITIONAL(GLIBCXX_C_HEADERS_EXTRA, test $c_extra = yes)
])
}
EOF
old_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -S"
+ CXXFLAGS=-S
if AC_TRY_EVAL(ac_compile); then
if grep __sync_fetch_and_add conftest.s >/dev/null 2>&1 ; then
enable_atomic_builtins=no
# Turn a 'yes' into a suitable default.
if test x$enable_symvers = xyes ; then
- if test $enable_shared = no || test "x$LD" = x ; then
+ if test $enable_shared = no || test "x$LD" = x || test x$gcc_no_link = xyes; then
enable_symvers=no
else
if test $with_gnu_ld = yes ; then