From d814595c2c47096eb70ff15fffadc5218806aaec Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 1 May 2006 15:00:04 +0000 Subject: [PATCH] acinclude.m4 (GLIBCXX_ENABLE_WCHAR_T): Always check the presence of wctype.h, for use in GLIBCXX_ENABLE_C99. 2006-05-01 Paolo Carlini * acinclude.m4 (GLIBCXX_ENABLE_WCHAR_T): Always check the presence of wctype.h, for use in GLIBCXX_ENABLE_C99. * configure: Regenerate. From-SVN: r113413 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/acinclude.m4 | 5 ++++- libstdc++-v3/configure | 35 +++++++++++++++++++---------------- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e6d19ef49ff..2c03608cc64 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2006-05-01 Paolo Carlini + + * acinclude.m4 (GLIBCXX_ENABLE_WCHAR_T): Always check the + presence of wctype.h, for use in GLIBCXX_ENABLE_C99. + * configure: Regenerate. + 2006-04-29 Paolo Carlini * include/bits/locale_facets.tcc (num_get<>::_M_extract_float): diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 49b3b9dcd58..fcbc9677344 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1789,12 +1789,15 @@ AC_DEFUN([GLIBCXX_ENABLE_WCHAR_T], [ AC_DEFINE(HAVE_MBSTATE_T,1,[Define if mbstate_t exists in wchar.h.]) fi + # Test it always, for use in GLIBCXX_ENABLE_C99, together with + # ac_has_wchar_h. + AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no) + if test x"$enable_wchar_t" = x"yes"; then AC_LANG_SAVE AC_LANG_CPLUSPLUS - AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no) if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then AC_TRY_COMPILE([#include diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 5a8f89392cd..72dceb40891 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -6471,7 +6471,6 @@ echo "${ECHO_T}$enable_long_long" >&6 - # Check whether --enable-wchar_t or --disable-wchar_t was given. if test "${enable_wchar_t+set}" = set; then enableval="$enable_wchar_t" @@ -6698,17 +6697,8 @@ _ACEOF fi - if test x"$enable_wchar_t" = x"yes"; then - - - - ac_ext=cc -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - + # Test it always, for use in GLIBCXX_ENABLE_C99, together with + # ac_has_wchar_h. for ac_header in wctype.h do @@ -6743,7 +6733,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 @@ -6787,8 +6777,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -6808,7 +6798,7 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -6861,6 +6851,18 @@ fi done + + if test x"$enable_wchar_t" = x"yes"; then + + + + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test x"$ac_has_wchar_h" = xyes && test x"$ac_has_wctype_h" = xyes; then cat >conftest.$ac_ext <<_ACEOF @@ -6995,6 +6997,7 @@ echo $ECHO_N "checking for enabled wchar_t specializations... $ECHO_C" >&6 echo "${ECHO_T}$enable_wchar_t" >&6 + # Check whether --enable-c99 or --disable-c99 was given. if test "${enable_c99+set}" = set; then enableval="$enable_c99" -- 2.30.2