This may be irrelevant to you, but I’d just like to point out that don’t have to build SDL from the source. My SDL development on Mac OS uses the pre-compiled binary framework that I simply downloaded (e.g. SDL2-2.0.7.dmg) and linked with my app in Xcode.