diff options
author | ACSYS <cvc4-devel@cs.nyu.edu> | 2010-09-27 22:26:46 +0000 |
---|---|---|
committer | ACSYS <cvc4-devel@cs.nyu.edu> | 2010-09-27 22:26:46 +0000 |
commit | 753a072c542c1c254d7c6adbf10e091ba585ede5 (patch) | |
tree | 5ab9157fe0d3f265f82a94f7f4e5940697b54ee5 /configure.ac | |
parent | 595751a1814cc9375318c9c158caf6426eeda791 (diff) |
add workaround for systems (i.e., Mac OS X) that don't support __thread; also configure script auto-detection of __thread support and syntax
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8ab8f3792..ae681d2eb 100644 --- a/configure.ac +++ b/configure.ac @@ -655,6 +655,25 @@ AC_CHECK_HEADERS([getopt.h unistd.h]) #AC_TYPE_UINT64_T #AC_TYPE_SIZE_T +# Check for availability of TLS support (e.g. __thread storage class) +AC_MSG_CHECKING([whether user wants wants to use compiler-supported TLS]) +AC_ARG_ENABLE([tls], AS_HELP_STRING([--disable-tls], [don't use compiler-native TLS])) +if test -z "${enable_tls+set}" || test "$enable_tls" = "yes"; then + AC_MSG_RESULT([yes]) + AX_TLS([CVC4_TLS=$ac_cv_tls], [CVC4_TLS=]) +else + AC_MSG_RESULT([no]) + CVC4_TLS= +fi +if test -n "$CVC4_TLS"; then + CVC4_TLS_SUPPORTED=1 +else + CVC4_TLS='pthread_getspecific()' + CVC4_TLS_SUPPORTED=0 +fi +AC_SUBST([CVC4_TLS]) +AC_SUBST([CVC4_TLS_SUPPORTED]) + # Checks for library functions. # (empty) @@ -726,6 +745,7 @@ AC_CONFIG_FILES([ m4_esyscmd([find contrib src test -name Makefile.am | sort | sed 's,\.am$,,']) src/util/rational.h src/util/integer.h + src/util/tls.h ) AC_OUTPUT @@ -786,6 +806,7 @@ Unit tests : $support_unit_tests Static libs : $enable_static Shared libs : $enable_shared Static binary: $enable_static_binary +TLS support : $CVC4_TLS MP library : $mplibrary |