[or-cvs] Backport fix for bug 161: when --disable-threads is set, do...
Nick Mathewson
nickm at seul.org
Wed Jul 13 17:32:43 UTC 2005
Update of /home/or/cvsroot/tor
In directory moria:/tmp/cvs-serv18251
Modified Files:
Tag: tor-0_1_0-patches
configure.in
Log Message:
Backport fix for bug 161: when --disable-threads is set, do not search for or link against pthreads libraries
Index: configure.in
===================================================================
RCS file: /home/or/cvsroot/tor/configure.in,v
retrieving revision 1.212.2.5
retrieving revision 1.212.2.6
diff -u -d -r1.212.2.5 -r1.212.2.6
--- configure.in 1 Jul 2005 01:56:04 -0000 1.212.2.5
+++ configure.in 13 Jul 2005 17:32:41 -0000 1.212.2.6
@@ -61,8 +61,11 @@
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 @@
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)
+
+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)
AC_FUNC_FSEEKO
AC_CHECK_MEMBERS([struct timeval.tv_sec])
More information about the tor-commits
mailing list