SDL_config.h generated by CMake or configure is never used

When doing an out-of-tree build with CMake or configure, a custom SDL_config.h is generated and is put into mybuilddir/include/SDL_config.h. AFAICS, however, this custom SDL_config.h, is never really used because SDL headers always use

#include "SDL_config.h"

instead of

#include <SDL_config.h>

Thus, SDL_config.h is always loaded from the main include directory in the SDL distribution and not from the build directory.

So what’s the purpose of the SDL_config.h in the build directory anyhow? Isn’t this completely superfluous or have I missed anything here and this file is really used?

There’s not a big difference between the quoted and angle bracket version except that the quoted version also searches in the place where the input file is. Or something like that. It’s implementation defined.

The include paths set with the -I option have a higher priority than the default search paths. Both autoconf and CMake put an include path to the generated config in the cflags.

If it isn’t picked up in your setup, then something went wrong.

We’re talking about SDL2 here, right?