[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 131/173: configure: Allow disabling pthreads, fall
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 131/173: configure: Allow disabling pthreads, fall back on Win32 threads |
Date: |
Fri, 24 Feb 2017 14:02:33 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.53.1
in repository gnurl.
commit c1071283e88c1bef63b934cb91cb6eadd70f5507
Author: Jay Satiro <address@hidden>
AuthorDate: Sun Feb 12 14:50:56 2017 -0500
configure: Allow disabling pthreads, fall back on Win32 threads
When the threaded resolver option is specified for configure the default
thread library is pthreads. This change makes it possible to
--disable-pthreads and then configure can fall back on Win32 threads for
native Windows builds.
Closes https://github.com/curl/curl/pull/1260
---
configure.ac | 44 ++++++++++++++++++++++++++++++++++++++++----
1 file changed, 40 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index fa44787ef..1e76c4918 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3407,7 +3407,28 @@ if test "x$want_thres" = xyes && test "x$want_ares" =
xyes; then
[Options --enable-threaded-resolver and --enable-ares are mutually exclusive])
fi
-if test "$want_thres" = "yes" && test "$dontwant_rt" = "no"; then
+dnl ************************************************************
+dnl disable POSIX threads
+dnl
+AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
+AC_ARG_ENABLE(pthreads,
+AC_HELP_STRING([--enable-pthreads],
+ [Enable POSIX threads (default for threaded resolver)])
+AC_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
+[ case "$enableval" in
+ no) AC_MSG_RESULT(no)
+ want_pthreads=no
+ ;;
+ *) AC_MSG_RESULT(yes)
+ want_pthreads=yes
+ ;;
+ esac ], [
+ AC_MSG_RESULT(auto)
+ want_pthreads=auto
+ ]
+)
+if test "$want_thres" = "yes" && test "$dontwant_rt" = "no" && \
+ test "$want_pthreads" != "no"; then
AC_CHECK_HEADER(pthread.h,
[ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
save_CFLAGS="$CFLAGS"
@@ -3429,10 +3450,24 @@ if test "$want_thres" = "yes" && test "$dontwant_rt" =
"no"; then
AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS
lookup])
curl_res_msg="POSIX threaded"
fi
-
-
])
fi
+if test "x$USE_THREADS_POSIX" != "x1"; then
+ if test "$want_pthreads" = "yes"; then
+ AC_MSG_ERROR([--enable-pthreads but pthreads was not found])
+ fi
+ if test "$want_thres" = "yes"; then
+ dnl If native Windows fallback on Win32 threads since no POSIX threads
+ if test "$curl_cv_native_windows" = "yes"; then
+ USE_THREADS_WIN32=1
+ AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup])
+ curl_res_msg="Win32 threaded"
+ else
+ AC_MSG_ERROR([Threaded resolver enabled but no thread library found])
+ fi
+ fi
+fi
+
dnl ************************************************************
dnl disable verbose text strings
@@ -3661,7 +3696,8 @@ fi
if test "x$HAVE_LIBZ" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
fi
-if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
+if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
+ -o "x$USE_THREADS_WIN32" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
fi
if test "x$IDN_ENABLED" = "x1"; then
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 77/173: usercertinmem.c: improve the short description, (continued)
- [GNUnet-SVN] [gnurl] 77/173: usercertinmem.c: improve the short description, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 101/173: docs: we no longer ship HTML versions of man pages, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 96/173: polarssl: fix hangs, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 112/173: darwinssl: Avoid parsing certificates when not in verbose mode, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 95/173: cookies: do not assume a valid domain has a dot, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 66/173: TODO: Chunked transfer multipart formpost, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 137/173: TODO: consider file name from the redirected URL with -O ?, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 107/173: use *.sourceforge.io and misc URL updates, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 70/173: docs: improved language in README.md HISTORY.md CONTRIBUTE.md, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 113/173: test552: Fix typos, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 131/173: configure: Allow disabling pthreads, fall back on Win32 threads,
gnunet <=
- [GNUnet-SVN] [gnurl] 103/173: openssl: Don't use certificate after transferring ownership, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 141/173: proxy: fix hostname resolution and IDN conversion, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 40/173: sws: retry send() on EWOULDBLOCK, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 108/173: cmdline-opts: Fixed build and test in out of source tree builds, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 123/173: examples/multithread.c: link to our multi-thread docs, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 152/173: digest_sspi: Handle 'stale=TRUE' directive in HTTP digest, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 129/173: tool_operate: Show HTTPS-Proxy options on CURLE_SSL_CACERT, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 151/173: smb: use getpid replacement for windows UWP builds, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 65/173: TODO: Improve formpost API, not just add an easy argument, gnunet, 2017/02/24
- [GNUnet-SVN] [gnurl] 90/173: cmdline-opts/gen.pl: Open input files in CRLF mode, gnunet, 2017/02/24