浏览代码

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 7 年之前
父节点
当前提交
6fa0187ef0
共有 1 个文件被更改,包括 3 次插入1 次删除
  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_SEARCH_LIBS([sqrt], [m], [], [LOVE_MSG_ERROR([the C math library])])])
 
 
 AC_DEFUN([ACLOVE_DEP_SDL2], [
 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_DEFUN([ACLOVE_DEP_PTHREAD], [
 	AC_SEARCH_LIBS([pthread_create], [pthread], [], [LOVE_MSG_ERROR([the POSIX threads library])])])
 	AC_SEARCH_LIBS([pthread_create], [pthread], [], [LOVE_MSG_ERROR([the POSIX threads library])])])