configure: Don't require pthread for Mingw builds.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
This commit is contained in:
Alexandre Julliard 2022-02-07 13:55:43 +01:00
parent c78174f004
commit ff5530d7ad

View File

@ -69,11 +69,10 @@ VKD3D_CHECK_MINGW32_PROG([CROSSCC32], [CROSSTARGET32], [no])
VKD3D_CHECK_MINGW64_PROG([CROSSCC64], [CROSSTARGET64], [no]) VKD3D_CHECK_MINGW64_PROG([CROSSCC64], [CROSSTARGET64], [no])
dnl Check for headers dnl Check for headers
AC_CHECK_HEADERS([dlfcn.h pthread.h \ AC_CHECK_HEADERS([dlfcn.h \
vulkan/vulkan.h \ vulkan/vulkan.h \
vulkan/spirv.h vulkan/GLSL.std.450.h \ vulkan/spirv.h vulkan/GLSL.std.450.h \
spirv/unified1/spirv.h spirv/unified1/GLSL.std.450.h]) spirv/unified1/spirv.h spirv/unified1/GLSL.std.450.h])
AS_IF([test "x$ac_cv_header_pthread_h" != "xyes"], [AC_MSG_ERROR([pthread.h not found.])])
AS_IF([test "x$ac_cv_header_vulkan_vulkan_h" != "xyes"], [AC_MSG_ERROR([vulkan.h not found.])]) AS_IF([test "x$ac_cv_header_vulkan_vulkan_h" != "xyes"], [AC_MSG_ERROR([vulkan.h not found.])])
AS_IF([test "x$ac_cv_header_spirv_unified1_spirv_h" != "xyes" \ AS_IF([test "x$ac_cv_header_spirv_unified1_spirv_h" != "xyes" \
-a "x$ac_cv_header_vulkan_spirv_h" != "xyes"], -a "x$ac_cv_header_vulkan_spirv_h" != "xyes"],
@ -103,8 +102,15 @@ AC_CHECK_LIB([dl], [dlopen],
[DL_LIBS="-ldl"], [DL_LIBS="-ldl"],
[AS_IF([test "$ac_cv_header_dlfnc_h" = "xyes"], [AC_MSG_ERROR([libdl not found.])])]) [AS_IF([test "$ac_cv_header_dlfnc_h" = "xyes"], [AC_MSG_ERROR([libdl not found.])])])
AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads]) case $host_os in
VKD3D_CHECK_PTHREAD mingw32*) ;;
*) AC_CHECK_HEADERS([pthread.h])
AS_IF([test "x$ac_cv_header_pthread_h" != "xyes"], [AC_MSG_ERROR([pthread.h not found.])])
AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads])
VKD3D_CHECK_PTHREAD
VKD3D_CHECK_PTHREAD_SETNAME_NP
;;
esac
AC_ARG_VAR([VULKAN_LIBS], [linker flags for the Vulkan library]) AC_ARG_VAR([VULKAN_LIBS], [linker flags for the Vulkan library])
VKD3D_CHECK_VULKAN VKD3D_CHECK_VULKAN
@ -132,8 +138,6 @@ VKD3D_CHECK_FUNC([HAVE_BUILTIN_ADD_OVERFLOW], [__builtin_add_overflow], [__built
VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)]) VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)])
VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)]) VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)])
VKD3D_CHECK_PTHREAD_SETNAME_NP
dnl Makefiles dnl Makefiles
AS_IF([test "x$enable_demos" = "xyes" -a "x$HAVE_XCB" != "xyes"], AS_IF([test "x$enable_demos" = "xyes" -a "x$HAVE_XCB" != "xyes"],
[AC_MSG_ERROR([libxcb is required for demos.])]) [AC_MSG_ERROR([libxcb is required for demos.])])