mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 20:06:18 +08:00
Fix threads configuration on Windows (Cygwin/MinGW), so that we don't
try to find libpthread, unless we use Cygwin with the Cygwin dll, since Windows always uses native threads. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8422 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+20
-3
@@ -754,7 +754,24 @@ dnl Check for pthreads for multi-threaded apps...
|
|||||||
have_pthread=no
|
have_pthread=no
|
||||||
PTHREAD_FLAGS=""
|
PTHREAD_FLAGS=""
|
||||||
|
|
||||||
if test "x$enable_threads" != xno; then
|
dnl Test whether we want to check for pthreads. We must not do it on Windows
|
||||||
|
dnl unless we run under Cygwin with --enable-cygwin, since we always use
|
||||||
|
dnl native threads on Windows (even if libpthread is available)
|
||||||
|
check_pthread=yes
|
||||||
|
case $uname in
|
||||||
|
MINGW*)
|
||||||
|
check_pthread=no
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
if test "x$enable_cygwin" != xyes; then
|
||||||
|
check_pthread=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if test "x$enable_threads" != xno -a x$check_pthread = xyes; then
|
||||||
AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H))
|
AC_CHECK_HEADER(pthread.h, AC_DEFINE(HAVE_PTHREAD_H))
|
||||||
|
|
||||||
if test x$ac_cv_header_pthread_h = xyes; then
|
if test x$ac_cv_header_pthread_h = xyes; then
|
||||||
@@ -831,10 +848,10 @@ case $uname_GUI in
|
|||||||
if test x$have_pthread = xyes; then
|
if test x$have_pthread = xyes; then
|
||||||
AC_DEFINE(HAVE_PTHREAD)
|
AC_DEFINE(HAVE_PTHREAD)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
THREADS="threads$EXEEXT"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
THREADS="threads$EXEEXT"
|
||||||
|
|
||||||
# Don't make symlinks since Windows is not case sensitive.
|
# Don't make symlinks since Windows is not case sensitive.
|
||||||
if test "x$with_links" != xyes; then
|
if test "x$with_links" != xyes; then
|
||||||
HLINKS="#"
|
HLINKS="#"
|
||||||
|
|||||||
Reference in New Issue
Block a user