diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index fcbb3eadbdf8e961f1af176425d3a61a78ab7f6f..bc36098853a791f184032ef6295a44aec6e87349 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -175,7 +175,7 @@ int Curl_input_negotiate(struct connectdata *conn, char *header)
       return -1;
     input_token.length = rawlen;
 
-#ifdef SPNEGO /* Handle SPNEGO */
+#ifdef HAVE_SPNEGO /* Handle SPNEGO */
     if (checkprefix("Negotiate", header)) {
         ASN1_OBJECT *   object            = NULL;
         int             rc                = 1;
@@ -257,7 +257,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn)
   char *encoded = NULL;
   int len;
 
-#ifdef SPNEGO /* Handle SPNEGO */
+#ifdef HAVE_SPNEGO /* Handle SPNEGO */
   if (checkprefix("Negotiate",neg_ctx->protocol)) {
     ASN1_OBJECT *   object            = NULL;
     int             rc                = 1;