diff --git a/sc2/build/unix/config_proginfo_host b/sc2/build/unix/config_proginfo_host index d05863eb7..709594e5d 100644 --- a/sc2/build/unix/config_proginfo_host +++ b/sc2/build/unix/config_proginfo_host @@ -81,6 +81,12 @@ case "$HOST_SYSTEM" in WINSCW|GCCE|ARMV5) LIB_SDL2_DETECT="false" ;; + Darwin) + LIB_SDL2_DETECT="have_command sdl2-config" + LIB_SDL2_CFLAGS='$(sdl2-config --cflags)' + LIB_SDL2_LDFLAGS='$(sdl2-config --static-libs)' + LIB_SDL2_VERSION='$(sdl2-config --version)' + ;; *) LIB_SDL2_DETECT="have_command sdl2-config" LIB_SDL2_CFLAGS='$(sdl2-config --cflags)' diff --git a/sc2/src/darwin/SDLMain.m b/sc2/src/darwin/SDLMain.m index 5a15162c4..d664b2794 100644 --- a/sc2/src/darwin/SDLMain.m +++ b/sc2/src/darwin/SDLMain.m @@ -10,6 +10,9 @@ #import "port.h" #import SDL_INCLUDE(SDL.h) + +#if SDL_MAJOR_VERSION == 1 + #import "SDLMain.h" #import /* for PATH_MAX */ @@ -282,4 +285,4 @@ main (int argc, char **argv) return 0; } - +#endif