--- configure.orig	2017-06-24 01:11:34.000000000 -0500
+++ configure	2021-01-30 20:30:15.000000000 -0600
@@ -15439,7 +15439,7 @@
 
 fi
 
-     if test "$ac_cv_func_remove" == yes ; then
+     if test "$ac_cv_func_remove" = yes ; then
 
 $as_echo "#define unlink remove" >>confdefs.h
 
@@ -15537,6 +15537,7 @@
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <zlib.h>
 
 int
 main ()
@@ -16416,10 +16417,14 @@
     if test "x$withval" = "xyes"; then
       withval=$ssllib
       SSLINC=$sslinc
+      LIBS="$LIBS $withval"
+    else
+      SSLINC="-I$withval/include/openssl"
+      LIBS="$LIBS -L$withval/lib -lssl -lcrypto"
     fi
-    LIBS="$LIBS $withval"
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <openssl/ssl.h>
 
 int
 main ()
