File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change
1
+ 2.7.0.10
2
+ --------
3
+ * Mac OS X: Search public frameworks first, then system frameworks.
4
+
1
5
2.7.0.9
2
6
--------
3
7
* The GLUT package compiles without any additional library/framework now.
Original file line number Diff line number Diff line change 1
1
name : GLUT
2
- version : 2.7.0.9
2
+ version : 2.7.0.10
3
3
synopsis : A binding for the OpenGL Utility Toolkit
4
4
description :
5
5
A Haskell binding for the OpenGL Utility Toolkit, a window system independent
Original file line number Diff line number Diff line change @@ -48,12 +48,6 @@ hs_GLUT_getProcAddress(const char *name)
48
48
#include <stdlib.h>
49
49
#include <dlfcn.h>
50
50
51
- #ifdef __APPLE__
52
- #define FILENAME "/System/Library/Frameworks/GLUT.framework/GLUT"
53
- #else
54
- #define FILENAME "libglut.so"
55
- #endif
56
-
57
51
void *
58
52
hs_GLUT_getProcAddress (const char * name )
59
53
{
@@ -62,7 +56,18 @@ hs_GLUT_getProcAddress(const char *name)
62
56
63
57
if (firstTime ) {
64
58
firstTime = 0 ;
65
- handle = dlopen (FILENAME , RTLD_LAZY | RTLD_GLOBAL );
59
+
60
+ #ifdef __APPLE__
61
+ /* Try public framework path first. */
62
+ handle = dlopen ("/Library/Frameworks/GLUT.framework/GLUT" , RTLD_LAZY | RTLD_GLOBAL );
63
+
64
+ /* If the public path failed, try the system framework path. */
65
+ if (!handle ) {
66
+ handle = dlopen ("/System/Library/Frameworks/GLUT.framework/GLUT" , RTLD_LAZY | RTLD_GLOBAL );
67
+ }
68
+ #else
69
+ handle = dlopen ("libglut.so" , RTLD_LAZY | RTLD_GLOBAL );
70
+ #endif
66
71
}
67
72
68
73
return handle ? dlsym (handle , name ) : NULL ;
You can’t perform that action at this time.
0 commit comments