diff options
author | blacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-03 20:09:39 +0000 |
---|---|---|
committer | blacksirius <blacksirius@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-03 20:09:39 +0000 |
commit | d6087662f5c19b693a000126d02ced43aad5d2f7 (patch) | |
tree | a0d47db14bdef86ae7c3a807a1bec1fe900fd82b /configure | |
parent | 5f1c9ba7595827ee77b7d786a22177c13da4b001 (diff) | |
download | hercules-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')
-rwxr-xr-x | configure | 44 |
1 files changed, 43 insertions, 1 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 16203 . +# From configure.in Revision: 16221 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67. # @@ -4708,6 +4708,48 @@ fi +# +# Check if CC supports __thread attribute (Thread Local Storage) +# (Usually our OSX friends 're lacking support of it in older llvm versions ..) +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports __thread specifier (TLS)" >&5 +$as_echo_n "checking whether $CC supports __thread specifier (TLS)... " >&6; } +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5 ; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + __thread int g_Test = -1; + + int main(int argc, char **argv){ + g_Test = 0; + return g_Test; + } + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$CFLAGS -DHAS_TLS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-unused-parameter" >&5 $as_echo_n "checking whether $CC supports -Wno-unused-parameter... " >&6; } OLD_CFLAGS="$CFLAGS" |