From 0b269e6ee66d3aafba14b3e48f27446086f09b64 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 15 Apr 2022 01:02:13 +0200 Subject: configure: Only check for pthread if really required --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d9f9023..3815275 100644 --- a/configure.ac +++ b/configure.ac @@ -87,15 +87,19 @@ case ${host_os} in darwin*) AC_MSG_RESULT([${host_os}]) AC_DEFINE([_DARWIN_BETTER_REALPATH], [1], [Use better method for realpath]) - AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) ;; *) AC_MSG_RESULT([${host_os}]) - AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) ;; esac AM_CONDITIONAL(WIN32, test x$win32 = xtrue) +if test x$win32 != xtrue; then + if test "x$ac_cv_func_mkstemp" != xyes; then + AC_CHECK_LIB(pthread, [pthread_self], [], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) + fi +fi + CACHED_CFLAGS="$CFLAGS" CFLAGS+=" $libimobiledevice_CFLAGS" -- cgit v1.1-32-gdbae