[svn:parrot] r35761 - trunk/config/gen

[email protected]
Newsgroups perl.cvs.parrot
Message-ID <[email protected]>
Author: fperrad
Date: Mon Jan 19 08:13:25 2009
New Revision: 35761

Modified:
   trunk/config/gen/opengl.pm

Log:
[OpenGL] MinGW
- find includes without using environment variable INCLUDE

Modified: trunk/config/gen/opengl.pm
==============================================================================
--- trunk/config/gen/opengl.pm	(original)
+++ trunk/config/gen/opengl.pm	Mon Jan 19 08:13:25 2009
@@ -37,7 +37,9 @@
 
 use strict;
 use warnings;
+use File::Basename;
 use File::Glob;
+use File::Which;
 
 use base qw(Parrot::Configure::Step);
 
@@ -404,6 +406,13 @@
 
     my @include_paths_win32 = grep /\S/ => split /;/ => ($ENV{INCLUDE} || '');
 
+    my $osname = $conf->data->get_p5('OSNAME');
+    if (scalar @include_paths_win32 == 0 && $osname =~ /mswin32/i) {
+        my $cc = $conf->data->get('cc');
+        my $path = dirname(dirname(which($cc))) . '\include';
+        @include_paths_win32 = ( $path );
+    }
+
     s{\\}{/}g foreach @include_paths_win32;
 
     my @header_globs = (
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.