Browse Source

Work around possible bugs in sdl2 autoconf script (resolves #1381)

On some systems it can error while detecting SDL2, in that case it returns
without calling the failure function, and thus love continues configuring. I'm
hoping it doesn't call the success callback either, so we can instead check
whether it succeeded, and show an error if it didn't.
Bart van Strien 6 years ago
parent
commit
6fa0187ef0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      platform/unix/deps.m4

+ 3 - 1
platform/unix/deps.m4

@@ -20,7 +20,9 @@ AC_DEFUN([ACLOVE_DEP_LIBM], [
 	AC_SEARCH_LIBS([sqrt], [m], [], [LOVE_MSG_ERROR([the C math library])])])
 
 AC_DEFUN([ACLOVE_DEP_SDL2], [
-	AM_PATH_SDL2([], [], [LOVE_MSG_ERROR([SDL 2])])])
+	aclove_sdl2_found=no
+	AM_PATH_SDL2([], [aclove_sdl2_found=yes], [])
+	AS_VAR_IF([aclove_sdl2_found], [no], [LOVE_MSG_ERROR([SDL 2])], [])])
 
 AC_DEFUN([ACLOVE_DEP_PTHREAD], [
 	AC_SEARCH_LIBS([pthread_create], [pthread], [], [LOVE_MSG_ERROR([the POSIX threads library])])])