Author: AlbrechtS
Date: 2011-02-14 10:11:15 -0800 (Mon, 14 Feb 2011)
New Revision: 8422
Log:
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.


Modified:
   branches/branch-1.3/configure.in

Modified: branches/branch-1.3/configure.in
===================================================================
--- branches/branch-1.3/configure.in    2011-02-13 17:31:54 UTC (rev 8421)
+++ branches/branch-1.3/configure.in    2011-02-14 18:11:15 UTC (rev 8422)
@@ -754,7 +754,24 @@
 have_pthread=no
 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))
 
     if test x$ac_cv_header_pthread_h = xyes; then
@@ -831,10 +848,10 @@
            if test x$have_pthread = xyes; then
                AC_DEFINE(HAVE_PTHREAD)
            fi
-
-           THREADS="threads$EXEEXT"
         fi
 
+       THREADS="threads$EXEEXT"
+
        # Don't make symlinks since Windows is not case sensitive.
        if test "x$with_links" != xyes; then
                HLINKS="#"

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to