From 58f4200789d0cc47ebd88f3091207cf4dd493573 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 20 Jun 2014 10:20:10 -0400 Subject: Thread support is now required Long ago we supported systems where there was no support for threads, or where the threading library was broken. We shouldn't have do that any more: on every OS that matters, threads exist, and the OS supports running threads across multiple CPUs. This resolves tickets 9495 and 12439. It's a prerequisite to making our workqueue code work better, since sensible workqueue implementations don't split across multiple processes. --- configure.ac | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0d3758170..e858d0c0c 100644 --- a/configure.ac +++ b/configure.ac @@ -107,26 +107,6 @@ AC_ARG_ENABLE(upnp, * ) AC_MSG_ERROR(bad value for --enable-upnp) ;; esac], [upnp=false]) - -AC_ARG_ENABLE(threads, - AS_HELP_STRING(--disable-threads, disable multi-threading support)) - -if test x$enable_threads = x; then - case $host in - *-*-solaris* ) - # Don't try multithreading on solaris -- cpuworkers seem to lock. - AC_MSG_NOTICE([You are running Solaris; Sometimes threading makes -cpu workers lock up here, so I will disable threads.]) - enable_threads="no";; - *) - enable_threads="yes";; - esac -fi - -if test "$enable_threads" = "yes"; then - AC_DEFINE(ENABLE_THREADS, 1, [Defined if we will try to use multithreading]) -fi - case $host in *-*-solaris* ) AC_DEFINE(_REENTRANT, 1, [Define on some platforms to activate x_r() functions in time.h]) @@ -326,10 +306,8 @@ if test "$LIBS" != "$saved_LIBS"; then have_rt=yes fi -if test "$enable_threads" = "yes"; then - AC_SEARCH_LIBS(pthread_create, [pthread]) - AC_SEARCH_LIBS(pthread_detach, [pthread]) -fi +AC_SEARCH_LIBS(pthread_create, [pthread]) +AC_SEARCH_LIBS(pthread_detach, [pthread]) dnl ------------------------------------------------------------------- dnl Check for functions before libevent, since libevent-1.2 apparently @@ -372,7 +350,7 @@ AC_CHECK_FUNCS( _vscprintf ) -if test "$enable_threads" = "yes"; then +if test "$bwin32" != true; then AC_CHECK_HEADERS(pthread.h) AC_CHECK_FUNCS(pthread_create) fi -- cgit v1.2.3