Suggestion

In case I’m right, I suggest the following hack for ensuring backcompatibility with projects doing a #include <SDL/SDL.h>:

ln -s <path_to_install_SDL>/include/SDL?? <path_to_install_SDL>/include/SDL/SDL

(with the appropriate permissions of course)

Hope this will help

Regards,
Julien

In case I’m right, I suggest the following hack for ensuring
backcompatibility with projects doing a #include <SDL/SDL.h>:

ln -s <path_to_install_SDL>/include/SDL
<path_to_install_SDL>/include/SDL/SDL

(with the appropriate permissions of course)

Or, so that it works from anywhere:

ln -s . <path_to_install_SDL>/include/SDL/SDLOn Wed, Feb 25, 2009 at 5:33 AM, julien CLEMENT wrote:


http://pphaneuf.livejournal.com/

I disagree. A few lines of code can easily rectify the situation for
any project. I just wrote it for you:

http://codebad.com/fix-sdl-headers.shOn Wed, Feb 25, 2009 at 5:33 AM, julien CLEMENT wrote:

In case I’m right, I suggest the following hack for ensuring
backcompatibility with projects doing a #include <SDL/SDL.h>:

ln -s <path_to_install_SDL>/include/SDL
<path_to_install_SDL>/include/SDL/SDL


http://codebad.com/

In case I’m right, I suggest the following hack for ensuring
backcompatibility with projects doing a #include <SDL/SDL.h>:

That reminds me… It’d be nice to follow something like those recommendations:

http://ometer.com/parallel.html

Another way to go at it is to reconsider the idea that putting the
"SDL/" in there is bad, and wonders if we shouldn’t even include the
API/ABI version in there (make people include “SDL-1.3/foo.h”, and
link with -lSDL-1.3). You’re not going to port code from one version
of the API to another without changing the source code (most of the
time), so stating the expected API where it actually matters make
sense.

Plus, this eases the detection and usage of the library by
configuration files and such. You could just
AC_CHECK_HEADER(SDL-1.3/foo.h) and AC_CHECK_LIB(SDL-1.3, SDL_Init) and
be done with it. On Mac OS X, you could name the framework bundle
SDL-1.3, and have it used in what is the normal way there (put
"-framework SDL-1.3" on the linker line and use “SDL-1.3/foo.h” in the
source code), again, nothing special to do.

I took a look at some of the flags that sdl-config sets, and they seem
either related to building SDL itself (setting -D_REENTRANT, or
setting the flags for a backend library, where propagating those to
projects using SDL doesn’t hurt, but isn’t needed), or things that
could be defined in the SDL headers anyway (-Dmain=SDL_main, for
example, and possibly -D_GNU_SOURCE=1, which might actually be of
the first type). It’d be nice if we could make SDL “just a normal
library”, while keeping it robust in the face of API/ABI
compatibility…On Wed, Feb 25, 2009 at 5:33 AM, julien CLEMENT wrote:


http://pphaneuf.livejournal.com/