Module: wine Branch: master Commit: c33f3506232df851e275e903c29817539ee167fb URL: https://gitlab.winehq.org/wine/wine/-/commit/c33f3506232df851e275e903c298175...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Nov 10 20:52:04 2023 +0100
configure: Assume that pthread.h is present.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
configure | 20 +++++++------------- configure.ac | 15 ++++----------- include/config.h.in | 3 --- 3 files changed, 11 insertions(+), 27 deletions(-)
diff --git a/configure b/configure index f15c3e46d31..8bb34b7e2ce 100755 --- a/configure +++ b/configure @@ -4382,7 +4382,7 @@ fi # Check whether --with-pthread was given. if test ${with_pthread+y} then : - withval=$with_pthread; if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi + withval=$with_pthread; fi
@@ -8082,12 +8082,6 @@ if test "x$ac_cv_header_port_h" = xyes then : printf "%s\n" "#define HAVE_PORT_H 1" >>confdefs.h
-fi -ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h - fi ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" if test "x$ac_cv_header_pwd_h" = xyes @@ -9059,9 +9053,7 @@ then : fi
-ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "#ifdef HAVE_PTHREAD_H -#include <pthread.h> -#endif +ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "#include <pthread.h> " if test "x$ac_cv_header_pthread_np_h" = xyes then : @@ -13437,9 +13429,11 @@ printf "%s\n" "$as_me:${as_lineno-$LINENO}: zydis libs: $ZYDIS_PE_LIBS" >&5
-if test "$ac_cv_header_pthread_h" = "yes" -then - ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" +if test "x$with_pthread" = xno +then : + +else $as_nop + ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" if test "x$ac_cv_func_pthread_create" = xyes then :
diff --git a/configure.ac b/configure.ac index 5e1c65ab059..d32b672099d 100644 --- a/configure.ac +++ b/configure.ac @@ -51,8 +51,7 @@ AC_ARG_WITH(oss, AS_HELP_STRING([--without-oss],[do not use the OSS sound AC_ARG_WITH(pcap, AS_HELP_STRING([--without-pcap],[do not use the Packet Capture library]), [if test "x$withval" = "xno"; then ac_cv_header_pcap_pcap_h=no; fi]) AC_ARG_WITH(pcsclite, AS_HELP_STRING([--without-pcsclite],[do not use PCSC lite])) -AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]), - [if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi]) +AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library])) AC_ARG_WITH(pulse, AS_HELP_STRING([--without-pulse],[do not use PulseAudio sound support])) AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)])) AC_ARG_WITH(sdl, AS_HELP_STRING([--without-sdl],[do not use SDL])) @@ -438,7 +437,6 @@ AC_CHECK_HEADERS(\ netinet/tcp_fsm.h \ pcap/pcap.h \ port.h \ - pthread.h \ pwd.h \ sched.h \ scsi/scsi.h \ @@ -597,10 +595,7 @@ AC_CHECK_HEADERS([sys/thr.h],,, #include <sys/ucontext.h> #endif])
-AC_CHECK_HEADERS([pthread_np.h],,, -[#ifdef HAVE_PTHREAD_H -#include <pthread.h> -#endif]) +AC_CHECK_HEADERS([pthread_np.h],,,[#include <pthread.h>])
AC_CHECK_HEADERS([linux/videodev2.h],,, [#include <sys/time.h> @@ -1175,10 +1170,8 @@ WINE_EXTLIB_FLAGS(ZYDIS, zydis, zydis, "-I$(top_srcdir)/libs/zydis/include")
dnl **** Check for pthread ****
-if test "$ac_cv_header_pthread_h" = "yes" -then - AC_CHECK_FUNC(pthread_create,,[AC_CHECK_LIB(pthread,pthread_create,[AC_SUBST(PTHREAD_LIBS,"-lpthread")])]) -fi +AS_VAR_IF([with_pthread],[no],[], + [AC_CHECK_FUNC(pthread_create,,[AC_CHECK_LIB(pthread,pthread_create,[AC_SUBST(PTHREAD_LIBS,"-lpthread")])])]) WINE_ERROR_WITH(pthread,[test "x$ac_cv_func_pthread_create" != xyes -a "x$PTHREAD_LIBS" = x], [pthread ${notice_platform}development files not found. Wine cannot support threads without libpthread.]) diff --git a/include/config.h.in b/include/config.h.in index fa234a82f84..157bf572df5 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -318,9 +318,6 @@ /* Define to 1 if you have the `pthread_getthreadid_np' function. */ #undef HAVE_PTHREAD_GETTHREADID_NP
-/* Define to 1 if you have the <pthread.h> header file. */ -#undef HAVE_PTHREAD_H - /* Define to 1 if you have the <pthread_np.h> header file. */ #undef HAVE_PTHREAD_NP_H