commit 9a6ebcd612b326acb9485b8c9139bd83c67306bc
parent 73b03e9027839a222d5d82e6d7a0fcf2a6d633cf
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 13 Dec 2021 21:06:17 +0300
Workaround for old broken GnuTLS builds
Diffstat:
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
@@ -57,6 +57,7 @@ AS_IF([test `uname -s` = "OS/390"],
# Checks for programs.
AC_PROG_AWK
AC_PROG_GREP
+AC_PROG_FGREP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
@@ -2597,6 +2598,35 @@ AC_SUBST([GNUTLS_CFLAGS])
AC_SUBST([GNUTLS_LDFLAGS])
AC_SUBST([GNUTLS_LIBS])
+AS_VAR_IF([have_gnutls], ["yes"],
+ [
+ AC_CACHE_CHECK([for GnuTLS quirks], [mhd_cv_gnutls_mthread_broken],
+ [
+ mhd_cv_gnutls_mthread_broken="no"
+ AS_IF([test -r /etc/redhat-release],
+ [
+ AS_IF([$FGREP ' release 6.' /etc/redhat-release >/dev/null || $FGREP '(Santiago)' /etc/redhat-release >/dev/null],
+ [mhd_cv_gnutls_mthread_broken="found"],
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_gnutls_mthread_broken], ["no"],
+ [
+ AS_IF([command -v rpm >/dev/null],
+ [
+ AS_IF([test r`rpm -E '%{rhel} 2>/dev/null'` = "r6"],
+ [mhd_cv_gnutls_mthread_broken="found"],
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+)
+AM_CONDITIONAL([HAVE_GNUTLS_MTHREAD_BROKEN], [[test "x${mhd_cv_gnutls_mthread_broken}" = "xfound"]])
+
# optional: HTTP Basic Auth support. Enabled by default
AC_MSG_CHECKING([[whether to support HTTP basic authentication]])
AC_ARG_ENABLE([bauth],
diff --git a/src/testcurl/https/Makefile.am b/src/testcurl/https/Makefile.am
@@ -36,13 +36,18 @@ THREAD_ONLY_TESTS = \
$(HTTPS_PARALLEL_TESTS) \
$(TEST_HTTPS_SNI) \
test_https_session_info \
- test_https_time_out \
test_https_multi_daemon \
test_https_get \
test_empty_response \
test_https_get_iovec \
$(EMPTY_ITEM)
+if !HAVE_GNUTLS_MTHREAD_BROKEN
+THREAD_ONLY_TESTS += \
+ test_https_time_out \
+ $(EMPTY_ITEM)
+endif
+
check_PROGRAMS = \
test_https_get_select