Skip to content

Commit

Permalink
use Win32 threads, not pthreads, if both are present (it's not clear …
Browse files Browse the repository at this point in the history
…why Windows users would ever want the latter); see also JuliaLang/julia#2015
  • Loading branch information
stevengj committed Feb 7, 2013
1 parent b862318 commit 2f9d0a4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,7 @@ fi
dnl Check for threads library...
THREADLIBS=""
if test "$enable_threads" = "yes"; then
# POSIX threads, the default choice:
if test -z "$THREADLIBS"; then
ACX_PTHREAD([THREADLIBS="$PTHREAD_LIBS "
CC="$PTHREAD_CC"
AC_DEFINE(USING_POSIX_THREADS, 1, [Define if we have and are using POSIX threads.])])
fi

# Win32 threads are the default on Windows:
if test -z "$THREADLIBS"; then
AC_MSG_CHECKING([for Win32 threads])
AC_TRY_LINK([#include <windows.h>],
Expand All @@ -511,6 +505,13 @@ if test "$enable_threads" = "yes"; then
[AC_MSG_RESULT(no)])
fi

# POSIX threads, the default choice everywhere else:
if test -z "$THREADLIBS"; then
ACX_PTHREAD([THREADLIBS="$PTHREAD_LIBS "
CC="$PTHREAD_CC"
AC_DEFINE(USING_POSIX_THREADS, 1, [Define if we have and are using POSIX threads.])])
fi

if test -z "$THREADLIBS"; then
AC_MSG_ERROR([couldn't find threads library for --enable-threads])
fi
Expand Down

0 comments on commit 2f9d0a4

Please sign in to comment.