Browse Source

No longer look for SDL/SDL*.h headers.

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
Sam Hocevar 6 years ago
parent
commit
a1ef3552bc
7 changed files with 12 additions and 28 deletions
  1. +3
    -4
      build/autotools/m4/lol-sdl.m4
  2. +2
    -5
      src/audio/audio.cpp
  3. +2
    -5
      src/audio/sample.cpp
  4. +1
    -3
      src/eglapp.cpp
  5. +2
    -5
      src/image/codec/sdl-image.cpp
  6. +1
    -3
      src/platform/sdl/sdlapp.cpp
  7. +1
    -3
      src/platform/sdl/sdlinput.cpp

+ 3
- 4
build/autotools/m4/lol-sdl.m4 View File

@@ -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_MIXER -- whether SDL_mixer was found
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 Generated automake conditionals:
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}"
CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
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"])
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_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_CHECK_LIB(SDL2, main,
[SDL_LIBS="${SDL_LIBS} -lSDL2"],


+ 2
- 5
src/audio/audio.cpp View File

@@ -13,13 +13,10 @@
#include <lol/engine-internal.h>

#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_mixer.h>
# else
# elif HAVE_SDL_H
# include <SDL.h>
# include <SDL_mixer.h>
# endif


+ 2
- 5
src/audio/sample.cpp View File

@@ -17,13 +17,10 @@
#include <cstring>

#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_mixer.h>
# else
# elif HAVE_SDL_H
# include <SDL.h>
# include <SDL_mixer.h>
# endif


+ 1
- 3
src/eglapp.cpp View File

@@ -29,9 +29,7 @@
#if LOL_USE_SDL
# if HAVE_SDL2_SDL_H
# include <SDL2/SDL.h>
# elif HAVE_SDL_SDL_H
# include <SDL/SDL.h>
# else
# elif HAVE_SDL_H
# include <SDL.h>
# endif
#endif


+ 2
- 5
src/image/codec/sdl-image.cpp View File

@@ -14,13 +14,10 @@

#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_image.h>
#else
#elif HAVE_SDL_H
# include <SDL.h>
# include <SDL_image.h>
#endif


+ 1
- 3
src/platform/sdl/sdlapp.cpp View File

@@ -15,9 +15,7 @@
#if LOL_USE_SDL
# if HAVE_SDL2_SDL_H
# include <SDL2/SDL.h>
# elif HAVE_SDL_SDL_H
# include <SDL/SDL.h>
# else
# elif HAVE_SDL_H
# include <SDL.h>
# endif
#endif


+ 1
- 3
src/platform/sdl/sdlinput.cpp View File

@@ -15,9 +15,7 @@
#if LOL_USE_SDL
# if HAVE_SDL2_SDL_H
# include <SDL2/SDL.h>
# elif HAVE_SDL_SDL_H
# include <SDL/SDL.h>
# else
# elif HAVE_SDL_H
# include <SDL.h>
# endif
#endif


Loading…
Cancel
Save