SDL-1.2: Allow building without glu.h by defining NO_SDL_GLU

From 5b402cee2da923942fcd4fad42aaebd1185c9c17 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 7 Nov 2025 11:04:27 -0800
Subject: [PATCH] Allow building without glu.h by defining NO_SDL_GLU

Reference: https://github.com/libsdl-org/sdl12-compat/issues/358
---
 include/SDL_opengl.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/SDL_opengl.h b/include/SDL_opengl.h
index 163872a6..4c73f63e 100644
--- a/include/SDL_opengl.h
+++ b/include/SDL_opengl.h
@@ -38,14 +38,20 @@
 #endif
 #if defined(__MACOSX__)
 #include <OpenGL/gl.h>  /* Header File For The OpenGL Library */
+#ifndef NO_SDL_GLU
 #include <OpenGL/glu.h> /* Header File For The GLU Library */
+#endif
 #elif defined(__MACOS__)
 #include <gl.h>         /* Header File For The OpenGL Library */
+#ifndef NO_SDL_GLU
 #include <glu.h>        /* Header File For The GLU Library */
+#endif
 #else
 #include <GL/gl.h>      /* Header File For The OpenGL Library */
+#ifndef NO_SDL_GLU
 #include <GL/glu.h>     /* Header File For The GLU Library */
 #endif
+#endif
 #ifndef NO_SDL_GLEXT
 #undef __glext_h_
 #undef __gl_glext_h_