mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Implement --disable-threads
svn:r4187
This commit is contained in:
parent
13126eeb0f
commit
ea5591ee4d
18
configure.in
18
configure.in
@ -14,11 +14,27 @@ if test -f /etc/redhat-release; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
[ --enable-debug compiles with debugging info],
|
AC_HELP_STRING(--enable-debug, compile with debugging info),
|
||||||
[if test x$enableval = xyes; then
|
[if test x$enableval = xyes; then
|
||||||
CFLAGS="$CFLAGS -g"
|
CFLAGS="$CFLAGS -g"
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(threads,
|
||||||
|
AC_HELP_STRING(--disable-threads, disable multi-threading support))
|
||||||
|
|
||||||
|
if test x$enable_threads = x; then
|
||||||
|
case $ac_sys_system in
|
||||||
|
NetBSD*)
|
||||||
|
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
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
@ -211,10 +211,10 @@ char *get_user_homedir(const char *username);
|
|||||||
int spawn_func(int (*func)(void *), void *data);
|
int spawn_func(int (*func)(void *), void *data);
|
||||||
void spawn_exit(void);
|
void spawn_exit(void);
|
||||||
|
|
||||||
#if defined(MS_WINDOWS)
|
#if defined(ENABLE_THREADS) && defined(MS_WINDOWS)
|
||||||
#define USE_WIN32_THREADS
|
#define USE_WIN32_THREADS
|
||||||
#define TOR_IS_MULTITHREADED 1
|
#define TOR_IS_MULTITHREADED 1
|
||||||
#elif defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_CREATE)
|
#elif defined(ENABLE_THREADS) && defined(HAVE_PTHREAD_H) && defined(HAVE_PTHREAD_CREATE)
|
||||||
#define USE_PTHREADS
|
#define USE_PTHREADS
|
||||||
#define TOR_IS_MULTITHREADED 1
|
#define TOR_IS_MULTITHREADED 1
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user