From 7d8e75b029149608026e175ea92bcefa4abaa442 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 8 Sep 2014 17:18:33 +0000 Subject: [PATCH] build: fix SDL2 library names. --- build/autotools/m4/lol-sdl.m4 | 12 ++++++++++-- build/visualstudio/Lol.Core.Vars.props | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build/autotools/m4/lol-sdl.m4 b/build/autotools/m4/lol-sdl.m4 index dac44501..e33b9ca7 100644 --- a/build/autotools/m4/lol-sdl.m4 +++ b/build/autotools/m4/lol-sdl.m4 @@ -82,22 +82,30 @@ 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, [ac_cv_my_have_sdl_mixer="yes"]) AC_CHECK_HEADERS(SDL_image.h SDL/SDL_image.h, [ac_cv_my_have_sdl_image="yes"]) + AC_CHECK_LIB(SDL, main, [SDL_LIBS="${SDL_LIBS} -lSDL"], [AC_CHECK_LIB(SDL2, main, [SDL_LIBS="${SDL_LIBS} -lSDL2" ac_cv_my_have_sdl2="yes"], [ac_cv_my_have_sdl="no"])]) + AC_CHECK_LIB(SDLmain, main, [SDL_LIBS="${SDL_LIBS} -lSDLmain -lSDL"]) AC_CHECK_LIB(SDL2main, main, [SDL_LIBS="${SDL_LIBS} -lSDL2main -lSDL2"]) + AC_CHECK_LIB(SDL_mixer, main, [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"], - [ac_cv_my_have_sdl_mixer="no"]) + [AC_CHECK_LIB(SDL2_mixer, main, + [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL2_mixer"], + [ac_cv_my_have_sdl_mixer="no"])]) + AC_CHECK_LIB(SDL_image, main, [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"], - [ac_cv_my_have_sdl_image="no"]) + [AC_CHECK_LIB(SDL2_image, main, + [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL2_image"], + [ac_cv_my_have_sdl_image="no"])]) fi SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}" SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}" diff --git a/build/visualstudio/Lol.Core.Vars.props b/build/visualstudio/Lol.Core.Vars.props index 5b9cc3bd..c29f35cb 100644 --- a/build/visualstudio/Lol.Core.Vars.props +++ b/build/visualstudio/Lol.Core.Vars.props @@ -15,8 +15,8 @@ $(SdlDir)\include;$(SdlImageDir)\include;$(SdlMixerDir)\include $(SdlDir)\lib\i686-w64-msvc;$(SdlImageDir)\lib\i686-w64-msvc;$(SdlMixerDir)\lib\i686-w64-msvc $(SdlDir)\lib\x86_64-msvc;$(SdlImageDir)\lib\x86_64-msvc;$(SdlMixerDir)\lib\x86_64-msvc - SDL2.lib;SDL2main.lib;SDL_image.lib;SDL_mixer.lib - SDL2.lib;SDL2main.lib;SDL_image.lib;SDL_mixer.lib + SDL2.lib;SDL2main.lib;SDL2_image.lib;SDL2_mixer.lib + SDL2.lib;SDL2main.lib;SDL2_image.lib;SDL2_mixer.lib HAVE_SDL_H;USE_SDL;USE_SDL2;$(Win32Defines) USE_SDL_MIXER;USE_SDL_IMAGE;$(Win32Defines)