acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Extended checking before enabling gnu model.

2001-12-18  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Extended checking before
	enabling gnu model.
	* aclocal.m4: Rebuild.
	* configure: Rebuild.

From-SVN: r48163
This commit is contained in:
Benjamin Kosnik 2001-12-18 21:12:23 +00:00 committed by Benjamin Kosnik
parent e964a852b2
commit 1451a49295
4 changed files with 993 additions and 891 deletions

View File

@ -1,3 +1,10 @@
2001-12-18 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Extended checking before
enabling gnu model.
* aclocal.m4: Rebuild.
* configure: Rebuild.
2001-12-18 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>

View File

@ -1052,12 +1052,38 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
if test x$enable_clocale_flag = xno; then
case x${target_os} in
xlinux* | xgnu*)
AC_EGREP_CPP([ok], [
AC_EGREP_CPP([_GLIBCPP_ok], [
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
ok
_GLIBCPP_ok
#endif
], enable_clocale_flag=gnu, enable_clocale_flag=generic)
# Test for bugs early in glibc-2.2.x series
if test x$enable_clocale_flag = xgnu; then
AC_TRY_RUN([
#define _GNU_SOURCE 1
#include <locale.h>
int main()
{
const char __one[] = "Äuglein Augmen";
const char __two[] = "Äuglein";
int i;
int j;
__locale_t loc;
__locale_t loc_dup;
loc = __newlocale(1 << LC_ALL, "de_DE", 0);
loc_dup = __duplocale(loc);
i = __strcoll_l(__one, __two, loc);
j = __strcoll_l(__one, __two, loc_dup);
return 0;
}
],
[enable_clocale_flag=gnu],[enable_clocale_flag=generic],
[enable_clocale_flag=generic])
fi
# ... at some point put __strxfrm_l tests in as well.
;;
*)
enable_clocale_flag=generic

View File

@ -1064,12 +1064,38 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
if test x$enable_clocale_flag = xno; then
case x${target_os} in
xlinux* | xgnu*)
AC_EGREP_CPP([ok], [
AC_EGREP_CPP([_GLIBCPP_ok], [
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
ok
_GLIBCPP_ok
#endif
], enable_clocale_flag=gnu, enable_clocale_flag=generic)
# Test for bugs early in glibc-2.2.x series
if test x$enable_clocale_flag = xgnu; then
AC_TRY_RUN([
#define _GNU_SOURCE 1
#include <locale.h>
int main()
{
const char __one[] = "Äuglein Augmen";
const char __two[] = "Äuglein";
int i;
int j;
__locale_t loc;
__locale_t loc_dup;
loc = __newlocale(1 << LC_ALL, "de_DE", 0);
loc_dup = __duplocale(loc);
i = __strcoll_l(__one, __two, loc);
j = __strcoll_l(__one, __two, loc_dup);
return 0;
}
],
[enable_clocale_flag=gnu],[enable_clocale_flag=generic],
[enable_clocale_flag=generic])
fi
# ... at some point put __strxfrm_l tests in as well.
;;
*)
enable_clocale_flag=generic

1817
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff