~ubuntu-branches/ubuntu/trusty/pdl/trusty-proposed

« back to all changes in this revision

Viewing changes to Graphics/Makefile.PL

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2005-10-09 21:25:50 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20051009212550-5uri1xdwwpswy3zu
Tags: 1:2.4.2-3ubuntu1
debian/control: added libgl1-mesa-dev and libglu1-mesa-dev to build deps
(GL/GLU Transition)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
use ExtUtils::MakeMaker;
2
2
PDL::Core::Dev->import(); # for trylink
3
3
 
4
 
@subdirs = ("PGPLOT", "LUT", "IIS", "Karma", "PLplot");
 
4
@subdirs = ("PGPLOT", "LUT", "IIS", "Karma", "PLplot", "Limits");
5
5
 
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";
10
10
} else {
11
 
  print  "\n   Trying OpenGL configuration $PDL_CONFIG{OPENGL_LIBS}\n\n";
12
 
  
13
 
  $PDL_CONFIG{OPENGL_LIBS} = guessogllibs($PDL_CONFIG{OPENGL_LIBS});
14
 
 
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';
19
 
         }
20
 
         $PDL_CONFIG{WITH_3D}=1;
21
 
    print "\n    Success using $PDL_CONFIG{OPENGL_LIBS} $PDL_CONFIG{OPENGL_DEFINE}\n\n";
22
 
  }else{
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";
 
12
 
 
13
  $PDL::Config{OPENGL_LIBS} = guessogllibs($PDL::Config{OPENGL_LIBS});
 
14
 
 
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';
 
19
      }
 
20
      $PDL::Config{WITH_3D} = 1;
 
21
 
 
22
      # hack for OS-X
 
23
      if ($^O eq "darwin" and not defined $PDL::Config{OPENGL_INC}) {
 
24
          $PDL::Config{OPENGL_INC} = "-I/usr/X11R6/include";
 
25
      }
 
26
 
 
27
      print "\n    Success using $PDL::Config{OPENGL_LIBS} $PDL::Config{OPENGL_DEFINE}\n\n";
 
28
  } else {
 
29
      warn "\n     COULD NOT link OpenGL \n".
 
30
        "    Not building OpenGL and TriD options!\n\n";
 
31
      $PDL::Config{WITH_3D}=0;
26
32
  }
27
33
}
28
34