#define _XGL_H
-#ifdef HAVE_WINDOWS_H
-# include <windows.h>
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
#endif
-#include <GL/gl.h>
-#include <GL/glu.h>
+#if defined(__CYGWIN__) /* && !defined(USING_X) */
+#define WIN32
+#endif
+
+#if defined(WIN32) /* MINGW and MSC predefine WIN32 */
+# include <windows.h>
+#endif
+
+#include <simgear/compiler.h>
+#include SG_GLU_H
+#include SG_GL_H
+
#include <stdio.h>