Support configure --disable-thread-local-alloc option (similar for CMake)
authorIvan Maidanski <ivmai@mail.ru>
Wed, 7 Jun 2017 21:42:30 +0000 (00:42 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 7 Jun 2017 21:42:30 +0000 (00:42 +0300)
commitce062e0d359b96f1972db410fe540858016dfff3
tree652db8cb1c165f224887ea68d43e9a20741fe434
parent8106b298c43efe8319a680f11ef4855a29615698
Support configure --disable-thread-local-alloc option (similar for CMake)

* CMakeLists.txt (enable_thread_local_alloc): New option (on by
default).
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT
|| CMAKE_USE_WIN32_THREADS_INIT] (SRC): Add thread_local_alloc.c only
if enable_thread_local_alloc.
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT
|| CMAKE_USE_WIN32_THREADS_INIT]: Define THREAD_LOCAL_ALLOC macro only
if enable_thread_local_alloc.

* Makefile.am (libgc_la_SOURCES): Add thread_local_alloc.c only if
THREAD_LOCAL_ALLOC.
* configure.ac (thread-local-alloc): New option.
* configure.ac: AC_DEFINE(THREAD_LOCAL_ALLOC) only if
enable_thread_local_alloc is yes or unset.
* configure.ac (THREAD_LOCAL_ALLOC): New AM_CONDITIONAL.
CMakeLists.txt
Makefile.am
configure.ac