From f595f4f127826531ecf8571949e7ce634d2fb6da Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 12 Jan 2021 07:46:07 +0100
Subject: [PATCH] configure.in: Bail out if OpenSSL and mbedTLS are enabled at
 the same time

---
 configure.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.in b/configure.in
index c21d9df1..96adb9de 100644
--- a/configure.in
+++ b/configure.in
@@ -1165,6 +1165,10 @@ AC_HELP_STRING([--without-openssl], [Disable OpenSSL/LibreSSL detection]),
   OPT_OPENSSL=$withval)
 
 if test X"$OPT_OPENSSL" != Xno; then
+   if test X"$OPT_MBEDTLS" != Xno; then
+      AC_MSG_ERROR([OpenSSL and mbedTLS support can't be enabled at the same time])
+   fi
+
   if test "$PORTNAME" != "win32"; then
      AC_CHECK_LIB(crypto, CRYPTO_new_ex_data, [], [AC_MSG_ERROR([library 'crypto' is required for OpenSSL])])
      FOUND_SSL_LIB="no"
-- 
2.49.0