From 006c10e1e46e4b4c8acfc7819f6c9aef09f69298 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 9 Sep 2004 02:24:52 +0000 Subject: [PATCH] add tls check --- stepmania/autoconf/m4/tls.m4 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 stepmania/autoconf/m4/tls.m4 diff --git a/stepmania/autoconf/m4/tls.m4 b/stepmania/autoconf/m4/tls.m4 new file mode 100644 index 0000000000..37bed15647 --- /dev/null +++ b/stepmania/autoconf/m4/tls.m4 @@ -0,0 +1,14 @@ +# See if we have working TLS. We only check to see if it compiles; we test +# to see if it works at runtime, since we can run binaries compiled with __thread +# on systems without TLS. +AC_DEFUN(SM_TLS, +[ + AC_MSG_CHECKING(for TLS) + AC_TRY_COMPILE( [], [ static __thread int val; ], have_tls=yes,have_tls=no,have_tls=no ) + AC_MSG_RESULT($have_tls) + if test "$have_tls" = "yes"; then + AC_DEFINE([HAVE_TLS],[1],[Define if the complier supports __thread]) + AC_DEFINE([thread_local],[__thread],[Define to the compiler TLS keyword]) + fi +]) +