diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-06 15:29:33 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-06 15:29:33 +0000 |
commit | 09a2ec0192338fff8e75d03558e3ed8150d9444e (patch) | |
tree | 94aec6ebe167f60d8ce50ecc0a7d12fd191c3b75 /configure.in | |
parent | 1d4bd3990fafc62ab52dc123923d6952dd160e98 (diff) | |
download | tor-09a2ec0192338fff8e75d03558e3ed8150d9444e.tar.gz tor-09a2ec0192338fff8e75d03558e3ed8150d9444e.zip |
r9107@Kushana: nickm | 2006-10-06 02:14:02 -0400
When eventdns is enabled, we can allow machines with thread-unsafe resolver functions to build multithreaded anyway.
svn:r8608
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/configure.in b/configure.in index 860cf2abe4..2c3447a32f 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,26 @@ AC_ARG_ENABLE(debug, CFLAGS="$CFLAGS -g" fi]) +AC_ARG_ENABLE(eventdns, + AC_HELP_STRING(--enable-eventdns, enable asynchronous dns module), + [case "${enableval}" in + yes) eventdns=true ;; + no) eventdns=false ;; + *) AC_MSG_ERROR(bad value for --enable-eventdns) ;; + esac], [eventdns=true]) +AM_CONDITIONAL(EVENTDNS, test x$eventdns = xtrue) +if test x$eventdns = xtrue; then + AC_DEFINE([USE_EVENTDNS], 1, "Define to 1 if we'll be using eventdns.c") +fi + +AC_ARG_ENABLE(transparent, + AC_HELP_STRING(--disable-transparent, disable transparent proxy support), + [case "${enableval}" in + yes) transparent=true ;; + no) transparent=false ;; + *) AC_MSG_ERROR(bad value for --enable-transparent) ;; + esac], [transparent=true]) + AC_ARG_ENABLE(threads, AC_HELP_STRING(--disable-threads, disable multi-threading support)) @@ -27,9 +47,11 @@ if test x$enable_threads = x; then *-*-netbsd* | *-*-openbsd* ) # Don't try multithreading on netbsd -- there is no threadsafe DNS # lookup function there. - AC_MSG_NOTICE([You are running OpenBSD or NetBSD; I am assuming that + if test x$eventdns != xtrue; then + AC_MSG_NOTICE([You are running OpenBSD or NetBSD; I am assuming that getaddrinfo is not threadsafe here, so I will disable threads.]) - enable_threads="no";; + enable_threads="no" + fi ;; *-*-solaris* ) # Don't try multithreading on solaris -- cpuworkers seem to lock. AC_MSG_NOTICE([You are running Solaris; Sometimes threading makes @@ -44,26 +66,6 @@ if test $enable_threads = "yes"; then AC_DEFINE(ENABLE_THREADS, 1, [Defined if we will try to use multithreading]) fi -AC_ARG_ENABLE(eventdns, - AC_HELP_STRING(--enable-eventdns, enable asynchronous dns module), - [case "${enableval}" in - yes) eventdns=true ;; - no) eventdns=false ;; - *) AC_MSG_ERROR(bad value for --enable-eventdns) ;; - esac], [eventdns=true]) -AM_CONDITIONAL(EVENTDNS, test x$eventdns = xtrue) -if test x$eventdns = xtrue; then - AC_DEFINE([USE_EVENTDNS], 1, "Define to 1 if we'll be using eventdns.c") -fi - -AC_ARG_ENABLE(transparent, - AC_HELP_STRING(--disable-transparent, disable transparent proxy support), - [case "${enableval}" in - yes) transparent=true ;; - no) transparent=false ;; - *) AC_MSG_ERROR(bad value for --enable-transparent) ;; - esac], [transparent=true]) - case $host in *-*-solaris* ) AC_DEFINE(_REENTRANT, 1, [Define on some platforms to activate x_r() functions in time.h]) |