From f53a8edca920c02c6fd4cc40e56606d665e71a25 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@gnu.org>
Date: Fri, 6 Feb 2009 21:49:44 -0800
Subject: [PATCH] Link against -lws2_32 on Windows.

Gnulib commit df1da811, "Fix link errors on Windows when close
module is used", adds a Makefile variable $(LIB_CLOSE) that expands
to -lws2_32.  This commit adds that variable to the linker command
line.

It might not be necessary to add this to both pspp and psppire,
but it shouldn't hurt.
---
 src/ui/gui/automake.mk      | 3 ++-
 src/ui/terminal/automake.mk | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk
index 2183e4e8af..1549da4760 100644
--- a/src/ui/gui/automake.mk
+++ b/src/ui/gui/automake.mk
@@ -61,7 +61,8 @@ src_ui_gui_psppire_LDADD = \
 	src/libpspp-core.la \
 	$(GTK_LIBS) \
 	$(GLADE_LIBS) \
-	@LIBINTL@
+	@LIBINTL@ \
+	$(LIB_CLOSE)
 
 src_ui_gui_psppiredir = $(pkgdatadir)
 
diff --git a/src/ui/terminal/automake.mk b/src/ui/terminal/automake.mk
index 5ab098577a..cd47b62e78 100644
--- a/src/ui/terminal/automake.mk
+++ b/src/ui/terminal/automake.mk
@@ -27,7 +27,8 @@ src_ui_terminal_pspp_LDADD = \
 	src/libpspp-core.la \
 	$(NCURSES_LIBS) \
 	$(LIBICONV) \
-	@LIBINTL@ @LIBREADLINE@
+	@LIBINTL@ @LIBREADLINE@ \
+	$(LIB_CLOSE)
 
 
 src_ui_terminal_pspp_LDFLAGS = $(PSPP_LDFLAGS) $(PG_LDFLAGS)
-- 
2.30.2