Latest from hg on OSX

John W. Eaton jwe at bevo.che.wisc.edu
Wed Jun 18 10:05:58 CDT 2008


On 18-Jun-2008, Thomas Treichl wrote:

| > as far as I understand
| > -framework OpenGL and -FOpenGL
| > on darwin are shortcuts for
| > -L/System/Library/Frameworks/OpenGL.framework/Libraries
| > and
| > -I/System/Library/Frameworks/OpenGL.framework/Headers
| > and from the apple gcc manpage
| > 
| > "An example include looks like "#include <Framework/header.h>", where
| >  Framework denotes the name of the framework and header.h is found in
| >  the "PrivateHeaders" or "Headers" directory."
| > 
| > so I beleive that
| > #include <OpenGL/gl.h>
| > includes
| > -I/System/Library/Frameworks/OpenGL.framework/Headers/gl.h
| > 
| > and indeed FL/gl.h from fltk uses the same include clause:
| > 
| > #  ifdef __APPLE__
| > #    include <OpenGL/gl.h>
| > #  else
| > #    include <GL/gl.h>
| > #  endif
| 
| Ok for me, but then I vote for a configure-test which automatically sets up 
| "all" necessary Mac-specific compiler and linker options and ignores all the 
| other UNIX options.
| My thought always has been to keep as much UNIX as possible for Mac too and to 
| not make the codes depend on too many platform specials, eg. like the Mac-only 
| -FOpenGL option and an #include <Framework/whatever.h> or similar.

Yes, we should use feature tests, not tests for system types using
macros like __APPLE__.  That test is too broad and doesn't account
for the possibility of having the files installed in an alternate
location (maybe you installed your own copy of OpenGL in some other
directory structure?).

jwe


More information about the Octave-maintainers mailing list