1
1
use ExtUtils::MakeMaker;
2
2
PDL::Core::Dev->import(); # for trylink
4
@subdirs = ("PGPLOT", "LUT", "IIS", "Karma", "PLplot");
4
@subdirs = ("PGPLOT", "LUT", "IIS", "Karma", "PLplot", "Limits");
6
6
# we try and build unless WITH_3d == 0
7
$t = $PDL_CONFIG{WITH_3D};
7
$t = $PDL::Config{WITH_3D};
8
8
if( defined($t) and $t == 0 ) {
9
print "\n Not building TriD or OpenGL. Turn on WITH_3D if this is incorrect.\n\n";
9
print "\n Not building TriD or OpenGL. Turn on WITH_3D if this is incorrect.\n\n";
11
print "\n Trying OpenGL configuration $PDL_CONFIG{OPENGL_LIBS}\n\n";
13
$PDL_CONFIG{OPENGL_LIBS} = guessogllibs($PDL_CONFIG{OPENGL_LIBS});
15
if(defined $PDL_CONFIG{OPENGL_LIBS}){
16
unshift @subdirs,"TriD";
17
if($PDL_CONFIG{OPENGL_LIBS} =~ /Mesa/){
18
$PDL_CONFIG{OPENGL_DEFINE} .= ' -DGL_GLEXT_LEGACY';
20
$PDL_CONFIG{WITH_3D}=1;
21
print "\n Success using $PDL_CONFIG{OPENGL_LIBS} $PDL_CONFIG{OPENGL_DEFINE}\n\n";
23
warn "\n COULD NOT link OpenGL \n".
24
" Not building OpenGL and TriD options!\n\n";
25
$PDL_CONFIG{WITH_3D}=0;
11
print "\n Trying OpenGL configuration $PDL::Config{OPENGL_LIBS}\n\n";
13
$PDL::Config{OPENGL_LIBS} = guessogllibs($PDL::Config{OPENGL_LIBS});
15
if ( defined $PDL::Config{OPENGL_LIBS} ) {
16
unshift @subdirs,"TriD";
17
if ( $PDL::Config{OPENGL_LIBS} =~ /Mesa/ ) {
18
$PDL::Config{OPENGL_DEFINE} .= ' -DGL_GLEXT_LEGACY';
20
$PDL::Config{WITH_3D} = 1;
23
if ($^O eq "darwin" and not defined $PDL::Config{OPENGL_INC}) {
24
$PDL::Config{OPENGL_INC} = "-I/usr/X11R6/include";
27
print "\n Success using $PDL::Config{OPENGL_LIBS} $PDL::Config{OPENGL_DEFINE}\n\n";
29
warn "\n COULD NOT link OpenGL \n".
30
" Not building OpenGL and TriD options!\n\n";
31
$PDL::Config{WITH_3D}=0;