[MLton] patch for MLton OpenGL code
John Reppy
jhr@cs.uchicago.edu
Sat, 15 Oct 2005 14:47:52 -0500
The following changes will allow the OpenGL code in the MLton
source tree to compile on darwin. Unfortunately, the executables
are not working for me, but I suspect that the distributed version
was built on a 10.3 machine, and I'm running 10.4.2.
- John
<jhr@moby> diff -c -r opengl mlton-20050731/lib/opengl
Only in opengl: .gdb_history
diff -c -r opengl/GLUT_c.c mlton-20050731/lib/opengl/GLUT_c.c
*** opengl/GLUT_c.c Sat Oct 15 14:26:30 2005
--- mlton-20050731/lib/opengl/GLUT_c.c Sun Jan 25 07:51:27 2004
***************
*** 1,10 ****
/* Glut-export.c */
- #if defined(__APPLE__) && defined(__MACH__)
- #include <GLUT/glut.h>
- #else
#include <GL/gl.h>
#include <GL/glut.h>
- #endif
#include "GLUT_h.h"
int callGlutCreateMenu ()
--- 1,6 ----
diff -c -r opengl/GLU_c.c mlton-20050731/lib/opengl/GLU_c.c
*** opengl/GLU_c.c Sat Oct 15 14:26:25 2005
--- mlton-20050731/lib/opengl/GLU_c.c Sun Jan 25 07:51:27 2004
***************
*** 1,9 ****
/* GLU-export.c */
- #if defined(__APPLE__) && defined(__MACH__)
- #include <OpenGL/glu.h>
- #else
#include <GL/glu.h>
- #endif
#include "GLU_h.h"
--- 1,5 ----
diff -c -r opengl/GL_c.c mlton-20050731/lib/opengl/GL_c.c
*** opengl/GL_c.c Sat Oct 15 14:27:11 2005
--- mlton-20050731/lib/opengl/GL_c.c Sun Jan 25 07:51:27 2004
***************
*** 1,9 ****
/* Gl-export.c */
- #if defined(__APPLE__) && defined(__MACH__)
- #include <OpenGL/gl.h>
- #else
#include <GL/gl.h>
- #endif
#include "GL_h.h"
--- 1,5 ----
diff -c -r opengl/Makefile mlton-20050731/lib/opengl/Makefile
*** opengl/Makefile Sat Oct 15 14:41:17 2005
--- mlton-20050731/lib/opengl/Makefile Sat Oct 15 14:19:15 2005
***************
*** 2,8 ****
MLTON_FLAGS = \
-default-ann 'allowExport true' \
-default-ann 'allowImport true' \
- -target-link-opt darwin '-framework GLUT -framework OpenGL -
framework Foundation' \
-target-link-opt cygwin '-L/lib/w32api -lglut32 -lglu32 -
lopengl32' \
-target-link-opt linux '-lglut -lGLU -lGL'
--- 2,7 ----