diff --git a/addressbook/e-book-backend-exchange-factory.c b/addressbook/e-book-backend-exchange-factory.c
index aa5afa7..d63d1f9 100644
--- a/addressbook/e-book-backend-exchange-factory.c
+++ b/addressbook/e-book-backend-exchange-factory.c
@@ -21,7 +21,6 @@
 #include <config.h>
 #endif
 
-#include <pthread.h>
 #include <string.h>
 
 #include <libebackend/e-data-server-module.h>
diff --git a/calendar/e-cal-backend-exchange-factory.c b/calendar/e-cal-backend-exchange-factory.c
index 6545f41..1c7537b 100644
--- a/calendar/e-cal-backend-exchange-factory.c
+++ b/calendar/e-cal-backend-exchange-factory.c
@@ -21,7 +21,6 @@
 #include <config.h>
 #endif
 
-#include <pthread.h>
 #include <string.h>
 
 #include <libebackend/e-data-server-module.h>
diff --git a/camel/Makefile.am b/camel/Makefile.am
index ce989b4..42a6993 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -43,8 +43,7 @@ libcamelexchange_la_LIBADD = \
 	$(top_builddir)/tools/libevolution-exchange-shared.la \
 	$(EVOLUTION_PLUGIN_LIBS) \
 	$(LDAP_LIBS) \
-	$(SOCKET_LIBS) \
-	$(PTHREAD_LIB)
+	$(SOCKET_LIBS)
 
 EXTRA_DIST = libcamelexchange.urls
 
diff --git a/configure.ac b/configure.ac
index 532779c..b09f9fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,11 +252,6 @@ AC_DEFINE_UNQUOTED([E2K_APPROX_BUILD_TIME],[$abt],[Used to prevent clock-setting
 
 AC_DEFINE([HANDLE_LIBICAL_MEMORY],[1],[Define it once memory returned by libical is free'ed properly])
 
-dnl *************
-dnl pthread check
-dnl *************
-EVO_PTHREAD_CHECK
-
 dnl **************
 dnl libdb checking
 dnl **************
diff --git a/m4/evo_pthread_check.m4 b/m4/evo_pthread_check.m4
deleted file mode 100644
index 5a96fc5..0000000
--- a/m4/evo_pthread_check.m4
+++ /dev/null
@@ -1,16 +0,0 @@
-dnl EVO_PTHREAD_CHECK
-#serial 0.1
-AC_DEFUN([EVO_PTHREAD_CHECK],[
-	PTHREAD_LIB=""
-	AC_CHECK_LIB(pthread, pthread_create, [PTHREAD_LIB="-lpthread"],
-		[AC_CHECK_LIB(pthreads, pthread_create, [PTHREAD_LIB="-lpthreads"],
-			[AC_CHECK_LIB(c_r, pthread_create, [PTHREAD_LIB="-lc_r"],
-			[AC_CHECK_LIB(pthread, __pthread_attr_init_system, [PTHREAD_LIB="-lpthread"],
-				[AC_CHECK_FUNC(pthread_create)]
-			)]
-			)]
-		)]
-	)
-	AC_SUBST(PTHREAD_LIB)
-	AC_PROVIDE([EVO_PTHREAD_CHECK])
-])
diff --git a/server/lib/actest.c b/server/lib/actest.c
index 31d076a..0fdc4c7 100644
--- a/server/lib/actest.c
+++ b/server/lib/actest.c
@@ -23,7 +23,6 @@
 #include <config.h>
 #endif
 
-#include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -45,10 +44,10 @@ cancel (gpointer data)
 static void
 quit (gint sig)
 {
-	static pthread_t cancel_thread;
+	static GThread *cancel_thread = NULL;
 
 	if (!cancel_thread) {
-		pthread_create (&cancel_thread, NULL, cancel, NULL);
+		cancel_thread = g_thread_create (cancel, NULL, FALSE, NULL);
 	} else
 		exit (0);
 }
diff --git a/server/lib/e2k-global-catalog.c b/server/lib/e2k-global-catalog.c
index 7bea46b..fddcc16 100644
--- a/server/lib/e2k-global-catalog.c
+++ b/server/lib/e2k-global-catalog.c
@@ -25,11 +25,12 @@
 #include "e2k-sid.h"
 #include "e2k-utils.h"
 
-#include <pthread.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/time.h>
 
+#include <glib.h>
+
 #ifdef HAVE_LDAP_NTLM_BIND
 #include "xntlm.h"
 #endif
@@ -936,7 +937,8 @@ e2k_global_catalog_async_lookup (E2kGlobalCatalog *gc,
 				 gpointer user_data)
 {
 	struct async_lookup_data *ald;
-	pthread_t pth;
+	GThread *thread;
+	GError *error = NULL;
 
 	ald = g_new0 (struct async_lookup_data, 1);
 	ald->gc = g_object_ref (gc);
@@ -947,8 +949,10 @@ e2k_global_catalog_async_lookup (E2kGlobalCatalog *gc,
 	ald->callback = callback;
 	ald->user_data = user_data;
 
-	if (pthread_create (&pth, NULL, do_lookup_thread, ald) == -1) {
-		g_warning ("Could not create lookup thread\n");
+	if ((thread = g_thread_create (do_lookup_thread, ald, FALSE, &error)) == NULL) {
+		g_warning ("%s: Could not create lookup thread: %s", G_STRFUNC, error ? error->message : "Unknown error");
+		if (error)
+			g_error_free (error);
 		ald->status = E2K_GLOBAL_CATALOG_ERROR;
 		g_idle_add (idle_lookup_result, ald);
 	}
diff --git a/server/lib/ebrowse.c b/server/lib/ebrowse.c
index 26d4f2c..1a469ee 100644
--- a/server/lib/ebrowse.c
+++ b/server/lib/ebrowse.c
@@ -26,7 +26,6 @@
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -36,6 +35,8 @@
 
 #include <libsoup/soup-misc.h>
 
+#include <glib.h>
+
 #include "e2k-context.h"
 #include "e2k-restriction.h"
 #include "e2k-security-descriptor.h"
@@ -612,13 +613,13 @@ cancel (gpointer op)
 static void
 quit (gint sig)
 {
-	static pthread_t cancel_thread;
+	static GThread *cancel_thread = NULL;
 
 	/* Can't cancel from here because we might be
 	 * inside a malloc.
 	 */
 	if (!cancel_thread) {
-		pthread_create (&cancel_thread, NULL, cancel, &op);
+		cancel_thread = g_thread_create (cancel, &op, FALSE, NULL);
 	} else
 		exit (0);
 }
diff --git a/server/lib/gctest.c b/server/lib/gctest.c
index c3c80df..c4f8eaa 100644
--- a/server/lib/gctest.c
+++ b/server/lib/gctest.c
@@ -23,11 +23,11 @@
 #include <config.h>
 #endif
 
-#include <pthread.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <glib.h>
 
 #include "e2k-global-catalog.h"
 #include "e2k-sid.h"
@@ -215,10 +215,10 @@ cancel (gpointer data)
 static void
 quit (gint sig)
 {
-	static pthread_t cancel_thread;
+	static GThread *cancel_thread = NULL;
 
 	if (!cancel_thread) {
-		pthread_create (&cancel_thread, NULL, cancel, NULL);
+		cancel_thread = g_thread_create (cancel, NULL, FALSE, NULL);
 	} else
 		exit (0);
 }
