]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
fix another logical/physical coords confusion and update the comment to help with...
[wxWidgets.git] / configure.in
index ff46cc9b4d2e9a606385c63580803ec821585d23..9c13d6a5d04c64e98583c30554c1b77ae9dfc39d 100644 (file)
@@ -4998,20 +4998,45 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
           AC_MSG_WARN([wxMutex won't be recursive on this platform])
         fi
       fi
-
+    
       dnl test for compiler thread-specific variables support
       AC_CACHE_CHECK([for __thread keyword],
                      wx_cv_cc___thread,
-      [
-          AC_TRY_COMPILE([#include <pthread.h>],
-              [
-                  static __thread int n = 0;
-                  static __thread int *p = 0;
-              ],
-              wx_cv_cc___thread=yes,
-              wx_cv_cc___thread=no
-          )
-      ])
+          [
+              AC_TRY_COMPILE([#include <pthread.h>],
+                  [
+                      static __thread int n = 0;
+                      static __thread int *p = 0;
+                  ],
+                  wx_cv_cc___thread=yes,
+                  wx_cv_cc___thread=no
+              )
+          ]
+      )
+
+      if test "$wx_cv_cc___thread" = "yes"; then
+          AX_GXX_VERSION
+          if test -n "$ax_cv_gxx_version"; then
+              dnl g++ supports __thread since at least version 3.3 but its support
+              dnl seems to be broken until 4.1, see
+              dnl   http://thread.gmane.org/gmane.comp.lib.wxwidgets.devel/108388
+              dnl
+              dnl NB: we still need to test __thread support with
+              dnl     AC_TRY_COMPILE above even for g++ 4 as it doesn't
+              dnl     support it for all architectures (e.g. it doesn't
+              dnl     work under OS X)
+              AC_MSG_CHECKING([whether __thread support in g++ is usable])
+              case "$ax_cv_gxx_version" in
+                1.* | 2.* | 3.* )
+                    AC_MSG_RESULT([no, it's broken])
+                    wx_cv_cc___thread=no
+                    ;;
+                *)
+                    AC_MSG_RESULT([yes, it works])
+                    ;;
+              esac
+          fi
+      fi
 
       if test "$wx_cv_cc___thread" = "yes"; then
         AC_DEFINE(HAVE___THREAD_KEYWORD)