[Mesa-dev] [PATCH] configure.ac: Enable GLX_USE_TLS if possible.

zhigang.gong at linux.intel.com zhigang.gong at linux.intel.com
Wed Feb 8 00:19:38 PST 2012


From: Zhigang Gong <zhigang.gong at linux.intel.com>

If the system support tls, we prefer to enable it by default
just as xserver does. Actually, the checking code is copied
from xserver/configure.ac.

Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 configure.ac |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index b2b1ab8..7c2756b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1103,8 +1103,14 @@ dnl
 AC_ARG_ENABLE([glx-tls],
     [AS_HELP_STRING([--enable-glx-tls],
         [enable TLS support in GLX @<:@default=disabled@:>@])],
-    [GLX_USE_TLS="$enableval"],
-    [GLX_USE_TLS=no])
+    [GLX_USE_TLS=$enableval
+     if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then
+        AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.])
+     fi],
+    [GLX_USE_TLS=no
+     if test "${ac_cv_tls}" != "none" ; then
+        GLX_USE_TLS=yes
+     fi])
 AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
 
 AS_IF([test "x$GLX_USE_TLS" = xyes],
-- 
1.7.4.4



More information about the mesa-dev mailing list