diff --git a/configure.ac b/configure.ac index 4401f3c59..1f9b58c0b 100644 --- a/configure.ac +++ b/configure.ac @@ -1189,16 +1189,7 @@ if test $sdl2_req = yes -a $found_sdl2 = no; then AC_MSG_ERROR([SDL2 not found]); fi -# prefer SDL1 -if test $sdl1_req != no -a $found_sdl1 = yes -then - SDL1_OBJ="src/video_display/sdl.o" - AC_DEFINE([HAVE_SDL], [1], [Build with SDL support]) - ADD_MODULE("display_sdl", "$SDL1_OBJ", "$SDL1_LIBS") - SDL_LIB=$SDL1_LIB - sdl_version=1 - sdl=yes -else +# prefer SDL2 if test $sdl2_req != no -a $found_sdl2 = yes then SDL2_OBJ="src/video_display/sdl2.o" @@ -1207,6 +1198,15 @@ then SDL_LIB=$SDL2_LIB sdl_version=2 sdl=yes +else +if test $sdl1_req != no -a $found_sdl1 = yes +then + SDL1_OBJ="src/video_display/sdl.o" + AC_DEFINE([HAVE_SDL], [1], [Build with SDL support]) + ADD_MODULE("display_sdl", "$SDL1_OBJ", "$SDL1_LIBS") + SDL_LIB=$SDL1_LIB + sdl_version=1 + sdl=yes fi fi