]> granicus.if.org Git - libevent/commitdiff
autoconf: fix --disable-thread-support build under win32
authorAzat Khuzhin <a3at.mail@gmail.com>
Sun, 7 Aug 2016 19:19:39 +0000 (22:19 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 9 Aug 2016 12:47:58 +0000 (15:47 +0300)
Fixes: https://ci.appveyor.com/project/azat/libevent/build/job/gvud4tcqsd5bnarl
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.6.80/job/5frnb1c3n4quxxqy
Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.6.80/job/3wdahbrew7setmoa
Makefile.am
configure.ac
test/include.am

index f740bf3d103e288f21f6046779c71375399a0218..71fa834e83a6fe9196f9088204931cae256df6a4 100644 (file)
@@ -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 =
index 904cd1aa4c931334c8d46162bc188d7bf3577e00..5df1b907c725ff5ce8e14a9316f6adec7a9f0d3a 100644 (file)
@@ -749,6 +749,7 @@ if test x$bwin32 != xtrue && test "$enable_thread_support" != "no"; then
       #include <pthread.h> ]
   )
 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
index 4cd49ef6306f8dc0877e050021cfbf8065af1f51..308813cd25ad3fc5b145964b4a408cec163946f7 100644 (file)
@@ -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