--- CMakeLists.txt.orig	2018-03-20 22:30:14 UTC
+++ CMakeLists.txt
@@ -187,7 +187,12 @@
 check_include_files(termios.h HAVE_TERMIOS_H)
 check_include_files(strings.h HAVE_STRINGS_H)
 check_include_files(malloc.h HAVE_MALLOC_H)
-check_include_files(${SDL_INCLUDE_DIR}/SDL_config.h HAVE_SDL_CONFIG_H)
+foreach(_sid ${SDL_INCLUDE_DIR})
+  check_include_files(${_sid}/SDL_config.h HAVE_SDL_CONFIG_H)
+  if(HAVE_SDL_CONFIG_H)
+    break()
+  endif()
+endforeach()
 check_include_files(sys/time.h HAVE_SYS_TIME_H)
 check_include_files(sys/times.h HAVE_SYS_TIMES_H)
 check_include_files(utime.h HAVE_UTIME_H)
