- if test "$ac_cv_mingw32" = yes ; then
- ol_link_threads=nt
- ol_with_threads=found
- ol_with_yielding_select=yes
- echo $ac_n "checking for NT threads""... $ac_c" 1>&6
-echo "configure:6629: checking for NT threads" >&5
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE_NT_THREADS 1
-EOF
-
- fi
-fi
-
-if test $ol_with_threads = auto -o $ol_with_threads = yes \
- -o $ol_with_threads = posix ; then
-
- for ac_hdr in pthread.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+
+ echo $ac_n "checking for NT Threads""... $ac_c" 1>&6
+echo "configure:7031: checking for NT Threads" >&5
+if eval "test \"\${ol_cv_nt_threads+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
+echo "configure:7037: checking for _beginthread" >&5
+if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 7042 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _beginthread(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char _beginthread();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub__beginthread) || defined (__stub____beginthread)
+choke me
+#else
+f = _beginthread;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func__beginthread=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func__beginthread=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ol_cv_nt_threads=yes
+else
+ echo "$ac_t""no" 1>&6
+ol_cv_nt_threads=no
+fi
+
+
+fi
+
+echo "$ac_t""$ol_cv_nt_threads" 1>&6
+
+ if test $ol_cv_nt_threads = yes ; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_NT_THREADS 1
+EOF
+
+ fi
+
+
+ if test "$ol_cv_nt_threads" = yes ; then
+ ol_link_threads=nt
+ ol_with_threads=found
+ ol_with_yielding_select=yes
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_NT_SERVICE_MANAGER 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_NT_EVENT_LOG 1
+EOF
+
+ fi
+
+ if test $ol_with_threads = nt ; then
+ { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
+ fi
+fi
+
+if test $ol_with_threads = auto -o $ol_with_threads = yes \
+ -o $ol_with_threads = posix ; then
+
+ for ac_hdr in pthread.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`