<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">https://github.com/NGSolve/netgen/issues/173

--- libsrc/include/incopengl.hpp	2023-12-23 05:42:55.000000000 +0800
+++ libsrc/include/incopengl.hpp	2024-01-04 00:51:24.000000000 +0800
@@ -5,16 +5,20 @@
 #include &lt;mystdlib.h&gt;
 #include &lt;mydefs.hpp&gt;
 
-#  ifdef __APPLE__
-#define GL_SILENCE_DEPRECATION
-#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
+#ifdef __APPLE__
+#  include &lt;AvailabilityMacros.h&gt;
+#  define GL_SILENCE_DEPRECATION
+#  define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
+#  if MAC_OS_X_VERSION_MIN_REQUIRED &gt; 1060
 #    include &lt;OpenGL/gl3.h&gt;
-#    include &lt;OpenGL/glu.h&gt;
 #  else
-#    include &lt;GL/gl.h&gt;
-#    include &lt;GL/glu.h&gt;
+#    include &lt;OpenGL/gl.h&gt;
 #  endif
-
+#  include &lt;OpenGL/glu.h&gt;
+#else
+#  include &lt;GL/gl.h&gt;
+#  include &lt;GL/glu.h&gt;
+#endif
 
 #ifdef TOGL_X11
 // parallel
</pre></body></html>