Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

cygwin needs to strictly decide between X11 opengl and non-X11 opengl #761

Open
rurban opened this Issue · 1 comment

1 participant

@rurban
Collaborator

My previous opengl patch - skip /usr/include/ on X11 if DISPLAY is not set - is not stable enough, if DISPLAY is set.
It would include X11 and non-X11 headers, which differ. (w32api GLUT vs freeglut X11)

This is a more stable logic:

--- origsrc/parrot-4.3.0/config/gen/opengl.pm   2011-09-21 09:51:30.000000000 -0500
+++ src/parrot-4.3.0/config/gen/opengl.pm       2012-05-02 16:14:35.720361000 -0500
@@ -447,7 +447,7 @@ sub runstep {
         '/System/Library/Frameworks/GLUT.framework/Headers/*.h',

         # Cygwin
-        '/usr/include/w32api/GL/*.h',
+        # '/usr/include/w32api/GL/*.h',

         # Windows/MSVC
         (map "$_/gl/*.h" => @include_paths_win32),
@@ -487,7 +487,12 @@ sub runstep {
     );

     # X freeglut only if DISPLAY is set, otherwise use native w32api GLUT
-    shift @header_globs if $^O eq 'cygwin' and !$ENV{DISPLAY};
+    if ($^O eq 'cygwin') {
+        if (!$ENV{DISPLAY}) {
+            shift @header_globs; # no X
+            unshift @header_globs, '/usr/include/w32api/GL/*.h';
+        }
+    }

     my $globs_str = join("\n\t", @header_globs) . "\n";
     $conf->debug(
@rurban
Collaborator

Since I removed /usr/include/w32api/GL/*.h I'm not sure if mingw needs that.
If so, mingw needs a logic to add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.