aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/aclocal.m4
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-18 21:12:23 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-18 21:12:23 +0000
commit0d289e52209ff3ed2aa3b742b4a6f85afd7596e9 (patch)
treef227d9b0c66bf08c91e9badf39e5b61ef9ffdd26 /libstdc++-v3/aclocal.m4
parent84994193d98adb513b0a62c25216a3468154f7c0 (diff)
2001-12-18 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Extended checking before enabling gnu model. * aclocal.m4: Rebuild. * configure: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/aclocal.m4')
-rw-r--r--libstdc++-v3/aclocal.m430
1 files changed, 28 insertions, 2 deletions
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index a06a86152c7..b945d5a2937 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -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