[SDL] Re: SDL 1.2.9 PRERELEASE (Mac OS X)

Anders F Björklund afb at algonet.se
Wed Aug 31 12:36:17 PDT 2005


E. Wing wrote:

>> Sorry, I took that script right off my own files - that do have 
>> support
>> both for Cocoa ("Quartz") and for Carbon ("toolbox") video drivers...
>>
>> Also, in the old patch it preferred a) X11 and b) Carbon which is 
>> wrong.
>> If all three are available, it should use the Quartz driver (move it 
>> up)
>
> Does the patch you submitted for Carbon and X11 force us to change the
> link flags for the end user? If so, I think we need to decline the
> patch, unless SDL can still be compiled the old way, which would have
> to be the case for the binaries we provide.

No, it does not.
I was under the impression that the Quartz driver required
Carbon and OpenGL anyway, so I didn't bother taking them out...

It's all flags now for configure, if you saw the actual patch.
In my local build, I have them all enabled. Doesn't have to
be that way in the default builds, can default them to "off" ?

I used this line:
../configure --enable-video-cocoa --enable-video-carbon --enable-dlopen 
\
--enable-video-x11 --x-includes=/usr/X11R6/include 
--x-libraries=/usr/X11R6/lib

The required libraries varies on what options you configure:

     if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
       SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Cocoa"
     fi
     if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
       SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Carbon"
     fi
     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
       SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
     fi

But I will tweak the default values and the driver order,
to make the standard "blank" ./configure match the old one.
(i.e. make Quartz the default driver and the others disabled)

Will make a new patch, against the SDL-1.2.9 release version.

> I think it's just going to
> break too many people who have existing build systems out there if it
> suddenly requires additional link flags for the end developers. I
> think the Carbon fallback isn't terribly useful as Mac OS 9 is
> essentially dead and nobody is really maintaining that code.

Maybe there was some kind of misunderstanding, but the Carbon driver
was only intended for Mac OS X. I only based it off the old one since
it's mostly the same anyway and it was easier to use conditionals...

That it happens to work on Mac OS 9 with CarbonLib is just a "bonus".

There seems to be some kind of SDL belief that Mac OS X requires
the use of Cocoa and Objective-C - while Apple has promoted their
old "porting" library now, to an alternative using Carbon and C/C++.

They can both use the .nib files that Interface Builder creates ?

> The X11
> support is kind of interesting, but it's not something that I think
> really needs to be enabled for outside internal use. I'm also not sure
> if you need the headers from the X11 stuff. I think by default, the
> developer tools does not install the X11 development stuff (runtime is
> provided though), so there is the possibility that people won't be
> able to build SDL with this. Since our Xcode build system doesn't have
> any detection support, this support would not be enabled.

The X11 support was *mostly* intended for Darwin, to be honest...
Since it doesn't have the Cocoa and Carbon frameworks, I mean ?

But it's rather useful on Mac as a testing platform, if you want
to see how your games will look on an X11 platform - like Linux.

--anders





More information about the SDL mailing list