diff --git a/configure b/configure
index 54c852aca..96e2c89ba 100644
--- a/configure
+++ b/configure
@@ -11923,7 +11923,7 @@ if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
+LIBS="-lcrypto -pthread $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -11958,7 +11958,7 @@ if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
 #define HAVE_LIBCRYPTO 1
 _ACEOF
 
-  LIBS="-lcrypto $LIBS"
+  LIBS="-lcrypto -pthread $LIBS"
 
 else
   as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
