diff -ru ../mono.orig/configure.in ./configure.in
--- ../mono.orig/configure.in	Mon Dec  9 18:22:48 2002
+++ ./configure.in	Sat Dec 14 18:05:02 2002
@@ -163,6 +163,19 @@
 		;;
 esac
 
+dnl See if autoconf can find a pthread implementation
+dnl If it cannot then see of pth is installed, if so use that
+AC_CHECK_HEADER(pthread.h, FOUND_PTHREAD_H=yes, FOUND_PTHREAD_H=no)
+if test "x$FOUND_PTHREAD_H" = "xno" ; then
+	AC_PATH_PROG(PTH_CONFIG, pthread-config, no)
+	if test "x$PTH_CONFIG" = "xno" ; then
+		AC_MSG_ERROR([You need either native pthreads or GNU pth])
+	else
+		CFLAGS="$CFLAGS `pthread-config --cflags`"
+		LDFLAGS="$LDFLAGS `pthread-config --libs`"
+	fi
+fi
+
 if test x$platform_win32 = xno; then
 	dnl ******************************************************************
 	dnl *** Check for large file support                               ***
diff -ru ../mono.orig/mono/io-layer/timed-thread.c ./mono/io-layer/timed-thread.c
--- ../mono.orig/mono/io-layer/timed-thread.c	Wed Nov 20 12:32:40 2002
+++ ./mono/io-layer/timed-thread.c	Sat Dec 14 18:10:58 2002
@@ -111,7 +111,12 @@
 	mono_mutex_init(&thread->join_mutex, NULL);
 	pthread_cond_init(&thread->exit_cond, NULL);
 	thread->create_flags = create_flags;
+#ifdef HAVE_SEMAPHORE_H
 	sem_init (&thread->suspend_sem, 0, 0);
+#else
+        pthread_mutex_init (&thread->suspend_sem, NULL);
+#endif
+
 	thread->start_routine = start_routine;
 	thread->exit_routine = exit_routine;
 	thread->arg = arg;
@@ -141,7 +146,12 @@
 
 	mono_mutex_init(&thread->join_mutex, NULL);
 	pthread_cond_init(&thread->exit_cond, NULL);
+
+#ifdef HAVE_SEMAPHORE_H
 	sem_init (&thread->suspend_sem, 0, 0);
+#else
+        pthread_mutex_init (&thread->suspend_sem, NULL);
+#endif
 	thread->exit_routine = exit_routine;
 	thread->exit_userdata = exit_userdata;
 	thread->exitstatus = 0;
@@ -195,7 +205,12 @@
 {
 	mono_mutex_destroy (&thread->join_mutex);
 	pthread_cond_destroy (&thread->exit_cond);
+
+#ifdef HAVE_SEMAPHORE_H
 	sem_destroy (&thread->suspend_sem);
+#else
+        pthread_mutex_destroy (&thread->suspend_sem);
+#endif
 	
 	g_free(thread);
 }
@@ -228,10 +243,19 @@
 		exit (-1);
 	}
 	
+#ifdef HAVE_SEMAPHORE_H
 	sem_wait (&thread->suspend_sem);
+#else
+        pthread_mutex_lock (&thread->suspend_sem);
+#endif
+
 }
 
 void _wapi_timed_thread_resume (TimedThread *thread)
 {
+#ifdef HAVE_SEMAPHORE_H
 	sem_post (&thread->suspend_sem);
+#else
+	pthread_mutex_unlock (&thread->suspend_sem);
+#endif
 }
diff -ru ../mono.orig/mono/io-layer/timed-thread.h ./mono/io-layer/timed-thread.h
--- ../mono.orig/mono/io-layer/timed-thread.h	Fri Nov 15 13:41:41 2002
+++ ./mono/io-layer/timed-thread.h	Sat Dec 14 18:01:08 2002
@@ -25,7 +25,11 @@
 	mono_mutex_t join_mutex;
 	pthread_cond_t exit_cond;
 	guint32 create_flags;
+#ifdef HAVE_SEMAPHORE_H
 	sem_t suspend_sem;
+#else
+        pthread_mutex_t suspend_sem;
+#endif
 	guint32 (*start_routine)(gpointer arg);
 	void (*exit_routine)(guint32 exitstatus, gpointer userdata);
 	gpointer arg;
