--- configure.orig	2008-04-01 23:59:43.000000000 +0200
+++ configure	2008-04-02 15:36:59.000000000 +0200
@@ -6281,6 +6281,7 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+#include <sys/param.h>
 #include <sys/ucred.h>
 _ACEOF
 rm -f conftest.$ac_objext
@@ -7637,7 +7638,7 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldbus-1 `$PKGCONFIG --libs dbus-1` $LIBS"
+LIBS="-ldbus-1 `$PKGCONFIG --libs dbus-1` $LIBS -pthread"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -16361,7 +16362,7 @@
 
 
 	if test x$ac_cv_header_pthread_h = xyes; then
-				for flag in -lpthreads -lpthread -pthread; do
+				for flag in -pthread; do
         		{ echo "$as_me:$LINENO: checking for pthread_create using $flag" >&5
 echo $ECHO_N "checking for pthread_create using $flag... $ECHO_C" >&6; }
 			SAVELIBS="$LIBS"
