@@ -11,12 +11,12 @@ use Config;
1111# Supported windowing interfaces
1212our $is_valid_interface =
1313{
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' ,
2020};
2121
2222
@@ -256,14 +256,6 @@ if ( grep { m/^interface=/i } @ARGV )
256256 }
257257 elsif ($interface eq ' GLX' )
258258 {
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-
267259 if (!$found_libs -> {GL } && !$found_libs -> {MESA } && !$found_libs -> {GLX })
268260 {
269261 print " GLX interface requires GLX/X11 but the libraries were not found\n " ;
@@ -316,7 +308,7 @@ elsif ($IS_CYGWIN)
316308 die " No suitable OpenGL+GLUT interface found for CYGWIN\n " ;
317309 }
318310}
319- elsif ($^O eq ' darwin' && $found_libs -> {GLUT })
311+ elsif ($^O eq ' darwin' && $found_libs -> {GLUT } && ! $found_libs -> { FREEGLUT } )
320312{
321313 $interface_lib = ' AGL' ;
322314}
@@ -658,7 +650,14 @@ sub get_libs
658650 {
659651 $found -> {GL } = ' OpenGL.framework' ;
660652 $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+ }
662661 return $found ;
663662 }
664663
0 commit comments