summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/sdl.c4
-rw-r--r--CMakeLists.txt7
-rw-r--r--config.h.in6
3 files changed, 15 insertions, 2 deletions
diff --git a/Alc/sdl.c b/Alc/sdl.c
index 791763ba..236aaf9d 100644
--- a/Alc/sdl.c
+++ b/Alc/sdl.c
@@ -30,7 +30,11 @@
#include <dlfcn.h>
#endif
+#ifdef HAVE_SDL_SDL_H
#include <SDL/SDL.h>
+#elif defined(HAVE_SDL_H)
+#include <SDL.h>
+#endif
static void *sdl_handle;
#define MAKE_FUNC(x) static typeof(x) * p##x
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0a87221d..4956329e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -323,8 +323,11 @@ ENDIF()
# Check SDL backend
IF(SDL)
- CHECK_INCLUDE_FILE(SDL/SDL.h HAVE_SDL_SDL_H)
- IF(HAVE_SDL_SDL_H)
+ CHECK_INCLUDE_FILE(SDL.h HAVE_SDL_H)
+ IF(NOT HAVE_SDL_H)
+ CHECK_INCLUDE_FILE(SDL/SDL.h HAVE_SDL_SDL_H)
+ ENDIF()
+ IF(HAVE_SDL_H OR HAVE_SDL_SDL_H)
CHECK_LIBRARY_EXISTS(SDL SDL_Init "" HAVE_LIBSDL)
IF(HAVE_DLFCN_H OR HAVE_LIBSDL)
SET(HAVE_SDL 1)
diff --git a/config.h.in b/config.h.in
index fce1dab2..45df5157 100644
--- a/config.h.in
+++ b/config.h.in
@@ -37,6 +37,12 @@
/* Define if we have stdint.h */
#cmakedefine HAVE_STDINT_H
+/* Define if we have SDL/SDL.h */
+#cmakedefine HAVE_SDL_SDL_H
+
+/* Define if we have SDL.h */
+#cmakedefine HAVE_SDL_H
+
/* Define if we have the __int64 type */
#cmakedefine HAVE___INT64