瀏覽代碼

Fix a bug in SDL detection causing false positives.

If SDL_CFLAGS is defined to a non-empty value, even spaces, a later
test will wrongly succeed and think SDL_CFLAGS is a user override.
undefined
Sam Hocevar 9 年之前
父節點
當前提交
4bd6538a87
共有 1 個檔案被更改,包括 4 行新增3 行删除
  1. +4
    -3
      build/autotools/m4/lol-sdl.m4

+ 4
- 3
build/autotools/m4/lol-sdl.m4 查看文件

@@ -55,7 +55,8 @@ if test "x${ac_cv_my_have_sdl}" = xno; then
save_LIBS="${LIBS}"
CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
LIBS="${LIBS} ${SDL_LIBS}"
AC_CHECK_HEADERS(SDL.h SDL/SDL.h SDL2/SDL.h, [ac_cv_my_have_sdl="yes"])
AC_CHECK_HEADERS(SDL.h SDL/SDL.h SDL2/SDL.h,
[ac_cv_my_have_sdl="yes"])
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_cv_my_have_sdl_mixer="yes"])
@@ -72,9 +73,9 @@ if test "x${ac_cv_my_have_sdl}" = xno; then
AC_CHECK_LIB(SDL2_image, main,
[SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL2_image"],
[ac_cv_my_have_sdl_image="no"])
SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
fi
SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
CPPFLAGS="${save_CPPFLAGS}"
LIBS="${save_LIBS}"
fi


Loading…
取消
儲存