--- configure.orig	2005-09-11 10:38:06.000000000 -0700
+++ configure	2005-09-11 10:39:54.000000000 -0700
@@ -33817,9 +33817,9 @@
          # skip cygwin -pthread or -pthreads test
          ;;
       *)
-        for flag in pthread pthreads mt; do
+        for flag in '-pthread' '-pthreads' ''; do
           glib_save_CFLAGS="$CFLAGS"
-          CFLAGS="$CFLAGS -$flag"
+          CFLAGS="$CFLAGS $flag"
           if test "$cross_compiling" = yes; then
   cat >conftest.$ac_ext <<_ACEOF
 
@@ -33908,8 +33908,8 @@
 fi
           CFLAGS="$glib_save_CFLAGS"
           if test $glib_flag_works = yes ; then
-             G_THREAD_CFLAGS=-$flag
-	     G_THREAD_LIBS=-$flag
+             G_THREAD_CFLAGS=$flag
+	     G_THREAD_LIBS=$flag
           fi
         done
          ;;
