This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Wed, 12 Nov 2014 23:44:05 -0500
Subject: [PATCH 1/2] SDLnetsys: Fix winsocks2.h include on i686-w64-mingw32

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

diff --git a/SDLnetsys.h b/SDLnetsys.h
index 1111111..2222222 100644
--- a/SDLnetsys.h
+++ b/SDLnetsys.h
@@ -34,7 +34,7 @@
 /* Include system network headers */
 #if defined(__WIN32__) || defined(WIN32)
 #define __USE_W32_SOCKETS
-#ifdef _WIN64
+#if defined(_WIN64) || defined(__MINGW64_VERSION_MAJOR)
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #else

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cameron Cawley <ccawley2011@gmail.com>
Date: Sat, 17 Jul 2021 15:56:53 +0100
Subject: [PATCH 2/2] Include required libraries in pkg-config output


diff --git a/Makefile.in b/Makefile.in
index 1111111..2222222 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -262,6 +262,10 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_SHARED_FALSE = @ENABLE_SHARED_FALSE@
+ENABLE_SHARED_TRUE = @ENABLE_SHARED_TRUE@
+ENABLE_STATIC_FALSE = @ENABLE_STATIC_FALSE@
+ENABLE_STATIC_TRUE = @ENABLE_STATIC_TRUE@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
diff --git a/SDL2_net.pc.in b/SDL2_net.pc.in
index 1111111..2222222 100644
--- a/SDL2_net.pc.in
+++ b/SDL2_net.pc.in
@@ -7,5 +7,7 @@ Name: SDL2_net
 Description: net library for Simple DirectMedia Layer
 Version: @VERSION@
 Requires: sdl2 >= @SDL_VERSION@
-Libs: -L${libdir} -lSDL2_net
+@ENABLE_SHARED_TRUE@Libs: -L${libdir} -lSDL2_net
+@ENABLE_SHARED_TRUE@@ENABLE_STATIC_TRUE@Libs.private: @INETLIB@
+@ENABLE_SHARED_FALSE@Libs: -L${libdir} -lSDL2_net @INETLIB@
 Cflags: -I${includedir}/SDL2
diff --git a/configure b/configure
index 1111111..2222222 100755
--- a/configure
+++ b/configure
@@ -772,6 +772,10 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
+ENABLE_STATIC_FALSE
+ENABLE_STATIC_TRUE
+ENABLE_SHARED_FALSE
+ENABLE_SHARED_TRUE
 HAVE_GUI_LIB_FALSE
 HAVE_GUI_LIB_TRUE
 SDL2_CONFIG
@@ -15875,6 +15879,25 @@ fi
 
 CXXFLAGS="$CXXFLAGS $CFLAGS"
 
+if test x$enable_shared = xyes; then
+    ENABLE_SHARED_TRUE=
+    ENABLE_SHARED_FALSE="#"
+else
+    ENABLE_SHARED_TRUE="#"
+    ENABLE_SHARED_FALSE=
+fi
+if test x$enable_static = xyes; then
+    ENABLE_STATIC_TRUE=
+    ENABLE_STATIC_FALSE="#"
+else
+    ENABLE_STATIC_TRUE="#"
+    ENABLE_STATIC_FALSE=
+fi
+
+
+
+
+
 
 
 # Finally create all the generated files
