From 3e4a8cb800983ee276bbc118dcd5749fc852401a Mon Sep 17 00:00:00 2001
From: Yang Tse <yangsita@gmail.com>
Date: Sat, 16 Aug 2008 03:27:07 +0000
Subject: [PATCH] Fix Use of conditional definition of USE_OPENSSL

---
 lib/Makefile.netware |  1 -
 lib/http_negotiate.c | 16 ++++++++++------
 src/Makefile.netware |  1 -
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/lib/Makefile.netware b/lib/Makefile.netware
index 30a2b563ac..b52ac01284 100644
--- a/lib/Makefile.netware
+++ b/lib/Makefile.netware
@@ -517,7 +517,6 @@ ifdef WITH_ZLIB
 endif
 ifdef WITH_SSL
 	@echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
-	@echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
 	@echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index 9644a751c7..d47c9aecd9 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -43,12 +43,16 @@
 #include "memory.h"
 
 #ifdef HAVE_SPNEGO
-# include <spnegohelp.h>
-# if defined(USE_OPENSSL) && !defined(USE_YASSLEMUL)
-#  include <openssl/objects.h>
-# else
-#  error "Can't compile SPNEGO support without OpenSSL."
-# endif
+#  include <spnegohelp.h>
+#  ifdef USE_SSLEAY
+#    ifdef USE_OPENSSL
+#      include <openssl/objects.h>
+#    else
+#      include <objects.h>
+#    endif
+#  else
+#    error "Can't compile SPNEGO support without OpenSSL."
+#  endif
 #endif
 
 #define _MPRINTF_REPLACE /* use our functions only */
diff --git a/src/Makefile.netware b/src/Makefile.netware
index 6b4c7a885b..47a7cada98 100644
--- a/src/Makefile.netware
+++ b/src/Makefile.netware
@@ -504,7 +504,6 @@ ifdef WITH_ZLIB
 endif
 ifdef WITH_SSL
 	@echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
-	@echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
 	@echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
 	@echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
-- 
GitLab