Index: install.sh
===================================================================
--- install.sh	(revision 19215)
+++ install.sh	(working copy)
@@ -71,6 +71,7 @@
  add_step inst_mingwutils
 fi
 add_step inst_autotools
+add_step inst_gnome
 if [ "$AQBANKING3" = "yes" ]; then
  add_step inst_gmp
 fi
@@ -83,7 +84,6 @@
 fi
 add_step inst_exetype
 add_step inst_libxslt
-add_step inst_gnome
 if [ "$AQBANKING3" = "yes" ]; then
  add_step inst_gnutls
 fi
Index: defaults.sh
===================================================================
--- defaults.sh	(revision 19215)
+++ defaults.sh	(working copy)
@@ -168,7 +168,7 @@
 set_default ACTIVE_PERL_DIR $GLOBAL_DIR\\active-perl
 
 set_default AUTOCONF_URL "http://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.bz2"
-set_default AUTOMAKE_URL "http://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.bz2"
+set_default AUTOMAKE_URL "http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2"
 set_default LIBTOOL_URL "http://ftp.gnu.org/gnu/libtool/libtool-2.2.6a.tar.gz"
 set_default AUTOTOOLS_DIR $GLOBAL_DIR\\autotools
 
@@ -178,9 +178,10 @@
 set_default GMP5_BIN_URL "$SF_MIRROR/mingw/libgmp-5.0.1-1-mingw32-dll-10.tar.lzma"
 set_default GMP5_DEV_URL "$SF_MIRROR/mingw/gmp-5.0.1-1-mingw32-dev.tar.lzma"
 
-set_default GUILE_URL "http://ftp.gnu.org/pub/gnu/guile/guile-1.6.8.tar.gz"
-set_default SLIB_URL "http://swiss.csail.mit.edu/ftpdir/scm/OLD/slib3a3.zip"
+set_default GUILE_URL "http://ftp.gnu.org/pub/gnu/guile/guile-1.8.7.tar.gz"
+set_default SLIB_URL "http://groups.csail.mit.edu/mac/ftpdir/scm/slib-3b2.zip"
 set_default GUILE_DIR $GLOBAL_DIR\\guile
+set_default GUILE_PATCH `pwd`/guile-1.8.7.patch
 
 set_default OPENSSL_URL "http://www.openssl.org/source/openssl-0.9.8j.tar.gz"
 set_default OPENSSL_DIR $GLOBAL_DIR\\openssl
Index: guile-1.8.7.patch
===================================================================
--- guile-1.8.7.patch	(revision 0)
+++ guile-1.8.7.patch	(revision 0)
@@ -0,0 +1,225 @@
+diff -urN old.guile-1.8.7/configure.in new/guile-1.8.7/configure.in
+--- old.guile-1.8.7/configure.in	2009-07-05 14:40:06.000000000 -0400
++++ new.guile-1.8.7/configure.in	2009-08-26 15:33:43.996500000 -0400
+@@ -25,7 +25,7 @@
+ 
+ ]])
+ 
+-AC_PREREQ(2.61)
++AC_PREREQ(2.63)
+ 
+ dnl  `patsubst' here deletes the newline which "echo" prints.  We can't use
+ dnl  "echo -n" since -n is not portable (see autoconf manual "Limitations of
+@@ -41,7 +41,7 @@
+ AC_CONFIG_MACRO_DIR([m4])
+ AC_CONFIG_SRCDIR(GUILE-VERSION)
+ 
+-AM_INIT_AUTOMAKE([gnu no-define check-news -Wall -Wno-override])
++AM_INIT_AUTOMAKE([1.11 silent-rules gnu no-define check-news -Wall -Wno-override])
+ 
+ AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
+ AC_CONFIG_SRCDIR([GUILE-VERSION])
+@@ -68,8 +68,6 @@
+ 
+ AB_INIT
+ 
+-AC_LIBTOOL_WIN32_DLL
+-
+ AC_PROG_INSTALL
+ AC_PROG_CC
+ AC_PROG_CPP
+@@ -82,8 +80,7 @@
+ # for per-target cflags in the libguile subdir
+ AM_PROG_CC_C_O
+ 
+-AC_LIBTOOL_DLOPEN
+-AC_PROG_LIBTOOL
++LT_INIT([win32-dll dlopen])
+ AC_CHECK_LIB([ltdl], [lt_dlinit], ,
+   [AC_MSG_ERROR([libltdl not found.  See README.])])
+ AC_CHECK_HEADER([ltdl.h], [],
+diff -urN old.guile-1.8.7/guile-readline/configure.in new/guile-1.8.7/guile-readline/configure.in
+--- old.guile-1.8.7/guile-readline/configure.in	2009-07-03 18:19:22.000000000 -0400
++++ new.guile-1.8.7/guile-readline/configure.in	2009-08-26 15:35:08.398500000 -0400
+@@ -1,4 +1,4 @@
+-AC_PREREQ(2.50)
++AC_PREREQ(2.63)
+ 
+ dnl Don't use "echo -n", which is not portable (e.g., not available on
+ dnl MacOS X).  Instead, use `patsubst' to remove the newline.
+@@ -10,15 +10,14 @@
+ AC_CONFIG_AUX_DIR([.])
+ AC_CONFIG_SRCDIR(readline.c)
+ AM_CONFIG_HEADER([guile-readline-config.h])
+-AM_INIT_AUTOMAKE([foreign no-define])
++AM_INIT_AUTOMAKE([1.11 silent-rules foreign no-define])
+ 
+ . $srcdir/../GUILE-VERSION
+ 
+ AC_PROG_INSTALL
+ AC_PROG_CC
+ AM_PROG_CC_STDC
+-AC_LIBTOOL_WIN32_DLL
+-AC_PROG_LIBTOOL
++LT_INIT([win32-dll])
+ 
+ dnl
+ dnl Check for Winsock and other functionality on Win32 (*not* CygWin)
+--- old.guile-1.8.7/pre-inst-guile.in	2010-05-30 09:38:50 +0000
++++ new.guile-1.8.7/pre-inst-guile.in	2010-05-30 09:39:30 +0000
+@@ -87,7 +87,7 @@
+ export DYLD_LIBRARY_PATH
+ 
+ # set GUILE (clobber)
+-GUILE=${top_builddir}/libguile/guile
++GUILE=${top_builddir}/libguile/.libs/guile
+ export GUILE
+ 
+ # do it
+Index: sid/srfi/srfi-60.c
+===================================================================
+--- sid.orig/srfi/srfi-60.c
++++ sid/srfi/srfi-60.c
+@@ -63,7 +63,7 @@
+ 
+ 
+ SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
+-            (SCM index, SCM n, SCM bit),
++            (SCM index, SCM n, SCM newbit),
+ 	    "Return @var{n} with the bit at @var{index} set according to\n"
+ 	    "@var{newbit}.  @var{newbit} should be @code{#t} to set the bit\n"
+ 	    "to 1, or @code{#f} to set it to 0.  Bits other than at\n"
+@@ -79,7 +79,7 @@
+   int bb;
+ 
+   ii = scm_to_ulong (index);
+-  bb = scm_to_bool (bit);
++  bb = scm_to_bool (newbit);
+ 
+   if (SCM_I_INUMP (n))
+     {
+Index: sid/libguile/fports.c
+===================================================================
+--- sid.orig/libguile/fports.c
++++ sid/libguile/fports.c
+@@ -18,6 +18,7 @@
+ 
+ 
+ #define _LARGEFILE64_SOURCE      /* ask for stat64 etc */
++#define _GNU_SOURCE              /* ask for LONG_LONG_MAX/LONG_LONG_MIN */
+ 
+ #ifdef HAVE_CONFIG_H
+ #  include <config.h>
+Index: sid/libguile/__scm.h
+===================================================================
+--- sid.orig/libguile/__scm.h
++++ sid/libguile/__scm.h
+@@ -386,21 +386,23 @@
+ 
+ #ifdef vms
+ # ifndef CHEAP_CONTINUATIONS
+-   typedef int jmp_buf[17];
+-   extern int setjump(jmp_buf env);
+-   extern int longjump(jmp_buf env, int ret);
+-#  define setjmp setjump
+-#  define longjmp longjump
++   typedef int scm_jmp_buf[17];
++   extern int setjump(scm_jmp_buf env);
++   extern int longjump(scm_jmp_buf env, int ret);
++#  define scm_setjmp setjump
++#  define scm_longjmp longjump
++#  define SCM_DEFINES_JMP_BUF
+ # else
+ #  include <setjmp.h>
+ # endif
+ #else				/* ndef vms */
+ # ifdef _CRAY1
+-    typedef int jmp_buf[112];
+-    extern int setjump(jmp_buf env);
+-    extern int longjump(jmp_buf env, int ret);
+-#  define setjmp setjump
+-#  define longjmp longjump
++    typedef int scm_jmp_buf[112];
++    extern int setjump(scm_jmp_buf env);
++    extern int longjump(scm_jmp_buf env, int ret);
++#  define scm_setjmp setjump
++#  define scm_longjmp longjump
++#  define SCM_DEFINES_JMP_BUF
+ # else				/* ndef _CRAY1 */
+ #  if defined (__ia64__)
+ /* For IA64, emulate the setjmp API using getcontext. */
+@@ -409,15 +411,19 @@
+     typedef struct {
+       ucontext_t ctx;
+       int fresh;
+-    } jmp_buf;
+-#   define setjmp(JB)				        \
++    } scm_jmp_buf;
++#   define scm_setjmp(JB)			        \
+       ( (JB).fresh = 1,				        \
+         getcontext (&((JB).ctx)),			\
+         ((JB).fresh ? ((JB).fresh = 0, 0) : 1) )
+-#   define longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
+-    void scm_ia64_longjmp (jmp_buf *, int);
++#   define scm_longjmp(JB,VAL) scm_ia64_longjmp (&(JB), VAL)
++    void scm_ia64_longjmp (scm_jmp_buf *, int);
++#   define SCM_DEFINES_JMP_BUF
+ #  else                 	/* ndef __ia64__ */
+ #   include <setjmp.h>
++    typedef jmp_buf scm_jmp_buf;
++#   define scm_setjmp setjmp
++#   define scm_longjmp longjmp
+ #  endif			/* ndef __ia64__ */
+ # endif				/* ndef _CRAY1 */
+ #endif				/* ndef vms */
+Index: sid/libguile/_scm.h
+===================================================================
+--- sid.orig/libguile/_scm.h
++++ sid/libguile/_scm.h
+@@ -60,6 +60,12 @@
+ #include <errno.h>
+ #include "libguile/__scm.h"
+ 
++#ifdef SCM_DEFINES_JMP_BUF
++typedef scm_jmp_buf jmp_buf;
++#define setjmp(JB) scm_setjmp(JB)
++#define longjmp(JB,VAL) scm_longjmp(JB,VAL)
++#endif
++
+ /* Include headers for those files central to the implementation.  The
+    rest should be explicitly #included in the C files themselves.  */
+ #include "libguile/error.h"	/* Everyone signals errors.  */
+Index: sid/libguile/continuations.h
+===================================================================
+--- sid.orig/libguile/continuations.h
++++ sid/libguile/continuations.h
+@@ -43,7 +43,7 @@
+ typedef struct 
+ {
+   SCM throw_value;
+-  jmp_buf jmpbuf;
++  scm_jmp_buf jmpbuf;
+   SCM dynenv;
+ #ifdef __ia64__
+   void *backing_store;
+Index: sid/libguile/threads.h
+===================================================================
+--- sid.orig/libguile/threads.h
++++ sid/libguile/threads.h
+@@ -26,7 +26,6 @@
+ #include "libguile/procs.h"
+ #include "libguile/throw.h"
+ #include "libguile/root.h"
+-#include "libguile/iselect.h"
+ #include "libguile/dynwind.h"
+ #include "libguile/continuations.h"
+
+@@ -107,7 +106,7 @@
+   /* For keeping track of the stack and registers. */
+   SCM_STACKITEM *base;
+   SCM_STACKITEM *top;
+-  jmp_buf regs;
++  scm_jmp_buf regs;
+ #ifdef __ia64__
+   void *register_backing_store_base;
+   scm_t_contregs *pending_rbs_continuation;
Index: install-impl.sh
===================================================================
--- install-impl.sh	(revision 19215)
+++ install-impl.sh	(working copy)
@@ -281,8 +281,8 @@
     add_to_env -I$_GUILE_UDIR/include GUILE_CPPFLAGS
     add_to_env -L$_GUILE_UDIR/lib GUILE_LDFLAGS
     add_to_env $_GUILE_UDIR/bin PATH
-    if quiet guile -c '(use-modules (srfi srfi-39))' &&
-        quiet guile -c "(use-modules (ice-9 slib)) (require 'printf)"
+    if quiet $_GUILE_UDIR/bin/guile -c '(use-modules (srfi srfi-39))' # &&
+#        quiet $_GUILE_UDIR/bin/guile -c "(use-modules (ice-9 slib)) (require 'printf)"
     then
         echo "guile and slib already installed.  skipping."
     else
@@ -293,40 +293,18 @@
         tar -xzpf $_GUILE_BALL -C $TMP_UDIR
         assert_one_dir $TMP_UDIR/guile-*
         qpushd $TMP_UDIR/guile-*
-            qpushd ice-9
-                cp boot-9.scm boot-9.scm.bak
-                cat boot-9.scm.bak | sed '/SIGBUS/d' > boot-9.scm
-            qpopd
-            qpushd libguile
-                cp fports.c fports.c.bak
-                cat fports.c.bak | sed 's,#elif defined (FIONREAD),#elif 0,' > fports.c
-                cp load.c load.c.bak
-                cat load.c.bak | sed '/scan !=/s,:,;,' > load.c
-            qpopd
-            qpushd libguile-ltdl
-                cp raw-ltdl.c raw-ltdl.c.bak
-                cat raw-ltdl.c.bak | sed 's,\(SCMLTSTATIC\) LT_GLOBAL_DATA,\1,' > raw-ltdl.c
-                touch upstream/ltdl.c.diff
-            qpopd
+            patch -p1 < $GUILE_PATCH
+            ACLOCAL="aclocal $ACLOCAL_FLAGS" autoreconf -fvi $ACLOCAL_FLAGS
+            export ac_cv_func_regcomp_norx=no
+            export ac_cv_func_regcomp_rx=no
             ./configure ${HOST_XCOMPILE} \
                 --disable-static \
                 --disable-elisp \
-                --disable-networking \
                 --disable-dependency-tracking \
-                --disable-libtool-lock \
-                --disable-linuxthreads \
                 -C --prefix=$_GUILE_WFSDIR \
-                ac_cv_func_regcomp_rx=yes \
-                CPPFLAGS="${READLINE_CPPFLAGS} ${REGEX_CPPFLAGS}" \
-                LDFLAGS="-lwsock32 ${READLINE_LDFLAGS} ${REGEX_LDFLAGS}"
-            cp config.status config.status.bak
-            cat config.status.bak | sed 's# fileblocks[$.A-Za-z]*,#,#' > config.status
-            ./config.status
-            qpushd guile-config
-              cp Makefile Makefile.bak
-              cat Makefile.bak | sed '/-bindir-/s,:,^,g' > Makefile
-            qpopd
-            make LDFLAGS="-lwsock32 ${READLINE_LDFLAGS} ${REGEX_LDFLAGS} -no-undefined -avoid-version"
+                CPPFLAGS="${READLINE_CPPFLAGS} ${REGEX_CPPFLAGS} ${AUTOTOOLS_CPPFLAGS} ${GMP_CPPFLAGS}" \
+                LDFLAGS="${READLINE_LDFLAGS} ${REGEX_LDFLAGS} ${AUTOTOOLS_LDFLAGS} ${GMP_LDFLAGS} -Wl,--enable-auto-import"
+            make LDFLAGS="${READLINE_LDFLAGS} ${REGEX_LDFLAGS} ${AUTOTOOLS_LDFLAGS} ${GMP_LDFLAGS} -Wl,--enable-auto-import -no-undefined -avoid-version"
             make install
         qpopd
         _SLIB_DIR=$_GUILE_UDIR/share/guile/1.*
@@ -336,8 +314,9 @@
             sed '/lambda.*'"'"'unix/a\
 (define software-type (lambda () '"'"'ms-dos))' guile.init.bak > guile.init
         qpopd
-        guile -c '(use-modules (srfi srfi-39))' &&
-        guile -c "(use-modules (ice-9 slib)) (require 'printf)" || die "guile not installed correctly"
+#        $_GUILE_UDIR/bin/guile -c '(use-modules (srfi srfi-39))' &&
+#        $_GUILE_UDIR/bin/guile -c "(use-modules (ice-9 slib)) (require 'printf)" || die "guile not installed correctly"
+        $_GUILE_UDIR/bin/guile -c '(use-modules (srfi srfi-39))' || die "guile not installed correctly"
 
         # If this libguile is used from MSVC compiler, we must
         # deactivate some macros of scmconfig.h again.
@@ -370,7 +349,7 @@
 extern LIBGUILEDECL struct scm_t_freelist scm_master_freelist2;
 extern LIBGUILEDECL int scm_block_gc;
 EOF
-        rm -rf ${TMP_UDIR}/guile-*
+#        rm -rf ${TMP_UDIR}/guile-*
     fi
     if [ "$CROSS_COMPILE" = "yes" ]; then
         mkdir -p $_GUILE_UDIR/bin
@@ -1319,20 +1298,20 @@
     qpopd
 
     qpushd $_BUILD_UDIR
-        $_REL_REPOS_UDIR/configure ${HOST_XCOMPILE} \
-            --prefix=$_INSTALL_WFSDIR \
-            --enable-debug \
-            --enable-schemas-install=no \
-            --enable-dbi \
-            --with-dbi-dbd-dir=$( echo ${_LIBDBI_DRIVERS_UDIR} | sed 's,^/\([A-Za-z]\)/,\1:/,g' )/lib/dbd \
-            ${LIBOFX_OPTIONS} \
-            ${AQBANKING_OPTIONS} \
-            --enable-binreloc \
-            --enable-locale-specific-tax \
-            --with-html-engine=webkit \
-            CPPFLAGS="${AUTOTOOLS_CPPFLAGS} ${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} ${LIBDBI_CPPFLAGS} ${KTOBLZCHECK_CPPFLAGS} ${HH_CPPFLAGS} -D_WIN32" \
-            LDFLAGS="${AUTOTOOLS_LDFLAGS} ${REGEX_LDFLAGS} ${GNOME_LDFLAGS} ${GUILE_LDFLAGS} ${LIBDBI_LDFLAGS} ${KTOBLZCHECK_LDFLAGS} ${HH_LDFLAGS}" \
-            PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
+         $_REL_REPOS_UDIR/configure ${HOST_XCOMPILE} \
+             --prefix=$_INSTALL_WFSDIR \
+             --enable-debug \
+             --enable-schemas-install=no \
+             --enable-dbi \
+             --with-dbi-dbd-dir=$( echo ${_LIBDBI_DRIVERS_UDIR} | sed 's,^/\([A-Za-z]\)/,\1:/,g' )/lib/dbd \
+             ${LIBOFX_OPTIONS} \
+             ${AQBANKING_OPTIONS} \
+             --enable-binreloc \
+             --enable-locale-specific-tax \
+             --with-html-engine=webkit \
+             CPPFLAGS="${AUTOTOOLS_CPPFLAGS} ${REGEX_CPPFLAGS} ${GNOME_CPPFLAGS} ${GUILE_CPPFLAGS} ${GMP_CPPFLAGS} ${LIBDBI_CPPFLAGS} ${KTOBLZCHECK_CPPFLAGS} ${HH_CPPFLAGS} -D_WIN32" \
+             LDFLAGS="${AUTOTOOLS_LDFLAGS} ${REGEX_LDFLAGS} ${GNOME_LDFLAGS} ${GMP_LDFLAGS} ${GUILE_LDFLAGS} ${LIBDBI_LDFLAGS} ${KTOBLZCHECK_LDFLAGS} ${HH_LDFLAGS}" \
+             PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"
 
         make
 
