Don't search for -lpthread on Windows

If we're building for Windows, we want to use windows threads no
matter what, and we don't want to link a pthread library even if it
is present.  Fixes bug 27081; bugfix on 1790dc6760 in 0.1.0.1-rc.
This commit is contained in:
Nick Mathewson 2018-08-08 09:56:51 -04:00
parent 27a2a6cb9b
commit 7a570b8182
2 changed files with 8 additions and 2 deletions

4
changes/bug27081 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (compilation, windows):
- Don't link or search for pthreads when building for Windows, even if we
are using build environment (like mingw) that provides a pthreads
library. Fixes bug 27081; bugfix on 0.1.0.1-rc.

View File

@ -370,8 +370,10 @@ if test "$LIBS" != "$saved_LIBS"; then
have_rt=yes have_rt=yes
fi fi
AC_SEARCH_LIBS(pthread_create, [pthread]) if test "$bwin32" = "false"; then
AC_SEARCH_LIBS(pthread_detach, [pthread]) AC_SEARCH_LIBS(pthread_create, [pthread])
AC_SEARCH_LIBS(pthread_detach, [pthread])
fi
AM_CONDITIONAL(THREADS_WIN32, test "$bwin32" = "true") AM_CONDITIONAL(THREADS_WIN32, test "$bwin32" = "true")
AM_CONDITIONAL(THREADS_PTHREADS, test "$bwin32" = "false") AM_CONDITIONAL(THREADS_PTHREADS, test "$bwin32" = "false")