develooper Front page | perl.cvs.parrot | Postings from January 2009

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

From:
fperrad
Date:
January 19, 2009 08:13
Subject:
[svn:parrot] r35761 - trunk/config/gen
Message ID:
20090119161326.E5898CB9AE@x12.develooper.com
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 = (



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About