I personally like this strategy, and if I was only doing SDL
1.3/2.0/whatever final version gets picked, it would be cool, but I can tell
you right now that the first error someone gets when porting their code is
having to fix #include errors all of the place. Not the most pleasant first
experience with the “new” SDL. Still, that isn’t a good long term
justification, just something to consider.
I like the use of a separate folder for SDL stuff because I think that is
just cleaner, but it is going to be a pain to get Linux distros to handle
dual SDL 1.2 / SDL 1.3 support. They would need a different pkgconfig file
for them, and would need to make sure that /usr/include is not messed up,
/usr/include/SDL-1.2/ <- SDL 1.2, pkgconfig gives
/usr/include/SDL-1.3/ <- SDL 1.3, pkgconfig gives
I can imagine there will be at least one Linux distro that will royally
screw this up and mix 1.2 and 1.3 headers because they don’t apply a version
number to the SDL folder and just throw all of SDLs headers into
/usr/include/SDL and have pkgconfig give -I/usr/include/SDL.
So yes, I approve, but in reality, I expect a lot of distros to screw this
up. Be ready to handle the fallout.
PatrickOn Thu, Aug 4, 2011 at 4:28 PM, Kees Bakker <kees.bakker at xs4all.nl> wrote:
Looking at SDL_image I noticed that all code in there is in this form
And you probably all know that the SDL headers are installed in
To complete the story, we have
sdl-config --cflags for use at compile
time. It works, but it is ugly when you want to build and use frameworks
and Xcode. In an Xcode project you have to list the directory where
SDL.framework is, but you also have to fully specify where the Headers
directory (in that framework) is. If you want to build with another
SDL version (different location of the framework), you have to modify
the INCDIRs too.
What I am proposing (for SDL 1.3 of course) is to use the following include
(Using <> also makes more sense than using “”.)
What is needed to make this happen?
- change sdl-config.in (just drop the /SDL from -I at includedir@)
- no further changes needed in SDL
- change the users of SDL (i.e. SDL_image, examples, etc)
During a certain migration time we may want to change sdl-config.in to
echo -I at includedir@ -I at includedir@/SDL @SDL_CFLAGS@
What do you think?
BTW. I have a patch for SDL_image with the “SDL.h” => <SDL/SDL.h>
SDL mailing list
SDL at lists.libsdl.org