@@ -11,12 +11,12 @@ use Config;
11
11
# Supported windowing interfaces
12
12
our $is_valid_interface =
13
13
{
14
- ' AGL' => ' GLUT framework on Mac OS X' ,
15
- ' FREEGLUT' => ' FreeGLUT, preferred over GLUT' ,
16
- ' GLUT' => ' GLUT; often really FreeGLUT on Linux' ,
17
- ' GLX' => ' GLX+X11 not supported ; use GLUT or FreeGLUT ' ,
18
- ' W32API' => ' Uses WGL+FreeGLUT on CYGWIN, instead of GLX+FreeGLUT' ,
19
- ' WGL' => ' Same as W32API' ,
14
+ ' AGL' => ' Default GLUT framework on Mac OS X' ,
15
+ ' FREEGLUT' => ' FreeGLUT, preferred over GLUT' ,
16
+ ' GLUT' => ' GLUT; often really FreeGLUT on Linux' ,
17
+ ' GLX' => ' Default GLX+X11 on Linux ; use XQuartz on Mac OS X ' ,
18
+ ' W32API' => ' Uses WGL+FreeGLUT on CYGWIN, instead of GLX+FreeGLUT' ,
19
+ ' WGL' => ' Same as W32API' ,
20
20
};
21
21
22
22
@@ -256,14 +256,6 @@ if ( grep { m/^interface=/i } @ARGV )
256
256
}
257
257
elsif ($interface eq ' GLX' )
258
258
{
259
- print " \n " ;
260
- print " ***********************************************************************\n " ;
261
- print " * ERROR: GLX interface is not supported, use GLUT or FreeGLUT instead *\n " ;
262
- print " ***********************************************************************\n " ;
263
- print " \n " ;
264
-
265
- exit 0;
266
-
267
259
if (!$found_libs -> {GL } && !$found_libs -> {MESA } && !$found_libs -> {GLX })
268
260
{
269
261
print " GLX interface requires GLX/X11 but the libraries were not found\n " ;
@@ -316,7 +308,7 @@ elsif ($IS_CYGWIN)
316
308
die " No suitable OpenGL+GLUT interface found for CYGWIN\n " ;
317
309
}
318
310
}
319
- elsif ($^O eq ' darwin' && $found_libs -> {GLUT })
311
+ elsif ($^O eq ' darwin' && $found_libs -> {GLUT } && ! $found_libs -> { FREEGLUT } )
320
312
{
321
313
$interface_lib = ' AGL' ;
322
314
}
@@ -658,7 +650,14 @@ sub get_libs
658
650
{
659
651
$found -> {GL } = ' OpenGL.framework' ;
660
652
$found -> {GLU } = ' AGL.framework' ;
661
- $found -> {GLUT } = ' GLUT.framework' ;
653
+ if (-e ' /opt/X11/lib/libglut.3.dylib' )
654
+ {
655
+ $found -> {FREEGLUT } = ' glut' ;
656
+ }
657
+ else
658
+ {
659
+ $found -> {GLUT } = ' GLUT.framework' ;
660
+ }
662
661
return $found ;
663
662
}
664
663
0 commit comments