X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Facinclude.m4;h=74e8eaffe0a5efcb3e8898b5f6200d35ae95c928;hb=11135080fc2fb4f03ff1869cee70fb3f9ddab49c;hp=b3ce3dbe3d9b837e75e9e17cc9ce088a1889f82b;hpb=2720e16b87e0b944e0cbde7531290467367209d4;p=gcc.git diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index b3ce3dbe3d9..74e8eaffe0a 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1052,8 +1052,8 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ vscanf("%i", args); vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args); - }], - [snprintf("12", 0, "%i");], + snprintf(fmt, 0, "%i"); + }], [], [glibcxx_cv_c99_stdio=yes], [glibcxx_cv_c99_stdio=no]) ]) AC_MSG_RESULT($glibcxx_cv_c99_stdio) @@ -1777,7 +1777,7 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ in namespace std::tr1.]) fi - # Check for the existence of whcar_t functions (NB: doesn't + # Check for the existence of wchar_t functions (NB: doesn't # make sense if the glibcxx_cv_c99_stdint_tr1 check fails, per C99, 7.8/1). ac_c99_inttypes_wchar_t_tr1=no; if test x"$glibcxx_cv_c99_stdint_tr1" = x"yes"; then @@ -1989,6 +1989,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ darwin* | freebsd*) enable_clocale_flag=darwin ;; + dragonfly*) + enable_clocale_flag=dragonfly + ;; openbsd*) enable_clocale_flag=newlib ;; @@ -2081,6 +2084,23 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h ;; + dragonfly) + AC_MSG_RESULT(dragonfly) + + CLOCALE_H=config/locale/generic/c_locale.h + CLOCALE_CC=config/locale/dragonfly/c_locale.cc + CCODECVT_CC=config/locale/generic/codecvt_members.cc + CCOLLATE_CC=config/locale/generic/collate_members.cc + CCTYPE_CC=config/locale/dragonfly/ctype_members.cc + CMESSAGES_H=config/locale/generic/messages_members.h + CMESSAGES_CC=config/locale/generic/messages_members.cc + CMONEY_CC=config/locale/generic/monetary_members.cc + CNUMERIC_CC=config/locale/generic/numeric_members.cc + CTIME_H=config/locale/generic/time_members.h + CTIME_CC=config/locale/generic/time_members.cc + CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h + ;; + gnu) AC_MSG_RESULT(gnu) @@ -3353,7 +3373,7 @@ changequote([,])dnl fi # For libtool versioning info, format is CURRENT:REVISION:AGE -libtool_VERSION=6:20:0 +libtool_VERSION=6:21:0 # Everything parsed; figure out what files and settings to use. case $enable_symvers in @@ -3523,25 +3543,7 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ #ifndef __GTHREADS_CXX0X #error #endif - ], [case $target_os in - # gthreads support breaks symbol versioning on Solaris 9 (PR - # libstdc++/52189). - solaris2.9*) - if test x$enable_symvers = xno; then - ac_has_gthreads=yes - elif test x$enable_libstdcxx_threads = xyes; then - AC_MSG_WARN([You have requested C++11 threads support, but]) - AC_MSG_WARN([this breaks symbol versioning.]) - ac_has_gthreads=yes - else - ac_has_gthreads=no - fi - ;; - *) - ac_has_gthreads=yes - ;; - esac], - [ac_has_gthreads=no]) + ], [ac_has_gthreads=yes], [ac_has_gthreads=no]) else ac_has_gthreads=no fi @@ -3804,7 +3806,7 @@ dnl Check to see if sys/sdt.h exists and that it is suitable for use. dnl Some versions of sdt.h were not compatible with C++11. dnl AC_DEFUN([GLIBCXX_CHECK_SDT_H], [ - AC_MSG_RESULT([for suitable sys/sdt.h]) + AC_MSG_CHECKING([for suitable sys/sdt.h]) # Note that this test has to be run with the C language. # Otherwise, sdt.h will try to include some headers from # libstdc++ itself. @@ -3829,6 +3831,58 @@ AC_DEFUN([GLIBCXX_CHECK_SDT_H], [ AC_MSG_RESULT($glibcxx_cv_sys_sdt_h) ]) +dnl +dnl Control whether the library should define symbols for old and new ABIs. +dnl This affects definitions of strings, stringstreams and locale facets. +dnl +dnl --disable-libstdcxx-dual-abi will use old ABI for all types. +dnl +dnl Defines: +dnl _GLIBCXX_USE_DUAL_ABI (always defined, either to 1 or 0) +dnl +AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI], [ + GLIBCXX_ENABLE(libstdcxx-dual-abi,$1,,[support two versions of std::string]) + if test x"$enable_libstdcxx_dual_abi" != xyes; then + AC_MSG_NOTICE([dual ABI is disabled]) + default_libstdcxx_abi="c++98" + fi + GLIBCXX_CONDITIONAL(ENABLE_DUAL_ABI, test $enable_libstdcxx_dual_abi = yes) +]) + +dnl +dnl Check to see which ABI should be enabled by default. +dnl +dnl --with-default-libstdcxx-abi={c++98,c++11} +dnl +dnl Defines: +dnl _GLIBCXX_USE_CXX11_ABI (always defined, either to 1 or 0) +dnl +AC_DEFUN([GLIBCXX_DEFAULT_ABI], [ + if test x$enable_libstdcxx_dual_abi = xyes; then + AC_MSG_CHECKING([for default std::string ABI to use]) + AC_ARG_WITH([default-libstdcxx-abi], + AS_HELP_STRING([--with-default-libstdcxx-abi], + [set the std::string ABI to use by default]), + [case "$withval" in + c++98|gnu++98|c++03|gnu++03) default_libstdcxx_abi="c++98" ;; + c++1?|gnu++1?) default_libstdcxx_abi="c++11" ;; + *) AC_MSG_ERROR([Invalid argument for --with-default-libstdcxx-abi]) ;; + esac], + [default_libstdcxx_abi="c++11"]) + AC_MSG_RESULT(${default_libstdcxx_abi}) + fi + if test $default_libstdcxx_abi = "c++11"; then + glibcxx_cxx11_abi=1 + glibcxx_cxx98_abi=0 + else + glibcxx_cxx11_abi=0 + glibcxx_cxx98_abi=1 + fi + AC_SUBST(glibcxx_cxx98_abi) + GLIBCXX_CONDITIONAL(ENABLE_CXX11_ABI, test $glibcxx_cxx11_abi = 1) +]) + + # Macros from the top-level gcc directory. m4_include([../config/gc++filt.m4]) m4_include([../config/tls.m4])