From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- configure.ac | 4 +--- m4/check-pthread.m4 | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 m4/check-pthread.m4
diff --git a/configure.ac b/configure.ac index bfaa8f2d429a..6d2e12822593 100644 --- a/configure.ac +++ b/configure.ac @@ -80,9 +80,7 @@ AC_CHECK_LIB([dl], [dlopen], [AS_IF([test "$ac_cv_header_dlfnc_h" = "xyes"], [AC_MSG_ERROR([libdl not found.])])])
AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads]) -AC_CHECK_LIB([pthread], [pthread_create], - [AC_SUBST([PTHREAD_LIBS], ["-lpthread"])], - [AC_MSG_ERROR([libpthread not found.])]) +VKD3D_CHECK_PTHREAD
AC_SUBST([VULKAN_LIBS]) VKD3D_CHECK_SONAME([vulkan], [vkGetInstanceProcAddr], diff --git a/m4/check-pthread.m4 b/m4/check-pthread.m4 new file mode 100644 index 000000000000..5fa82ecb8bc3 --- /dev/null +++ b/m4/check-pthread.m4 @@ -0,0 +1,21 @@ +dnl VKD3D_CHECK_PTHREAD +AC_DEFUN([VKD3D_CHECK_PTHREAD], +[vkd3d_pthread_found=no + +AS_IF([test "x$PTHREAD_LIBS" != x], +[vkd3d_libs_saved="$LIBS" +LIBS="$LIBS $PTHREAD_LIBS" + +AC_MSG_CHECKING([checking for pthread_create in $PTHREAD_LIBS]) +AC_TRY_LINK_FUNC([pthread_create], [vkd3d_pthread_found=yes]) +AC_MSG_RESULT([$vkd3d_pthread_found]) + +AS_IF([test "x$vkd3d_pthread_found" = "xno"], [PTHREAD_LIBS=""]) + +LIBS="$vkd3d_libs_saved"]) + +AS_IF([test "x$vkd3d_pthread_found" != "xyes"], +AC_CHECK_LIB([pthread], [pthread_create], + [PTHREAD_LIBS="-lpthread"], + [AC_MSG_ERROR([libpthread not found.])])) +])
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=49582
Your paranoid android.
=== debian9 (build log) ===
error: patch failed: configure.ac:54 error: patch failed: configure.ac:80 Task: Patch failed to apply
=== debian9b (build log) ===
error: patch failed: configure.ac:54 error: patch failed: configure.ac:80 Task: Patch failed to apply