From 6fa0187ef0752b1d03ec2c2a7d67e45b5c745116 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Wed, 19 Dec 2018 10:33:33 +0100 Subject: [PATCH] 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. --- platform/unix/deps.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/unix/deps.m4 b/platform/unix/deps.m4 index 42938d96c..fbfb1c9a7 100644 --- a/platform/unix/deps.m4 +++ b/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])])])