We now just look for SDL2/SDL.h (the regular location) and SDL.h (when the user provides their own location for this header).legacy
| @@ -37,7 +37,6 @@ dnl LOL_USE_SDL -- whether SDL v2 was found | |||||
| dnl LOL_USE_SDL_IMAGE -- whether SDL_image was found | dnl LOL_USE_SDL_IMAGE -- whether SDL_image was found | ||||
| dnl LOL_USE_SDL_MIXER -- whether SDL_mixer was found | dnl LOL_USE_SDL_MIXER -- whether SDL_mixer was found | ||||
| dnl HAVE_SDL_H -- whether to include <SDL.h> | dnl HAVE_SDL_H -- whether to include <SDL.h> | ||||
| dnl HAVE_SDL_SDL_H -- whether to include <SDL/SDL.h> | |||||
| dnl HAVE_SDL2_SDL_H -- whether to include <SDL2/SDL.h> | dnl HAVE_SDL2_SDL_H -- whether to include <SDL2/SDL.h> | ||||
| dnl Generated automake conditionals: | dnl Generated automake conditionals: | ||||
| dnl LOL_USE_SDL -- whether SDL v2 was found | dnl LOL_USE_SDL -- whether SDL v2 was found | ||||
| @@ -75,12 +74,12 @@ if test "x${ac_cv_my_have_sdl}" = xno; then | |||||
| save_LIBS="${LIBS}" | save_LIBS="${LIBS}" | ||||
| CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}" | CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}" | ||||
| LIBS="${LIBS} ${SDL_LIBS}" | LIBS="${LIBS} ${SDL_LIBS}" | ||||
| AC_CHECK_HEADERS(SDL.h SDL/SDL.h SDL2/SDL.h, | |||||
| AC_CHECK_HEADERS(SDL.h SDL2/SDL.h, | |||||
| [ac_cv_my_have_sdl="yes"]) | [ac_cv_my_have_sdl="yes"]) | ||||
| if test "x${ac_cv_my_have_sdl}" != xno; then | if test "x${ac_cv_my_have_sdl}" != xno; then | ||||
| AC_CHECK_HEADERS(SDL_mixer.h SDL/SDL_mixer.h SDL2/SDL_mixer.h, | |||||
| AC_CHECK_HEADERS(SDL_mixer.h SDL2/SDL_mixer.h, | |||||
| [ac_cv_my_have_sdl_mixer="yes"]) | [ac_cv_my_have_sdl_mixer="yes"]) | ||||
| AC_CHECK_HEADERS(SDL_image.h SDL/SDL_image.h SDL2/SDL_image.h, | |||||
| AC_CHECK_HEADERS(SDL_image.h SDL2/SDL_image.h, | |||||
| [ac_cv_my_have_sdl_image="yes"]) | [ac_cv_my_have_sdl_image="yes"]) | ||||
| AC_CHECK_LIB(SDL2, main, | AC_CHECK_LIB(SDL2, main, | ||||
| [SDL_LIBS="${SDL_LIBS} -lSDL2"], | [SDL_LIBS="${SDL_LIBS} -lSDL2"], | ||||
| @@ -13,13 +13,10 @@ | |||||
| #include <lol/engine-internal.h> | #include <lol/engine-internal.h> | ||||
| #if LOL_USE_SDL_MIXER | #if LOL_USE_SDL_MIXER | ||||
| # if HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | |||||
| # include <SDL/SDL_mixer.h> | |||||
| # elif HAVE_SDL2_SDL_H | |||||
| # if HAVE_SDL2_SDL_H | |||||
| # include <SDL2/SDL.h> | # include <SDL2/SDL.h> | ||||
| # include <SDL2/SDL_mixer.h> | # include <SDL2/SDL_mixer.h> | ||||
| # else | |||||
| # elif HAVE_SDL_H | |||||
| # include <SDL.h> | # include <SDL.h> | ||||
| # include <SDL_mixer.h> | # include <SDL_mixer.h> | ||||
| # endif | # endif | ||||
| @@ -17,13 +17,10 @@ | |||||
| #include <cstring> | #include <cstring> | ||||
| #if LOL_USE_SDL_MIXER | #if LOL_USE_SDL_MIXER | ||||
| # if HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | |||||
| # include <SDL/SDL_mixer.h> | |||||
| # elif HAVE_SDL2_SDL_H | |||||
| # if HAVE_SDL2_SDL_H | |||||
| # include <SDL2/SDL.h> | # include <SDL2/SDL.h> | ||||
| # include <SDL2/SDL_mixer.h> | # include <SDL2/SDL_mixer.h> | ||||
| # else | |||||
| # elif HAVE_SDL_H | |||||
| # include <SDL.h> | # include <SDL.h> | ||||
| # include <SDL_mixer.h> | # include <SDL_mixer.h> | ||||
| # endif | # endif | ||||
| @@ -29,9 +29,7 @@ | |||||
| #if LOL_USE_SDL | #if LOL_USE_SDL | ||||
| # if HAVE_SDL2_SDL_H | # if HAVE_SDL2_SDL_H | ||||
| # include <SDL2/SDL.h> | # include <SDL2/SDL.h> | ||||
| # elif HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | |||||
| # else | |||||
| # elif HAVE_SDL_H | |||||
| # include <SDL.h> | # include <SDL.h> | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| @@ -14,13 +14,10 @@ | |||||
| #if LOL_USE_SDL_IMAGE | #if LOL_USE_SDL_IMAGE | ||||
| #if HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | |||||
| # include <SDL/SDL_image.h> | |||||
| #elif HAVE_SDL2_SDL_H | |||||
| #if HAVE_SDL2_SDL_H | |||||
| # include <SDL2/SDL.h> | # include <SDL2/SDL.h> | ||||
| # include <SDL2/SDL_image.h> | # include <SDL2/SDL_image.h> | ||||
| #else | |||||
| #elif HAVE_SDL_H | |||||
| # include <SDL.h> | # include <SDL.h> | ||||
| # include <SDL_image.h> | # include <SDL_image.h> | ||||
| #endif | #endif | ||||
| @@ -15,9 +15,7 @@ | |||||
| #if LOL_USE_SDL | #if LOL_USE_SDL | ||||
| # if HAVE_SDL2_SDL_H | # if HAVE_SDL2_SDL_H | ||||
| # include <SDL2/SDL.h> | # include <SDL2/SDL.h> | ||||
| # elif HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | |||||
| # else | |||||
| # elif HAVE_SDL_H | |||||
| # include <SDL.h> | # include <SDL.h> | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| @@ -15,9 +15,7 @@ | |||||
| #if LOL_USE_SDL | #if LOL_USE_SDL | ||||
| # if HAVE_SDL2_SDL_H | # if HAVE_SDL2_SDL_H | ||||
| # include <SDL2/SDL.h> | # include <SDL2/SDL.h> | ||||
| # elif HAVE_SDL_SDL_H | |||||
| # include <SDL/SDL.h> | |||||
| # else | |||||
| # elif HAVE_SDL_H | |||||
| # include <SDL.h> | # include <SDL.h> | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||