summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorblacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-03 20:09:39 +0000
committerblacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-03 20:09:39 +0000
commitd6087662f5c19b693a000126d02ced43aad5d2f7 (patch)
treea0d47db14bdef86ae7c3a807a1bec1fe900fd82b /configure.in
parent5f1c9ba7595827ee77b7d786a22177c13da4b001 (diff)
downloadhercules-d6087662f5c19b693a000126d02ced43aad5d2f7.tar.gz
hercules-d6087662f5c19b693a000126d02ced43aad5d2f7.tar.bz2
hercules-d6087662f5c19b693a000126d02ced43aad5d2f7.tar.xz
hercules-d6087662f5c19b693a000126d02ced43aad5d2f7.zip
thread api: added support for platforms without TLS (Thread Local Storage) support (usually older OSX llvm versions ..)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16226 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 2d3df1ce2..e602db19f 100644
--- a/configure.in
+++ b/configure.in
@@ -363,6 +363,30 @@ AC_RUN_IFELSE(
)
+#
+# Check if CC supports __thread attribute (Thread Local Storage)
+# (Usually our OSX friends 're lacking support of it in older llvm versions ..)
+#
+AC_MSG_CHECKING([whether $CC supports __thread specifier (TLS)])
+AC_RUN_IFELSE(
+ [
+ __thread int g_Test = -1;
+
+ int main(int argc, char **argv){
+ g_Test = 0;
+ return g_Test;
+ }
+ ],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$CFLAGS -DHAS_TLS"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ ]
+)
+
+
AC_MSG_CHECKING([whether $CC supports -Wno-unused-parameter])
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wno-unused-parameter"