mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Do not enable Win32 threads and locks when using GCC
This commit is contained in:
parent
012947f09e
commit
e56f9d6275
2 changed files with 29 additions and 29 deletions
30
configure
vendored
30
configure
vendored
|
@ -7624,29 +7624,31 @@ fi
|
|||
# Windows: check if we have native threading APIs and SRW locks
|
||||
#--------------------------------------------------------------------
|
||||
HAVE_WIN32_THREADS_AND_LOCKS=0
|
||||
case "$target_os" in
|
||||
mingw*|windows)
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native Windows threads and locks" >&5
|
||||
if test "$CLANG_CC" = "yes"; then
|
||||
case "$target_os" in
|
||||
mingw*|windows)
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native Windows threads and locks" >&5
|
||||
printf %s "checking for native Windows threads and locks... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#define GS_USE_WIN32_THREADS_AND_LOCKS 1
|
||||
#include "$srcdir/Source/GSPThread.h"
|
||||
#define GS_USE_WIN32_THREADS_AND_LOCKS 1
|
||||
#include "$srcdir/Source/GSPThread.h"
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
HAVE_WIN32_THREADS_AND_LOCKS=1
|
||||
HAVE_WIN32_THREADS_AND_LOCKS=1
|
||||
else $as_nop
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -14511,16 +14513,12 @@ fi
|
|||
HAVE_LIBDISPATCH_RUNLOOP=1
|
||||
fi
|
||||
# Check for availability of functions in more recent libdispatch versions.
|
||||
for ac_func in dispatch_cancel
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "dispatch_cancel" "ac_cv_func_dispatch_cancel"
|
||||
if test "x$ac_cv_func_dispatch_cancel" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DISPATCH_CANCEL 1
|
||||
_ACEOF
|
||||
if test "x$ac_cv_func_dispatch_cancel" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_DISPATCH_CANCEL 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
|
28
configure.ac
28
configure.ac
|
@ -1704,19 +1704,21 @@ AC_CHECK_FUNCS(getaddrinfo)
|
|||
# Windows: check if we have native threading APIs and SRW locks
|
||||
#--------------------------------------------------------------------
|
||||
HAVE_WIN32_THREADS_AND_LOCKS=0
|
||||
case "$target_os" in
|
||||
mingw*|windows)
|
||||
AC_MSG_CHECKING(for native Windows threads and locks)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE([
|
||||
#define GS_USE_WIN32_THREADS_AND_LOCKS 1
|
||||
#include "$srcdir/Source/GSPThread.h"
|
||||
])],
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_WIN32_THREADS_AND_LOCKS=1,
|
||||
AC_MSG_RESULT([no]))
|
||||
;;
|
||||
esac
|
||||
if test "$CLANG_CC" = "yes"; then
|
||||
case "$target_os" in
|
||||
mingw*|windows)
|
||||
AC_MSG_CHECKING(for native Windows threads and locks)
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE([
|
||||
#define GS_USE_WIN32_THREADS_AND_LOCKS 1
|
||||
#include "$srcdir/Source/GSPThread.h"
|
||||
])],
|
||||
AC_MSG_RESULT([yes])
|
||||
HAVE_WIN32_THREADS_AND_LOCKS=1,
|
||||
AC_MSG_RESULT([no]))
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST(HAVE_WIN32_THREADS_AND_LOCKS)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue