Created
July 20, 2020 03:40
-
-
Save 1480c1/87da31ac7eba6c5c77acdee375d60a27 to your computer and use it in GitHub Desktop.
librsvg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 15cf1293193401b5e8a95a3e330cb4d6cf4793d7 Mon Sep 17 00:00:00 2001 | |
From: Christopher Degawa <ccom@randomderp.com> | |
Date: Mon, 20 Jul 2020 03:39:32 +0000 | |
Subject: [PATCH] mingw-w64: Add -lws2_32 -luserenv if on windows | |
Signed-off-by: Christopher Degawa <ccom@randomderp.com> | |
--- | |
Makefile.am | 7 +++++++ | |
configure.ac | 2 ++ | |
2 files changed, 9 insertions(+) | |
diff --git a/Makefile.am b/Makefile.am | |
index 4d909d19..985be1d8 100644 | |
--- a/Makefile.am | |
+++ b/Makefile.am | |
@@ -5,6 +5,12 @@ NULL = | |
lib_LTLIBRARIES = librsvg-@RSVG_API_MAJOR_VERSION@.la | |
noinst_LTLIBRARIES = librsvg_c_api.la | |
+if OS_WIN32 | |
+WIN_LIBS = -lws2_32 -luserenv | |
+else | |
+WIN_LIBS = | |
+endif | |
+ | |
# Some systems, reportedly OpenBSD and Mac OS X, refuse | |
# to create libraries without any object files. Compiling | |
# this file, and adding its object file to the library, | |
@@ -227,6 +233,7 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_LDFLAGS = \ | |
librsvg_@RSVG_API_MAJOR_VERSION@_la_LIBADD = \ | |
librsvg_c_api.la \ | |
$(LIBRSVG_LIBS) \ | |
+ $(WIN_LIBS) \ | |
$(LIBM) \ | |
$(DLOPEN_LIBS) | |
diff --git a/configure.ac b/configure.ac | |
index 986fadc5..afdbbaca 100644 | |
--- a/configure.ac | |
+++ b/configure.ac | |
@@ -154,6 +154,8 @@ esac | |
AC_MSG_RESULT([$native_win32]) | |
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = "yes") | |
+AC_SUBST(OS_WIN32) | |
+ | |
dnl =========================================================================== | |
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` | |
-- | |
2.25.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment