Index: configure.in
===================================================================
--- configure.in	(revision 1931)
+++ configure.in	(working copy)
@@ -197,22 +197,31 @@
 ################################################################################
 
 
-# On some OSs, AC_PATH_XTRA doesn't work right(?), so let the user specify
-# X_PRE_LIBS and X_EXTRA_LIBS to add even more libraries, and add -lX11 to
-# the list of libraries for grins.
-AC_PATH_XTRA([X11], [X11/Xlib.h], [XFlush(NULL)])
-if test "$have_x" = yes ; then
-	if test -d "$x_includes" ; then
-		X_CFLAGS="-I$x_includes $X_CFLAGS"
-	elif test -d "$ac_x_includes" ; then
-		X_CFLAGS="-I$ac_x_includes $X_CFLAGS"
+AC_ARG_ENABLE(x11,
+	      [AS_HELP_STRING([--disable-x11],
+			      [disable X11 support]
+			      )],
+	      enable_x11=$enableval, enable_x11=yes)
+if test "x$enable_x11" = "xyes"; then
+	# On some OSs, AC_PATH_XTRA doesn't work right(?), so let the user specify
+	# X_PRE_LIBS and X_EXTRA_LIBS to add even more libraries, and add -lX11 to
+	# the list of libraries for grins.
+	AC_PATH_XTRA([X11], [X11/Xlib.h], [XFlush(NULL)])
+	if test "$have_x" = yes ; then
+		if test -d "$x_includes" ; then
+			X_CFLAGS="-I$x_includes $X_CFLAGS"
+		elif test -d "$ac_x_includes" ; then
+			X_CFLAGS="-I$ac_x_includes $X_CFLAGS"
+		fi
+		X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+		if test -d "$ac_x_libraries" ; then
+			X_LIBS="-L$x_libraries $X_LIBS"
+		elif test -d "$ac_x_libraries" ; then
+			X_LIBS="-L$ac_x_libraries $X_LIBS"
+		fi
 	fi
-	X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
-	if test -d "$ac_x_libraries" ; then
-		X_LIBS="-L$x_libraries $X_LIBS"
-	elif test -d "$ac_x_libraries" ; then
-		X_LIBS="-L$ac_x_libraries $X_LIBS"
-	fi
+else
+	AC_DEFINE(X_DISPLAY_MISSING,1,[Have X11.])
 fi
 AC_SUBST([X_CFLAGS X_LIBS])
 
@@ -294,17 +303,21 @@
 fi
 AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
 AC_CHECK_FUNCS([ceil floor])
+# Use gnurx from Tor (tml) for regex support on win32 if regcomp can't be found
+AC_CHECK_FUNC(regcomp,,AC_CHECK_LIB(gnurx,regcomp,LIBS=["$LIBS -lgnurx"]))
 
-# Look for ncurses or curses or termcap.
-AC_CHECK_HEADER(ncurses.h,[AC_CHECK_HEADER(term.h,[AC_CHECK_LIB(ncurses,tgetent,[LIBS="-lncurses $LIBS";AC_DEFINE(HAVE_NCURSES,1,[Define if you have ncurses.h and libncurses])])])])
-if test x$ac_cv_lib_ncurses_tgetent != xyes ; then
-	AC_CHECK_HEADER(ncurses/curses.h,[AC_CHECK_HEADER(ncurses/term.h,[AC_CHECK_LIB(ncurses,tgetent,[LIBS="-lncurses $LIBS";AC_DEFINE(HAVE_NCURSES_CURSES,1,[Define if you have ncurses/curses.h and libncurses])])])])
+if test "x$platform_win32" = "xno"; then
+	 Look for ncurses or curses or termcap.
+	AC_CHECK_HEADER(ncurses.h,[AC_CHECK_HEADER(term.h,[AC_CHECK_LIB(ncurses,tgetent,[LIBS="-lncurses $LIBS";AC_DEFINE(HAVE_NCURSES,1,[Define if you have ncurses.h and libncurses])])])])
 	if test x$ac_cv_lib_ncurses_tgetent != xyes ; then
-		AC_CHECK_HEADER(curses.h,[AC_CHECK_HEADER(term.h,[AC_CHECK_LIB(curses,tgetent,[LIBS="-lcurses $LIBS";AC_DEFINE(HAVE_CURSES,1,[Define if you have curses.h and libcurses])])])])
-		if test x$ac_cv_lib_curses_tgetent != xyes ; then
-			AC_CHECK_HEADER(termcap.h,[AC_CHECK_LIB(termcap,tgetent,[LIBS="-ltermcap $LIBS";AC_DEFINE(HAVE_TERMCAP,1,[Define if you have termcap.h and libtermcap])])])
-			if test x$ac_cv_header_termcap_h != xyes ; then
-				AC_MSG_ERROR([You must have at least one of ncurses, curses, or libtermcap installed to build vte.])
+		AC_CHECK_HEADER(ncurses/curses.h,[AC_CHECK_HEADER(ncurses/term.h,[AC_CHECK_LIB(ncurses,tgetent,[LIBS="-lncurses $LIBS";AC_DEFINE(HAVE_NCURSES_CURSES,1,[Define if you have ncurses/curses.h and libncurses])])])])
+		if test x$ac_cv_lib_ncurses_tgetent != xyes ; then
+			AC_CHECK_HEADER(curses.h,[AC_CHECK_HEADER(term.h,[AC_CHECK_LIB(curses,tgetent,[LIBS="-lcurses $LIBS";AC_DEFINE(HAVE_CURSES,1,[Define if you have curses.h and libcurses])])])])
+			if test x$ac_cv_lib_curses_tgetent != xyes ; then
+				AC_CHECK_HEADER(termcap.h,[AC_CHECK_LIB(termcap,tgetent,[LIBS="-ltermcap $LIBS";AC_DEFINE(HAVE_TERMCAP,1,[Define if you have termcap.h and libtermcap])])])
+				if test x$ac_cv_header_termcap_h != xyes ; then
+					AC_MSG_ERROR([You must have at least one of ncurses, curses, or libtermcap installed to build vte.])
+				fi
 			fi
 		fi
 	fi
Index: src/vteglyph.c
===================================================================
--- src/vteglyph.c	(revision 1931)
+++ src/vteglyph.c	(working copy)
@@ -36,6 +36,10 @@
 #define bindtextdomain(package,dir)
 #endif
 
+#ifndef howmany
+#define howmany(x, y) (((x) + ((y) - 1)) / (y))
+#endif
+
 #define FONT_INDEX_FUDGE 10
 #define CHAR_WIDTH_FUDGE 10
 #define INVALID_GLYPH    GINT_TO_POINTER(-1)
Index: src/trie.c
===================================================================
--- src/trie.c	(revision 1931)
+++ src/trie.c	(working copy)
@@ -41,6 +41,10 @@
 typedef gunichar wint_t;
 #endif
 
+#ifndef LINE_MAX
+#define LINE_MAX 1024
+#endif
+
 #ifdef ENABLE_NLS
 #include <libintl.h>
 #define _(String) dgettext(PACKAGE, String)
Index: src/vte-private.h
===================================================================
--- src/vte-private.h	(revision 1931)
+++ src/vte-private.h	(working copy)
@@ -19,7 +19,10 @@
 #ifndef vte_vte_private_h_included
 #define vte_vte_private_h_included
 
+#include <glib.h>
+#ifndef G_OS_WIN32
 #include <sys/ioctl.h>
+#endif
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -30,7 +33,9 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <math.h>
+#ifndef G_OS_WIN32
 #include <pwd.h>
+#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -50,6 +55,10 @@
 #include "ring.h"
 #include "caps.h"
 
+#ifndef LINE_MAX
+#define LINE_MAX 1024
+#endif
+
 G_BEGIN_DECLS
 
 #define VTE_PAD_WIDTH			1
@@ -410,6 +419,15 @@
 
 void _vte_terminal_inline_error_message(VteTerminal *terminal, const char *format, ...) G_GNUC_PRINTF(2,3);
 
+#ifdef G_OS_WIN32
+
+const gchar *_vte_get_datadir ();
+
+#undef VTE_DATADIR
+#define VTE_DATADIR _vte_get_datadir ()
+
+#endif /* G_OS_WIN32 */
+
 G_END_DECLS
 
 #endif
Index: src/vtedraw.c
===================================================================
--- src/vtedraw.c	(revision 1931)
+++ src/vtedraw.c	(working copy)
@@ -41,13 +41,13 @@
 	&_vte_draw_xft,
 #endif /* HAVE_XFT2 */
 #endif /* !X_DISPLAY_MISSING */
-	&_vte_draw_ft2,
 #ifndef X_DISPLAY_MISSING
 #ifdef HAVE_GL
 	&_vte_draw_gl,
 #endif /* HAVE_GL */
 #endif /* !X_DISPLAY_MISSING */
 	&_vte_draw_pango,
+	&_vte_draw_ft2,
 #ifndef X_DISPLAY_MISSING
 #ifdef HAVE_PANGOX
 	&_vte_draw_pango_x,
Index: src/utf8echo.c
===================================================================
--- src/utf8echo.c	(revision 1931)
+++ src/utf8echo.c	(working copy)
@@ -30,6 +30,10 @@
 #include "vteconv.h"
 #define ESC "\033"
 
+#ifndef LINE_MAX
+#define LINE_MAX 1024
+#endif
+
 int
 main(int argc, char **argv)
 {
Index: src/reaper.c
===================================================================
--- src/reaper.c	(revision 1931)
+++ src/reaper.c	(working copy)
@@ -18,12 +18,14 @@
 
 #include "../config.h"
 #include <sys/types.h>
+#include <glib.h>
+#ifndef G_OS_WIN32
 #include <sys/wait.h>
+#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include "debug.h"
@@ -48,6 +50,7 @@
 static void
 vte_reaper_signal_handler(int signum)
 {
+#ifndef G_OS_WIN32
 	struct reaper_info info;
 	int status;
 
@@ -68,12 +71,14 @@
 			}
 		}
 	}
+#endif
 }
 
 static gboolean
 vte_reaper_emit_signal(GIOChannel *channel, GIOCondition condition,
 		       gpointer data)
 {
+#ifndef G_OS_WIN32
 	struct reaper_info info;
 	if (condition != G_IO_IN) {
 		return FALSE;
@@ -87,6 +92,9 @@
 				      info.pid, info.status);
 	}
 	return TRUE;
+#else
+	return FALSE;
+#endif
 }
 
 #if GLIB_CHECK_VERSION(2,4,0)
@@ -127,6 +135,7 @@
 static void
 vte_reaper_init(VteReaper *reaper)
 {
+#ifndef G_OS_WIN32
 	struct sigaction action;
 	int ret;
 
@@ -161,6 +170,7 @@
 	sigaction(SIGCHLD, &action, NULL);
 	_vte_debug_print(VTE_DEBUG_SIGNALS,
 			"Hooked SIGCHLD signal in reaper.\n");
+#endif
 }
 
 static GObject*
@@ -182,6 +192,7 @@
 static void
 vte_reaper_finalize(GObject *reaper)
 {
+#ifndef G_OS_WIN32
 	struct sigaction action, old_action;
 
 	/* Reset the signal handler if we still have it hooked. */
@@ -207,6 +218,7 @@
 
 	G_OBJECT_CLASS(vte_reaper_parent_class)->finalize(reaper);
 	singleton_reaper = NULL;
+#endif
 }
 
 static void
Index: src/reaper.h
===================================================================
--- src/reaper.h	(revision 1931)
+++ src/reaper.h	(working copy)
@@ -19,10 +19,12 @@
 #ifndef vte_reaper_h_included
 #define vte_reaper_h_included
 
+#include <glib.h>
 
+#ifndef G_OS_WIN32
 #include <sys/wait.h>
+#endif
 #include <signal.h>
-#include <glib.h>
 #include <glib-object.h>
 
 G_BEGIN_DECLS
Index: src/vtepango.c
===================================================================
--- src/vtepango.c	(revision 1931)
+++ src/vtepango.c	(working copy)
@@ -30,6 +30,10 @@
 #include "vtedraw.h"
 #include "vtepango.h"
 
+#ifndef howmany
+#define howmany(x, y) (((x) + ((y) - 1)) / (y))
+#endif
+
 struct _vte_pango_data
 {
 	GdkColor color;
Index: src/vte.c
===================================================================
--- src/vte.c	(revision 1931)
+++ src/vte.c	(working copy)
@@ -51,6 +51,16 @@
 #include "vteseq.h"
 #include <fontconfig/fontconfig.h>
 
+#ifdef __MINGW32__
+#define _OLE2_H /* hack to avoid conflicts with mingw32 headers */
+#endif
+
+#ifdef G_OS_WIN32
+#define STRICT
+#include <windows.h>
+#undef STRICT
+#endif
+
 #ifdef HAVE_LOCALE_H
 #include <locale.h>
 #endif
@@ -2899,10 +2909,12 @@
 			g_object_unref(reaper);
 
 		/* Set the pty to be non-blocking. */
+#ifndef G_OS_WIN32
 		i = fcntl(terminal->pvt->pty_master, F_GETFL);
 		if ((i & O_NONBLOCK) == 0) {
 			fcntl(terminal->pvt->pty_master, F_SETFL, i | O_NONBLOCK);
 		}
+#endif
 
 		/* Set the PTY size. */
 		vte_terminal_set_size(terminal,
@@ -2955,6 +2967,7 @@
 	/* Make the user's shell the default command. */
 	if (command == NULL) {
 		if (terminal->pvt->shell == NULL) {
+#ifndef G_OS_WIN32
 			struct passwd *pwd;
 
 			pwd = getpwuid(getuid());
@@ -2964,6 +2977,7 @@
 						"Using user's shell (%s).\n",
 						terminal->pvt->shell);
 			}
+#endif
 		}
 		if (terminal->pvt->shell == NULL) {
 			if (getenv ("SHELL")) {
@@ -4113,7 +4127,9 @@
 	gssize normal_length = 0;
 	int i;
 	const char *special = NULL;
+#ifdef HAVE_TERMIOS_H
 	struct termios tio;
+#endif
 	gboolean scrolled = FALSE, steal = FALSE, modifier = FALSE, handled,
 		 suppress_meta_esc = FALSE;
 	guint keyval = 0;
@@ -4259,12 +4275,14 @@
 			case VTE_ERASE_AUTO:
 			default:
 				if (terminal->pvt->pty_master != -1) {
+#ifdef HAVE_TERMIOS_H
 					if (tcgetattr(terminal->pvt->pty_master,
 						      &tio) != -1) {
 						normal = g_strdup_printf("%c",
 									 tio.c_cc[VERASE]);
 						normal_length = 1;
 					}
+#endif
 				}
 				suppress_meta_esc = FALSE;
 				break;
@@ -6670,6 +6688,24 @@
 	}
 }
 
+#ifdef G_OS_WIN32
+static void
+vte_terminal_map (GtkWidget *widget)
+{
+	VteTerminal *terminal;
+
+	GTK_WIDGET_CLASS (vte_terminal_parent_class)->map (widget);
+
+	terminal = VTE_TERMINAL(widget);
+	/*
+	 * HACK: win32 doesn't give us visibility notify events, so we have to
+	 * do the lame thing and just force the terminal to unobscured all the
+	 * time.
+	 */
+	vte_terminal_set_visibility(terminal, GDK_VISIBILITY_UNOBSCURED);
+}
+#endif /* G_OS_WIN32 */
+
 static gboolean
 vte_terminal_visibility_notify(GtkWidget *widget, GdkEventVisibility *event)
 {
@@ -7145,6 +7181,23 @@
 	g_free (str);
 }
 
+#ifdef G_OS_WIN32
+
+G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
+
+const gchar *
+_vte_get_datadir ()
+{
+	static gchar *gtk_datadir = NULL;
+	if (gtk_datadir == NULL)
+		gtk_datadir = g_win32_get_package_installation_subdirectory
+			(NULL, dll_name, "share");
+	
+	return gtk_datadir;
+}
+
+#endif
+
 /* Set the path to the termcap file we read, and read it in. */
 static void
 vte_terminal_set_termcap(VteTerminal *terminal, const char *path,
@@ -7154,10 +7207,12 @@
 	char *wpath;
 
 	if (path == NULL) {
-		wpath = g_strdup_printf(DATADIR "/" PACKAGE "/termcap/%s",
+		wpath = g_build_filename (VTE_DATADIR, PACKAGE, "termcap",
 					terminal->pvt->emulation ?
 					terminal->pvt->emulation :
-					vte_terminal_get_default_emulation(terminal));
+					vte_terminal_get_default_emulation(terminal),
+					NULL);
+
 		if (g_stat(wpath, &st) != 0) {
 			g_free(wpath);
 			wpath = g_strdup("/etc/termcap");
@@ -7797,7 +7852,8 @@
 	_vte_buffer_free(terminal->pvt->conv_buffer);
 
 	/* Stop the child and stop watching for input from the child. */
-	if (terminal->pvt->pty_pid != -1) {
+	if ((int)terminal->pvt->pty_pid != -1) {
+#ifndef G_OS_WIN32
 #ifdef HAVE_GETPGID
 		pid_t pgrp;
 		pgrp = getpgid(terminal->pvt->pty_pid);
@@ -7806,6 +7862,7 @@
 		}
 #endif
 		kill(terminal->pvt->pty_pid, SIGHUP);
+#endif
 	}
 	_vte_terminal_disconnect_pty_read(terminal);
 	_vte_terminal_disconnect_pty_write(terminal);
@@ -10399,6 +10456,9 @@
 	widget_class->focus_in_event = vte_terminal_focus_in;
 	widget_class->focus_out_event = vte_terminal_focus_out;
 	widget_class->visibility_notify_event = vte_terminal_visibility_notify;
+#ifdef G_OS_WIN32
+	widget_class->map = vte_terminal_map;
+#endif
 	widget_class->unrealize = vte_terminal_unrealize;
 	widget_class->style_set = NULL;
 	widget_class->size_request = vte_terminal_size_request;
@@ -11890,7 +11950,9 @@
 void
 vte_terminal_set_pty(VteTerminal *terminal, int pty_master)
 {
+#ifndef G_OS_WIN32
        guint i;
+#endif
 
        g_return_if_fail(VTE_IS_TERMINAL(terminal));
 
@@ -11905,11 +11967,13 @@
        terminal->pvt->pty_master = pty_master;
 
 
+#ifndef G_OS_WIN32
        /* Set the pty to be non-blocking. */
        i = fcntl(terminal->pvt->pty_master, F_GETFL);
        if ((i & O_NONBLOCK) == 0) {
 	       fcntl(terminal->pvt->pty_master, F_SETFL, i | O_NONBLOCK);
        }
+#endif
 
        vte_terminal_set_size(terminal,
                              terminal->column_count,
Index: src/interpret.c
===================================================================
--- src/interpret.c	(revision 1931)
+++ src/interpret.c	(working copy)
@@ -71,8 +71,8 @@
 
 	g_type_init();
 	terminal = argv[1];
-	termcap = _vte_termcap_new(g_strdup_printf(DATADIR "/" PACKAGE
-						   "/termcap/%s", terminal));
+	termcap = _vte_termcap_new(g_build_filename (VTE_DATADIR, PACKAGE
+						   "termcap", terminal, NULL));
 	if (termcap == NULL) {
 		termcap = _vte_termcap_new("/etc/termcap");
 	}
Index: src/pty.c
===================================================================
--- src/pty.c	(revision 1931)
+++ src/pty.c	(working copy)
@@ -18,7 +18,10 @@
 
 #include "../config.h"
 #include <sys/types.h>
+#include <glib.h>
+#ifndef G_OS_WIN32
 #include <sys/ioctl.h>
+#endif
 #ifdef HAVE_SYS_TERMIOS_H
 #include <sys/termios.h>
 #endif
@@ -39,7 +42,6 @@
 #ifdef HAVE_STROPTS_H
 #include <stropts.h>
 #endif
-#include <glib.h>
 #include "debug.h"
 #include "pty.h"
 
@@ -76,6 +78,7 @@
 static void
 _vte_pty_reset_signal_handlers(void)
 {
+#ifndef G_OS_WIN32
 	signal(SIGHUP,  SIG_DFL);
 	signal(SIGINT,  SIG_DFL);
 	signal(SIGILL,  SIG_DFL);
@@ -149,6 +152,7 @@
 #ifdef SIGUNUSED
 	signal(SIGUNUSED, SIG_DFL);
 #endif
+#endif
 }
 
 struct vte_pty_child_setup_data {
@@ -164,6 +168,7 @@
 static void
 vte_pty_child_setup (gpointer arg)
 {
+#ifndef G_OS_WIN32
 	struct vte_pty_child_setup_data *data = arg;
 	int fd = -1;
 	const char *tty = NULL;
@@ -257,6 +262,7 @@
 	/* Reset our signals -- our parent may have done any number of
 	 * weird things to them. */
 	_vte_pty_reset_signal_handlers();
+#endif
 }
 
 /* TODO: clean up the spawning
@@ -469,8 +475,9 @@
 int
 _vte_pty_set_size(int master, int columns, int rows)
 {
+	int ret = -1;
+#ifndef G_OS_WIN32
 	struct winsize size;
-	int ret;
 	memset(&size, 0, sizeof(size));
 	size.ws_row = rows ? rows : 24;
 	size.ws_col = columns ? columns : 80;
@@ -483,6 +490,7 @@
 				"Failed to set size on %d: %s.\n",
 				master, strerror(errno));
 	}
+#endif
 	return ret;
 }
 
@@ -499,8 +507,9 @@
 int
 _vte_pty_get_size(int master, int *columns, int *rows)
 {
+	int ret = -1;
+#ifndef G_OS_WIN32
 	struct winsize size;
-	int ret;
 	memset(&size, 0, sizeof(size));
 	ret = ioctl(master, TIOCGWINSZ, &size);
 	if (ret == 0) {
@@ -518,6 +527,7 @@
 				"Failed to read size from fd %d.\n",
 				master);
 	}
+#endif
 	return ret;
 }
 
@@ -565,7 +575,9 @@
 static int
 _vte_pty_getpt(void)
 {
-	int fd, flags;
+	int fd = -1;
+#ifndef G_OS_WIN32
+	int flags;
 #ifdef HAVE_GETPT
 	/* Call the system's function for allocating a pty. */
 	fd = getpt();
@@ -580,6 +592,7 @@
 	flags = fcntl(fd, F_GETFL);
 	flags &= ~(O_NONBLOCK);
 	fcntl(fd, F_SETFL, flags);
+#endif
 	return fd;
 }
 
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 1931)
+++ src/Makefile.am	(working copy)
@@ -1,7 +1,18 @@
+if PLATFORM_WIN32
+bin_PROGRAMS =
+else
 bin_PROGRAMS = vte
+endif
+
 pkginclude_HEADERS = pty.h reaper.h vte.h vteaccess.h
 lib_LTLIBRARIES = libvte.la
-pkglib_PROGRAMS = interpret utf8echo nativeecho utf8mode iso8859mode slowcat vterdb
+pkglib_PROGRAMS = interpret utf8echo nativeecho utf8mode iso8859mode vterdb
+
+if PLATFORM_WIN32
+else
+pkglib_PROGRAMS += slowcat
+endif
+
 pkglib_SCRIPTS = decset osc window
 EXTRA_PROGRAMS = buffer dumpkeys iso2022 pty reaper reflect-text-view reflect-vte ring mev ssfe table trie xticker vteconv vtetc
 EXTRA_DIST = \
@@ -35,6 +46,7 @@
 AM_CFLAGS = $(VTE_CFLAGS) $(FT2_CFLAGS) $(X_CFLAGS) $(PCRE_CFLAGS) \
 	    -DG_DISABLE_ASSERT -DG_LOG_DOMAIN=\"Vte\"
 AM_CPPFLAGS = -DDATADIR='"$(datadir)"' \
+	      -DVTE_DATADIR='"$(datadir)"' \
 	      -DLIBEXECDIR='"$(libexecdir)"' \
 	      -DLOCALEDIR='"$(localedir)"'
 AM_LDFLAGS = $(LDFLAGS)
Index: doc/openi18n/Makefile.am
===================================================================
--- doc/openi18n/Makefile.am	(revision 1931)
+++ doc/openi18n/Makefile.am	(working copy)
@@ -1,5 +1,10 @@
 EXTRA_DIST = UTF-8.txt  wrap.txt
 
 LIBS=
+
+if PLATFORM_WIN32
+else
 noinst_PROGRAMS = cursor
+endif
+
 cursor_SOURCES = cursor.c
