Made it possible to build SDL from a fresh checkout without any additional steps.
The trick is that if you're using configure and you don't want to have SDL_config.h and SDL_revision.h to show up as modified, you need to configure and build from a separate directory.
You also need to include SDL_revision.h directly if you want to use the SDL_REVISION constant, as a side effect of these changes.
2 /* Test program to compare the compile-time version of SDL with the linked
10 #include "SDL_revision.h"
13 main(int argc, char *argv[])
18 #if SDL_VERSION_ATLEAST(1, 3, 0)
19 printf("Compiled with SDL 1.3 or newer\n");
21 printf("Compiled with SDL older than 1.3\n");
23 SDL_VERSION(&compiled);
24 printf("Compiled version: %d.%d.%d (%s)\n",
25 compiled.major, compiled.minor, compiled.patch, SDL_REVISION);
26 SDL_GetVersion(&linked);
27 printf("Linked version: %d.%d.%d (%s)\n",
28 linked.major, linked.minor, linked.patch, SDL_GetRevision());