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,
e.g:
/usr/include/SDL-1.2/ <- SDL 1.2, pkgconfig gives
-I/usr/include/SDL-1.2
/usr/include/SDL-1.3/ <- SDL 1.3, pkgconfig gives
-I/usr/include/SDL-1.3
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:
Hi,
Looking at SDL_image I noticed that all code in there is in this form
#include “SDL.h”
And you probably all know that the SDL headers are installed in
/include/SDL
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
statement
#include <SDL/SDL.h>
(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
have
both directories.
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>
changes.
Kees
_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org