From 32da35115cf92bbf4d953648fe80a9e06deb16f4 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sun, 20 May 2018 11:27:29 +0200 Subject: [PATCH] Always link against pthread when using autotools (resolves #1410) Theoretically I could enable it on a case-by-case basis, but as of now glslang, physfs and the thread module all require pthread, so I might as well just always link it in. --- platform/unix/configure.ac | 1 + platform/unix/deps.m4 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/platform/unix/configure.ac b/platform/unix/configure.ac index d08119fd7..ba1c1edc5 100644 --- a/platform/unix/configure.ac +++ b/platform/unix/configure.ac @@ -63,6 +63,7 @@ ACLOVE_DEP_LUA ACLOVE_DEP_SDL2 ACLOVE_DEP_LIBM ACLOVE_DEP_ZLIB +ACLOVE_DEP_PTHREAD # Conditional dependencies AS_VAR_IF([enable_module_audio], [yes], [ACLOVE_DEP_OPENAL], []) diff --git a/platform/unix/deps.m4 b/platform/unix/deps.m4 index 0a108bc6a..42938d96c 100644 --- a/platform/unix/deps.m4 +++ b/platform/unix/deps.m4 @@ -22,6 +22,9 @@ AC_DEFUN([ACLOVE_DEP_LIBM], [ AC_DEFUN([ACLOVE_DEP_SDL2], [ AM_PATH_SDL2([], [], [LOVE_MSG_ERROR([SDL 2])])]) +AC_DEFUN([ACLOVE_DEP_PTHREAD], [ + AC_SEARCH_LIBS([pthread_create], [pthread], [], [LOVE_MSG_ERROR([the POSIX threads library])])]) + # does not use pkg-config because of the FILE_OFFSET_BITS.. bit AC_DEFUN([ACLOVE_DEP_MPG123], [ AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [],