Przeglądaj źródła

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 lat temu
rodzic
commit
4bd6538a87
1 zmienionych plików z 4 dodań i 3 usunięć
  1. +4
    -3
      build/autotools/m4/lol-sdl.m4

+ 4
- 3
build/autotools/m4/lol-sdl.m4 Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz