diff -uN guile-1.8.2/configure.in.ORG guile-1.8.2/configure.in
--- guile-1.8.2/configure.in.ORG	Thu May 10 05:22:03 2007
+++ guile-1.8.2/configure.in	Fri Feb  8 17:13:04 2008
@@ -1090,6 +1090,7 @@
             , with_threads=yes)
 
 AC_SUBST(SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT, 0)
+AC_SUBST(SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER, 0)
 
 case "$with_threads" in
   "yes" | "pthread" | "pthreads" | "pthread-threads" | "")
@@ -1113,21 +1114,40 @@
 
     # On past versions of Solaris, believe 8 through 10 at least, you
     # had to write "pthread_once_t foo = { PTHREAD_ONCE_INIT };".
-    # This is contrary to posix:
+    # This is contrary to POSIX:
     # http://www.opengroup.org/onlinepubs/000095399/functions/pthread_once.html
     # Check here if this style is required.
     #
     # glibc (2.3.6 at least) works both with or without braces, so the
     # test checks whether it works without.
     #
+
+    if test "$GCC" = "yes"; then
+      # Since GCC only issues a warning for missing braces, so we need
+      # `-Werror' to catch it.
+      CFLAGS="-Werror -Wmissing-braces $CFLAGS"
+    fi
+
     AC_CACHE_CHECK([whether PTHREAD_ONCE_INIT needs braces],
       guile_cv_need_braces_on_pthread_once_init,
-      [AC_TRY_COMPILE([#include <pthread.h>],
-        [pthread_once_t foo = PTHREAD_ONCE_INIT;],
+      [AC_COMPILE_IFELSE([#include <pthread.h>
+        pthread_once_t foo = PTHREAD_ONCE_INIT;],
         [guile_cv_need_braces_on_pthread_once_init=no],
         [guile_cv_need_braces_on_pthread_once_init=yes])])
     if test "$guile_cv_need_braces_on_pthread_once_init" = yes; then
       SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT=1
+    fi
+
+    # Same problem with `PTHREAD_MUTEX_INITIALIZER', e.g., on IRIX
+    # 6.5.30m with GCC 3.3.
+    AC_CACHE_CHECK([whether PTHREAD_MUTEX_INITIALIZER needs braces],
+      guile_cv_need_braces_on_pthread_mutex_initializer,
+      [AC_COMPILE_IFELSE([#include <pthread.h>
+         pthread_mutex_t foo = PTHREAD_MUTEX_INITIALIZER;],
+        [guile_cv_need_braces_on_pthread_mutex_initializer=no],
+        [guile_cv_need_braces_on_pthread_mutex_initializer=yes])])
+    if test "$guile_cv_need_braces_on_pthread_mutex_initializer" = yes; then
+      SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER=1
     fi
 
     CFLAGS="$old_CFLAGS"
diff -uN guile-1.8.2/libguile/gen-scmconfig.c.ORG guile-1.8.2/libguile/gen-scmconfig.c
--- guile-1.8.2/libguile/gen-scmconfig.c.ORG	Thu May 10 05:22:03 2007
+++ guile-1.8.2/libguile/gen-scmconfig.c	Fri Feb  8 17:13:04 2008
@@ -382,6 +382,11 @@
   pf ("#define SCM_NEED_BRACES_ON_PTHREAD_ONCE_INIT %d /* 0 or 1 */\n",
       SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT);
 
+  pf ("/* Define to 1 if need braces around PTHREAD_MUTEX_INITIALIZER\n"
+      "   (for IRIX with GCC)  */\n");
+  pf ("#define SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER %d /* 0 or 1 */\n",
+      SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER);
+
 #if USE_DLL_IMPORT
   pf ("\n");
   pf ("/* Define some additional CPP macros on Win32 platforms. */\n");
diff -uN guile-1.8.2/libguile/gen-scmconfig.h.in.ORG guile-1.8.2/libguile/gen-scmconfig.h.in
--- guile-1.8.2/libguile/gen-scmconfig.h.in.ORG	Thu May 10 05:22:03 2007
+++ guile-1.8.2/libguile/gen-scmconfig.h.in	Fri Feb  8 17:13:04 2008
@@ -29,6 +29,7 @@
 #define SCM_I_GSC_USE_PTHREAD_THREADS @SCM_I_GSC_USE_PTHREAD_THREADS@
 #define SCM_I_GSC_USE_NULL_THREADS @SCM_I_GSC_USE_NULL_THREADS@
 #define SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT @SCM_I_GSC_NEED_BRACES_ON_PTHREAD_ONCE_INIT@
+#define SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER @SCM_I_GSC_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER@
 
 /*
   Local Variables:
diff -uN guile-1.8.2/libguile/pthread-threads.h.ORG guile-1.8.2/libguile/pthread-threads.h
--- guile-1.8.2/libguile/pthread-threads.h.ORG	Thu May 10 05:22:03 2007
+++ guile-1.8.2/libguile/pthread-threads.h	Fri Feb  8 17:13:04 2008
@@ -43,7 +43,11 @@
 
 /* Mutexes
  */
-#define SCM_I_PTHREAD_MUTEX_INITIALIZER     PTHREAD_MUTEX_INITIALIZER
+#if SCM_NEED_BRACES_ON_PTHREAD_MUTEX_INITIALIZER
+# define SCM_I_PTHREAD_MUTEX_INITIALIZER     { PTHREAD_MUTEX_INITIALIZER }
+#else
+# define SCM_I_PTHREAD_MUTEX_INITIALIZER     PTHREAD_MUTEX_INITIALIZER
+#endif
 #define scm_i_pthread_mutex_t               pthread_mutex_t
 #define scm_i_pthread_mutex_init            pthread_mutex_init
 #define scm_i_pthread_mutex_destroy         pthread_mutex_destroy
diff -uN guile-1.8.2/libguile/filesys.c.ORG guile-1.8.2/libguile/filesys.c
--- guile-1.8.2/libguile/filesys.c.ORG	Thu May 10 05:22:03 2007
+++ guile-1.8.2/libguile/filesys.c	Fri Feb  8 17:13:04 2008
@@ -49,6 +49,10 @@
 
 #include <stdio.h>
 #include <errno.h>
+#ifdef __sun 
+# define _POSIX_PTHREAD_SEMANTICS
+# include <dirent.h>
+#endif
 
 #include "libguile/_scm.h"
 #include "libguile/smob.h"
diff -uN guile-1.8.2/guile-readline/configure.in.ORG guile-1.8.2/guile-readline/configure.in
--- guile-1.8.2/guile-readline/configure.in.ORG	Thu May 10 05:22:03 2007
+++ guile-1.8.2/guile-readline/configure.in	Fri Feb  8 19:34:51 2008
@@ -1,7 +1,10 @@
 AC_PREREQ(2.50)
 
+dnl AC_INIT(guile-readline,
+dnl        m4_esyscmd(. ../GUILE-VERSION && echo -n ${GUILE_VERSION}))
 AC_INIT(guile-readline,
-        m4_esyscmd(. ../GUILE-VERSION && echo -n ${GUILE_VERSION}))
+        patsubst(m4_esyscmd(. ../GUILE-VERSION && echo ${GUILE_VERSION}),[
+]))
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_SRCDIR(readline.c)
 AM_CONFIG_HEADER([guile-readline-config.h])
