[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 17/205: configure: fix for --enable-pthreads
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 17/205: configure: fix for --enable-pthreads |
Date: |
Thu, 20 Apr 2017 16:19:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.
commit 5f139d6b6f1de89ed8449a327ed743f5461ac2ec
Author: Jay Satiro <address@hidden>
AuthorDate: Wed Mar 1 03:11:36 2017 -0500
configure: fix for --enable-pthreads
Better handle options conflicts that can occur if --enable-pthreads.
Bug: https://github.com/curl/curl/pull/1295
Reported-by: Marc-Antoine Perennou
---
configure.ac | 45 ++++++++++++++++++++++++++++++++-------------
m4/curl-confopts.m4 | 4 ----
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1e76c4918..5c77b0f4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3427,8 +3427,28 @@ AC_HELP_STRING([--disable-pthreads],[Disable POSIX
threads]),
want_pthreads=auto
]
)
-if test "$want_thres" = "yes" && test "$dontwant_rt" = "no" && \
- test "$want_pthreads" != "no"; then
+
+dnl turn off pthreads if rt is disabled
+if test "$want_pthreads" != "no"; then
+ if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
+ AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually
exclusive])
+ fi
+ if test "$dontwant_rt" != "no"; then
+ dnl if --enable-pthreads was explicit then warn it's being ignored
+ if test "$want_pthreads" = "yes"; then
+ AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.])
+ fi
+ want_pthreads=no
+ fi
+fi
+
+dnl turn off pthreads if no threaded resolver
+if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
+ want_pthreads=no
+fi
+
+dnl detect pthreads
+if test "$want_pthreads" != "no"; then
AC_CHECK_HEADER(pthread.h,
[ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
save_CFLAGS="$CFLAGS"
@@ -3452,23 +3472,22 @@ if test "$want_thres" = "yes" && test "$dontwant_rt" =
"no" && \
fi
])
fi
-if test "x$USE_THREADS_POSIX" != "x1"; then
+
+dnl threaded resolver check
+if test "$want_thres" = "yes" && 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
+ 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
-
dnl ************************************************************
dnl disable verbose text strings
dnl
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index 69b9a1431..b86e0fc4f 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -346,10 +346,6 @@ AC_DEFUN([CURL_CHECK_OPTION_RT], [
AC_MSG_RESULT([no])
;;
esac
- dnl TODO: may require mutual exclusion
- if test "$dontwant_rt" = "yes" && test "$want_thres" = "yes" ; then
- AC_MSG_ERROR([options --disable-rt and --enable-thread-resolver are
mutually exclusive, at most one can be selected.])
- fi
])
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 04/205: tests: use consistent environment variables for setting charset, (continued)
- [GNUnet-SVN] [gnurl] 04/205: tests: use consistent environment variables for setting charset, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 16/205: darwinssl: Warn that disabling host verify also disables SNI, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 08/205: ftp: fixed a NULL pointer dereference on OOM, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 14/205: tests: enable HTTP/2 tests to run with non-default port numbers, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 15/205: warnless: suppress compiler warning, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 20/205: configure: fix --with-zlib when a path is specified, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 32/205: BINDINGS: add misssing C++ bindings, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 29/205: CMake: Add mbedTLS support, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 25/205: fix potential use of uninitialized variables, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 35/205: BINDINGS: update the Lua-cURL URL, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 17/205: configure: fix for --enable-pthreads,
gnunet <=
- [GNUnet-SVN] [gnurl] 33/205: BINDINGS: add go-curl and perl6-net-curl, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 21/205: build: fix gcc7 implicit fallthrough warnings, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 26/205: CURLOPT_SSL_CTX_FUNCTION.3: Fix EXAMPLE formatting errors, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 30/205: CMake: Set at most one SSL library, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 27/205: CMake: Reorganize SSL support, separate WinSSL and SSPI, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 28/205: CMake: Add DarwinSSL support, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 34/205: BINDINGS: add Scilab binding, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 40/205: ares: Curl_resolver_wait_resolv: clear *entry first in function, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 07/205: docs: de-duplicate file lists in the Makefiles, gnunet, 2017/04/20
- [GNUnet-SVN] [gnurl] 18/205: checksrc.bat: Ignore curl_config.h.in, curl_config.h, gnunet, 2017/04/20