(patch) X11 on Mac OS X

For compatibility reasons, it is useful
to test the X11 version too on Mac OS X -
but it refuses to compile the X11 driver ?

Here’s a patch to add Darwin to the Unix list…
(one for 1.2.8, and one for the CVS version)
It should work on OpenDarwin too, I believe ?

You also need to specify where the X11 libs
are located, from Apple’s X11 Developer Kit:
http://www.apple.com/macosx/features/x11/
(included with Xcode, installed in /usr/X11R6)

Then I tweaked the configure script to use
the “X11/OpenGL”, instead of “Quartz/MacGL”
(see the attached diff, from this little hack)
and finally told the configure script paths:

./configure --prefix=/opt/sdl --disable-audio --with-x
–x-include=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
–enable-video-x11 --enable-video-opengl

So now I have a special version in “/opt/sdl”,
and the regular version under /usr or /Library.
(I disabled audio for the time being, it could
probably be made to work without CoreAudio…)

I’m not sure what you do to compile all the
different drivers for Mac OS X at the same time ?

  • Carbon (mac)
  • Cocoa (quartz)
  • Darwin/X11 (i.e. without all the Apple stuff)

For some reason, it always uses Cocoa/Objective-C ?
(and macosx/SDLMain.m, instead of macos/SDL_main.c)
But that’s for a second patch, or two, I suppose…

–anders
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-1.2.8-darwin-X11.patch
Type: application/octet-stream
Size: 635 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050408/8ab01bb3/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-12CVS-darwin-X11.patch
Type: application/octet-stream
Size: 973 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050408/8ab01bb3/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-1.2.8-configure.diff
Type: application/octet-stream
Size: 703 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050408/8ab01bb3/attachment-0002.obj
-------------- next part --------------