diff --git a/Makefile.am b/Makefile.am index f740bf3d..71fa834e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -142,10 +142,14 @@ include test/include.am if BUILD_WIN32 SYS_LIBS = -lws2_32 -lshell32 -ladvapi32 -SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \ +SYS_SRC = win32select.c buffer_iocp.c event_iocp.c \ bufferevent_async.c SYS_INCLUDES = -IWIN32-Code -IWIN32-Code/nmake +if THREADS +SYS_SRC += evthread_win32.c +endif + else SYS_LIBS = diff --git a/configure.ac b/configure.ac index 904cd1aa..5df1b907 100644 --- a/configure.ac +++ b/configure.ac @@ -749,6 +749,7 @@ if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then #include ] ) fi +AM_CONDITIONAL(THREADS, [test "$enable_thread_support" != "no"]) AM_CONDITIONAL(PTHREADS, [test "$have_pthreads" != "no" && test "$enable_thread_support" != "no"]) # check if we should compile locking into the library diff --git a/test/include.am b/test/include.am index 4cd49ef6..308813cd 100644 --- a/test/include.am +++ b/test/include.am @@ -101,8 +101,10 @@ regress_thread_SOURCES = test/regress_thread.c PTHREAD_LIBS += libevent_pthreads.la endif if BUILD_WIN32 +if THREADS regress_thread_SOURCES = test/regress_thread.c endif +endif if ZLIB_REGRESS regress_zlib_SOURCES = test/regress_zlib.c endif