diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-07-13 17:31:52 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-07-13 17:31:52 +0000 |
commit | 335a00a02a14635c5e298247c021194187137774 (patch) | |
tree | ba3061d0da9c5eaa9abdf168fde5cb1a6f0dd2ca /configure.in | |
parent | 97c58f066a088d225583d352253e44c7bd46c9f5 (diff) | |
download | tor-335a00a02a14635c5e298247c021194187137774.tar.gz tor-335a00a02a14635c5e298247c021194187137774.zip |
Fix bug 161: when --disable-threads is set, do not search for or link against pthreads libraries
svn:r4545
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 78a516f4c9..cd28430882 100644 --- a/configure.in +++ b/configure.in @@ -61,8 +61,11 @@ AC_ARG_WITH(ssl-dir, AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(gethostbyname, [nsl]) -AC_SEARCH_LIBS(pthread_create, [pthread]) -AC_SEARCH_LIBS(pthread_detach, [pthread]) + +if test $enable_threads = "yes"; then + AC_SEARCH_LIBS(pthread_create, [pthread]) + AC_SEARCH_LIBS(pthread_detach, [pthread]) +fi dnl ------------------------------------------------------ dnl Where do you live, libevent? And how do we call you? @@ -295,9 +298,15 @@ AC_CHECK_HEADERS(zlib.h, , AC_MSG_ERROR(Zlib header (zlib.h) not found. Tor requ dnl These headers are not essential -AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h pthread.h stddef.h inttypes.h) +AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h stddef.h inttypes.h) + +AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit setrlimit strlcat strlcpy strtoull getpwnam ftello getaddrinfo localtime_r gmtime_r event_get_version event_get_method event_set_log_callback memmem) + +if test $enable_threads = "yes"; then + AC_CHECK_HEADERS(pthread.h) + AC_CHECK_FUNCS(pthread_create) +fi -AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit setrlimit strlcat strlcpy strtoull getpwnam ftello pthread_create getaddrinfo localtime_r gmtime_r event_get_version event_get_method event_set_log_callback memmem) AC_FUNC_FSEEKO AC_CHECK_MEMBERS([struct timeval.tv_sec]) |