[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] [PATCH] configure: don't disable check for pthreads on Windows



Hi folks,

I ran into a small issue when building libevent 2.0.16-stable under mingw32.  The current configure script disables searching for pthreads when building for Windows, but this is actually a pthreads implementation (pthreads-win32) that may be available.  This patch fixes configure to always look for pthreads, as long as threading support is enabled.

I'm new to building for Windows, so let me know if I'm overlooking anything here :)

yours,
Bobby
From 89892c550a0462fb6def0e91475f2ba00563a868 Mon Sep 17 00:00:00 2001
From: Bobby Powers <bobbypowers@xxxxxxxxx>
Date: Thu, 8 Dec 2011 08:26:13 -0500
Subject: [PATCH] configure: don't disable check for pthreads on Windows

Some distros such as Fedora package pthreads-win32, a pthreads library
for Windows.  In order to use libevent in multithreaded applications
which use this, configure needs to be able to test for pthreads
support while $bwin32 is true.
---
 configure.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 14a0936..53e02c1 100644
--- a/configure.in
+++ b/configure.in
@@ -683,7 +683,7 @@ AC_TRY_COMPILE([],
 
 # check if we can compile with pthreads
 have_pthreads=no
-if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
+if test "$enable_thread_support" != "no"; then
   ACX_PTHREAD([
 	AC_DEFINE(HAVE_PTHREADS, 1,
 		[Define if we have pthreads on this system])
-- 
1.7.7.4